Classpath in JAR file

I have packed my stand alone app, which is using JAVA Mail API in one JAR file (myapp.jar).
Since JAVA Mail requires 2 seperate jar files, I created a lib dir within the jar that contains all required jar files.
How do I add the lib directory inside the jar to my classpath ?
Just adding myapp.jar to the classpath is not enough.
I also tried to put Class-Path into my Manifest.mf file inside the jar
which did not help. What dir does the manifest.mf file go inside the jar ? How would my Class-Path value have to look ? Maybe I did something wrong there ? Or is the whole thing just not possible and I have to deliver all other jar files seperate :(((((((

Yes that is exactly how it looks. And if it looks like
that, the
lib dir has to be outside the jar file. The '.' is the
same dir as the jar dir. Was your reply a guess or did
you actually manage to do something like that ?I thought I had this working myself. After many iterations, I was able to run the jar files I was creating. Right after I figured it all out, your querry came up.
But, just last night, I realized something was wrong. I tested this structure on both machines I write code on (one Linux, one Win2k) and it worked on both. Finally, I wanted to test on my 'depolyment' machine, a Win2k laptop I rarely write code with, and nothing workded. I was getting the same classdef not found errors you were.
I finally realized, as you mention, it worked on my other machines because the "lib/some.jar" structure existed on the disk. Thus, the jar files were in the larger one, but those weren't being used. Argh. Of course the laptop doesn't have those jars somewhere else. So nothing worked.
Guess this was a case of the blind leading the blind. Sorry! I've had to resort to putting out both jars and doing some rearranging of internal packages to get everything to work from a jar file. I need to have all this done for a trade show next week (Java on Wall Street, anyone?), so it works 'well-enough' right now. Hopefully I'll get back to this and find the proper solution after the show.

Similar Messages

  • Classpath and jar file question

    my application need to use few jar files i downloaded from the internet
    so i need to set the classpath so that i can import the packages in the jar file rite?
    let say set classpath=.;c:\somedir\bin;
    the ".;" after the "=" means that i search the current directory first then search the directory i have specified after that rite?
    if so, can i put all the needed jar files in the current directory so that my application can use them??
    Another question is if all the jar files in located in the same directory how can i set the class path to refer to them without sepecifying each of the jar file name??can i just put the directory path and will it locate them automatically when my application start??
    can anyone tell me about it??thanks

    No, you need to include each and every jar file in your classpath.
    Or put them all in your <jdk_installation_dir>\jre\lib\ext directory, so that they will get included in your classpath automatically.
    Sudha

  • Classpath for jar files?

    Hi all,
    i am trying to run a standalone java program using JRC through command promt.
    my problem is i am importing few classes from jar files into my java class. but its not getting imported.
    how to resolve it?

    Hi Saravana
    You can use batch file to run your standalone java program.
    The contents of the batch file would be as follows:
    @echo off
    if "%OS%" == "Windows_NT" setlocal
    rem
    rem Sets the CLASSPATH environment variable to include all JAR files
    rem required for the JRC then compiles and jars Java file(s).
    rem
    rem Edit the environment variable BOBJ_JAVA_LIB to point to the
    rem location where you have the JRC jar files.
    rem
    rem Make sure to define any other required libraries in the environment
    rem variable CLASSPATH.
    rem
    rem Make sure you have defined the environment variable JAVA_HOME
    rem
    set BOBJ_JAVA_LIB=c:\Program Files\Business Objects\Common\3.5\java\lib
    set CURRENT_DIR=%cd%
    echo Using JAVA_HOME: %JAVA_HOME%
    echo Using CURRENT_DIR: %CURRENT_DIR%
    set RUNJAVA="%JAVAHOME%/bin/java"
    set RUNJAVAC="%JAVAHOME%/bin/javac"
    set RUNJAR="%JAVAHOME%/bin/jar"
    set CLASSPATH=%BOBJ_JAVA_LIB%\ReportViewer.jar;%BOBJ_JAVA_LIB%\ReportPrinter.jar;%BOBJ_JAVA_LIB%\CrystalCommon.jar;%BOBJ_JAVA_LIB%\CrystalDatabaseConnectors.jar;%BOBJ_JAVA_LIB%\CrystalReportingCommon.jar;%BOBJ_JAVA_LIB%\CrystalFormulas.jar;%BOBJ_JAVA_LIB%\CrystalQueryEngine.jar;%BOBJ_JAVA_LIB%\CrystalReportEngine.jar;%BOBJ_JAVA_LIB%\keycodeDecoder.jar;%BOBJ_JAVA_LIB%\MetafileRenderer.jar;%BOBJ_JAVA_LIB%\rpoifs.jar;%BOBJ_JAVA_LIB%\jrcerom.jar;%BOBJ_JAVA_LIB%\jrcadapter.jar;%BOBJ_JAVA_LIB%\rascore.jar;%BOBJ_JAVA_LIB%\rasapp.jar;%BOBJ_JAVA_LIB%\Serialization.jar;%BOBJ_JAVA_LIB%\external\log4j.jar;%BOBJ_JAVA_LIB%\external\icu4j.jar;%BOBJ_JAVA_LIB%\external\Concurrent.jar;%BOBJ_JAVA_LIB%\external\xercesImpl.jar;%BOBJ_JAVA_LIB%\external\xml-apis.jar;%BOBJ_JAVA_LIB%\CrystalCharting.jar;%BOBJ_JAVA_LIB%\CrystalContentModels.jar;%BOBJ_JAVA_LIB%\CrystalExporters.jar;%BOBJ_JAVA_LIB%\CrystalExportingBase.jar;%CURRENT_DIR%;%CLASSPATH%
    %_RUNJAVAC% -classpath "%CLASSPATH%" *.java
    %_RUNJAVA% -classpath "%CLASSPATH%" HelloWorldSwing
    // HelloWorldSwing is the name of your .java file
    Make sure you have all the jar files in the lib directory.
    Hope this helps you.
    Thanks
    Soni

  • Question about classpath and jar file

    I have a jar file (actually jhall.jar, the java help jar file). How do I uses its classes if I don't want to add it to the classpath. Currently, I have the jar file in the same directory as all my other classes.

    it simply adds secondjar.jar into firstjar.jar, rather
    than extracting secondjar.jar's files and put it into
    firstjar.jar. How would I be able to do that?Don't do either of them. Distribute the two jar files separately, and in the manifest of the one which is meant to be your executable jar file, put a Class-Path: entry that refers to the other one. Look at the latter parts of the tutorial about jar files:
    http://java.sun.com/docs/books/tutorial/jar/basics/
    PC&#178;

  • Classpath and jar file

    Hy,
    I have written an application that uses the javax.comm package.
    My application contains many classes disposed in \classes directory.
    The main class is admin.class.
    If launch the application with a batch file (in Windows):
    echo off
    cls
    java -classpath c:\hy\classes;C:\jdk1.3.1_02\lib\comm.jar admin
    All works fine.
    if I insert the classes of the application in a jar file, hyper.jar (in the manifest file I write "Main-Class: admin"), and if I launch the application with another batch file:
    echo off
    cls
    java -classpath C:\jdk1.3.1_02\lib\comm.jar -jar hyper.jar
    The application starts, but the interpreter java says to me:
    Exception in thread "main" java.lang.NoClassDefFoundError: javax/comm/SerialPortEventListener
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at hyper.loadModuli_comm(hyper.java:142)
    at hyper.setStatus(hyper.java:63)
    at admin.main(admin.java:205)
    why, the interpreter java, can't it found javax.comm package?
    thanks.

    Hy,
    I tried to set class-path key in manifest file, but the application doesn't start, and the interpreter java doesn't find admin.class... I believe that I set class-path in incorrect way.
    I write:
    Class-Path: C:\jdk1.3.1_02\lib\comm.jar
    is it ok?
    thanks.

  • When to use CLASSPATH for .jar files

    I find I must put newly added .jar files in my classpath in order to avoid "does not exist" errors when I compile. Where should .jar files be placed in order to avoid hardcoding this in my classpath?

    Actually. With this .jar file (ksoap-midp.jar) which I downloaded, I can't resolve the imports even when I put the .jar in my classpath. What are the steps to take to add new classes to your system?

  • Apache Tomcat 7.0.4 can't recognize the classpath for .jar files

    Hiii Everybody,
    I have a weird problem. I am trying to develop a simple application where I am trying to pass an excel file name as an argument to a method and the method creates a copy of the specified file. I have used jxl.jar for excel file manipulation. During this I have faced two problems.......
    1) I tried to compile the file CopyExcel.java in the command prompt(windows), sometimes the file is not compiled and the error shown indicates that it can't recognize the package jxl. But if I close the command prompt window and open it again.... I could compile the CopyExcel.java succesfully with no error.
    2) Even if I have compiled the CopyExcell.java file successfully, whenever I am tryiyng to call a method copyMain() inside it, browser shows....
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Servlet execution threw an exception
    root cause
    java.lang.NoClassDefFoundError: jxl/Workbook
         CopyExcel.copy(CopyExcel.java:39)
         CopyExcel.copyMain(CopyExcel.java:81)
         ServicePage.processRequest(ServicePage.java:28)
         ServicePage.doPost(ServicePage.java:73)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    root cause
    java.lang.ClassNotFoundException: jxl.Workbook
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1672)
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1517)
         java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
         CopyExcel.copy(CopyExcel.java:39)
         CopyExcel.copyMain(CopyExcel.java:81)
         ServicePage.processRequest(ServicePage.java:28)
         ServicePage.doPost(ServicePage.java:73)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    note The full stack trace of the root cause is available in the Apache Tomcat/7.0.4 logs.
    --------------------------------------------------------------------------------The code for CopyExcel.java is as folows.............
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    * @author Administrator
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    import java.io.File;
    import java.io.IOException;
    import jxl.Cell;
    //import jxl.CellType;
    import jxl.Sheet;
    import jxl.Workbook;
    import jxl.read.biff.BiffException;
    import jxl.write.WritableWorkbook;
    public class CopyExcel {
         private String inputFile;
         public void setInputFile(String inputFile) {
              this.inputFile = inputFile;
         public void copy() throws IOException  {
              File inputWorkbook = new File(inputFile);
              Workbook w;
                    try{
                        System.out.println("Before w= Workbook.getWorkbook(inputWorkbook);  ");
              w= Workbook.getWorkbook(inputWorkbook);
                     System.out.println("After w= Workbook.getWorkbook(inputWorkbook);  ");
              WritableWorkbook copy=Workbook.createWorkbook(new File("CopyPan.xls"), w);
                    copy.write();
                    copy.close();
                    }catch(Exception e){}
    /*          try {
                   w = Workbook.getWorkbook(inputWorkbook);
                   // Get the first sheet
                   Sheet sheet = w.getSheet(0);
                   // Loop over first 10 column and lines
                        for (int i = 1; i < 6; i++) {
                             Cell cell = sheet.getCell(0, i);
                             //CellType type = cell.getType();
                             //if (cell.getType() == CellType.LABEL) {
                                  //System.out.println("I got a label "
                                       //     + cell.getContents());
                             //if (cell.getType() == CellType.NUMBER) {
                                  //System.out.println("I got a number "
                                            //+ cell.getContents());
                                                    System.out.println(cell.getContents());
              } catch (BiffException e) {
                   e.printStackTrace();
         public static  String copyMain(String args) throws IOException {
              String str=args;
              CopyExcel test = new CopyExcel();
              test.setInputFile(args);
              test.copy();
                    return "Success";
    }I have set the "CLASSPATH" environment variables in "user variables for administrator" as follows,
    .;%SYSTEM%;C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.4\bin;C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.4\lib\servlet-api.jar;C:\Program Files\Java\jdk1.6.0_11\lib\jxl-2.6.jar Also I have tried editing the startup MS-dos batch file as folows....
    set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_11
    set CLASSPATH=.;%SYSTEM%;C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.4\bin;C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.4\lib\servlet-api.jar;C:\Program Files\Java\jdk1.6.0_11\lib\jxl-2.6.jar
    @echo off
    rem Licensed to the Apache Software Foundation (ASF) under one or more
    rem contributor license agreements.  See the NOTICE file distributed with
    rem this work for additional information regarding copyright ownership.
    rem The ASF licenses thi..........But the problem remained...........
    Plz. help me.
    Thank u in advance for any help.

    Hiii Everybody,
    I have a weird problem. I am trying to develop a simple application where I am trying to pass an excel file name as an argument to a method and the method creates a copy of the specified file. I have used jxl.jar for excel file manipulation. During this I have faced two problems.......
    1) I tried to compile the file CopyExcel.java in the command prompt(windows), sometimes the file is not compiled and the error shown indicates that it can't recognize the package jxl. But if I close the command prompt window and open it again.... I could compile the CopyExcel.java succesfully with no error.
    2) Even if I have compiled the CopyExcell.java file successfully, whenever I am tryiyng to call a method copyMain() inside it, browser shows....
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Servlet execution threw an exception
    root cause
    java.lang.NoClassDefFoundError: jxl/Workbook
         CopyExcel.copy(CopyExcel.java:39)
         CopyExcel.copyMain(CopyExcel.java:81)
         ServicePage.processRequest(ServicePage.java:28)
         ServicePage.doPost(ServicePage.java:73)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    root cause
    java.lang.ClassNotFoundException: jxl.Workbook
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1672)
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1517)
         java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
         CopyExcel.copy(CopyExcel.java:39)
         CopyExcel.copyMain(CopyExcel.java:81)
         ServicePage.processRequest(ServicePage.java:28)
         ServicePage.doPost(ServicePage.java:73)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    note The full stack trace of the root cause is available in the Apache Tomcat/7.0.4 logs.
    --------------------------------------------------------------------------------The code for CopyExcel.java is as folows.............
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    * @author Administrator
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    import java.io.File;
    import java.io.IOException;
    import jxl.Cell;
    //import jxl.CellType;
    import jxl.Sheet;
    import jxl.Workbook;
    import jxl.read.biff.BiffException;
    import jxl.write.WritableWorkbook;
    public class CopyExcel {
         private String inputFile;
         public void setInputFile(String inputFile) {
              this.inputFile = inputFile;
         public void copy() throws IOException  {
              File inputWorkbook = new File(inputFile);
              Workbook w;
                    try{
                        System.out.println("Before w= Workbook.getWorkbook(inputWorkbook);  ");
              w= Workbook.getWorkbook(inputWorkbook);
                     System.out.println("After w= Workbook.getWorkbook(inputWorkbook);  ");
              WritableWorkbook copy=Workbook.createWorkbook(new File("CopyPan.xls"), w);
                    copy.write();
                    copy.close();
                    }catch(Exception e){}
    /*          try {
                   w = Workbook.getWorkbook(inputWorkbook);
                   // Get the first sheet
                   Sheet sheet = w.getSheet(0);
                   // Loop over first 10 column and lines
                        for (int i = 1; i < 6; i++) {
                             Cell cell = sheet.getCell(0, i);
                             //CellType type = cell.getType();
                             //if (cell.getType() == CellType.LABEL) {
                                  //System.out.println("I got a label "
                                       //     + cell.getContents());
                             //if (cell.getType() == CellType.NUMBER) {
                                  //System.out.println("I got a number "
                                            //+ cell.getContents());
                                                    System.out.println(cell.getContents());
              } catch (BiffException e) {
                   e.printStackTrace();
         public static  String copyMain(String args) throws IOException {
              String str=args;
              CopyExcel test = new CopyExcel();
              test.setInputFile(args);
              test.copy();
                    return "Success";
    }I have set the "CLASSPATH" environment variables in "user variables for administrator" as follows,
    .;%SYSTEM%;C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.4\bin;C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.4\lib\servlet-api.jar;C:\Program Files\Java\jdk1.6.0_11\lib\jxl-2.6.jar Also I have tried editing the startup MS-dos batch file as folows....
    set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_11
    set CLASSPATH=.;%SYSTEM%;C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.4\bin;C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.4\lib\servlet-api.jar;C:\Program Files\Java\jdk1.6.0_11\lib\jxl-2.6.jar
    @echo off
    rem Licensed to the Apache Software Foundation (ASF) under one or more
    rem contributor license agreements.  See the NOTICE file distributed with
    rem this work for additional information regarding copyright ownership.
    rem The ASF licenses thi..........But the problem remained...........
    Plz. help me.
    Thank u in advance for any help.

  • .jar files with javadoc

    Can I supply a .jar file on the -classpath and have javadoc parse it. I have a file that is referencing an annotation in a third-party package. So, I'm getting exceptions running javadoc. I'm trying to supply the .jar file in the -classpath but javadoc seems to be ignoring it.
    Can someone tell me if -classpath takes .jar files and do I need to specify the path to the file or the .jar file itself?
    Mary

    More details.
    I have a file called Ellipsoid.java that references an annotation called @Immutable. I've parred down my javadoc command to this:
    javadoc -d javadocs Ellipsoid.java -classpath /home/bamboo/annotations-1.3.5.jar
    where the annotations-1.3.5.jar file contains the annotation class referenced from Ellipsoid.java. I know about http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6442982 which is why I am adding the .jar to the classpath. Yet I continue to get this exception:
    java.lang.ClassCastException: com.sun.tools.javadoc.ClassDocImpl
    at com.sun.tools.javadoc.AnnotationDescImpl.annotationType(AnnotationDescImpl.java:46)
    at com.sun.tools.doclets.internal.toolkit.util.Util.isDeprecated(Util.java:804)
    at com.sun.tools.doclets.formats.html.AbstractIndexWriter.printComment(AbstractIndexWriter.java:179)
    at com.sun.tools.doclets.formats.html.AbstractIndexWriter.printDescription(AbstractIndexWriter.java:126)
    at com.sun.tools.doclets.formats.html.AbstractIndexWriter.generateContents(AbstractIndexWriter.java:91)
    at com.sun.tools.doclets.formats.html.SingleIndexWriter.generateIndexFile(SingleIndexWriter.java:76)
    at com.sun.tools.doclets.formats.html.SingleIndexWriter.generate(SingleIndexWriter.java:52)
    at com.sun.tools.doclets.formats.html.HtmlDoclet.generateOtherFiles(HtmlDoclet.java:103)
    at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.startGeneration(AbstractDoclet.java:122)
    at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.start(AbstractDoclet.java:64)
    at com.sun.tools.doclets.formats.html.HtmlDoclet.start(HtmlDoclet.java:42)
    at com.sun.tools.doclets.standard.Standard.start(Standard.java:23)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:269)
    at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:143)
    at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:340)
    at com.sun.tools.javadoc.Start.begin(Start.java:128)
    at com.sun.tools.javadoc.Main.execute(Main.java:41)
    at com.sun.tools.javadoc.Main.main(Main.java:31)
    Removing the annotation from the file fixes the problem and Javadoc runs fine.
    Edited by: Mary_at_Palantir on Jan 12, 2009 10:39 AM

  • Looking for JAR files for AQ JMS

    Hello all,
    I installed Oracle 9i 9.2.0.1 and trying to run a
    JMS Sample that uses JMS oracle.jms.AQjmsQueueConnectionFactory
    and oracle.jms.AQjmsSession. My questions which jar
    files should be included in the CLASSPATH.
    thanks

    The jar file you need is called aqapi.jar.

  • .jar file reusablility issue in oracle forms

    hello all
    i am using oracle forms
    {code}
    Forms [32 Bit] Version 10.1.2.0.2 (Production)
    Oracle Toolkit Version 10.1.2.0.2 (Production)
    PL/SQL Version 10.1.0.4.2 (Production)
    Oracle Procedure Builder V10.1.2.0.2 - Production
    {code}
    and using Database 10g
    {code}
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    {code}
    i am developing an application in oracle forms that sends message through GSM mobile when any transaction is commited.
    i wrote a class in java , made .jar file , edited default.env file CLASSPATH = "my .jar file"
    everything is working fine when i am trying the code in NETBEANS IDE, it sends messages again and over again with no delay..
    PROBLEM:
    the problem is that when i try to send message from oracle forms using that JAR file , it sends message for only single time , after that it neither shows me any error nor sends the message,
    (1) can it be problem of closing COM port for reusablity.
    (2) any other way to reuse the jar file.
    (3) should i program to closo the used port. (but java program is working very well in NETBEANS IDE).
    please suggest me what should i do to reuse .jar file again and over again.
    thanks

    thanks for your reply.
    sorry if forgot to mention that how i am using this java code.
    yes! i am using that java code using Java Importer in oracle forms 10g.
    importing that jar file i used PL/SQL code to use the static public veriables in oracle forms
    Procedure Send_Message(
        Cel_N In Varchar2
    Is
      Ora_Obj Ora_Java.Jobject;
      Com_P    Varchar2(10);
      Cent_No  Varchar2(100);
      Send_Sms Number;
      Mesg     Varchar2(200);
    Begin
      Ora_Obj := Smsclient.New(1);
      Smsclient.Setcomportname(Com_P);
      Smsclient.Setmsgcenternum(Cent_No);
      Send_Sms:= Smsclient.Sendmessage(Ora_Obj,Cel_N,Mesg);
    Exception
    When Ora_Java.Java_Error Then
      Message(Ora_Java.Last_Error);
    When Others Then
      Message(Sqlerrm);
    End;
    this Smsclient.Sendmessage Class is working very well in both plateforms in NETBEANS IDE and oracle forms but the difference is in this class that
    in NETBEANS IDE (when i run this class using F6 ) it works every time with no delay
    but when i use this same class in pl/sql code through oracle forms it works only for one time.
    COM ports and GSM modem is working property but why .jar file works for once.. and when i restart OC4J & oracle form at run time then it works for only once , meanse after starting OC4J i am able to send message through mobile for one time, means .jar file works only once, why not every time i call the class through oracle form..
    what should i check .. please..
    thanks

  • Jar Files in a Jar File - Classpath Error

    Hi,
    I created a jar file that will have all the class files of the application. In the manifest file class path, I have the jar files the application is dependent on. The dependent jar files were kept outside of the application jar file. I was able to execute the main file in the application jar file. Then I created another jar file that holds all the dependent jar files the application is dependent on along with the application jar file into one super jar file. configured the main class attribute of the super jar file to that in the application jar file. When I try to execute it, I'm getting an error saying Class Not Found. Can someone guide me in setting the classpath for this super jar file in its manifest file.
    Presently my manifest file classpath variable in the super jar file is set as App.jar Depend1.jar Depend2.jar
    Thanks,
    E H

    Java's standard class loaders do not support jar files inside of other jar files, and will give the error you see.
    You can write your own customized class loader, use a 3rd-party solution (onejar at sourceforge is one), or remove the interior jars.

  • "bc4j.xcfg" file not in classpath  (and not in JAR file)

    Hi, this is a very similar problem to one reported today. I have created a JClient application that connects to a DB and displays some info in a JFrame. Running the application through JDeveloper, all is fine. But, if I create a jar file and run it directly through the jar file, I get this error message:
    C:\Work\Client\View\deploy>java -jar my_client.jar
    oracle.jbo.JboException: JBO-33001: Cannot find the configuration file /combit/common/bc4j.xcfg in the classpath
    at oracle.jbo.client.Configuration.loadFromClassPath(Configuration.java: 344)
    at oracle.jbo.common.ampool.PoolMgr.createPool(PoolMgr.java:331)
    at oracle.jbo.common.ampool.PoolMgr.findPool(PoolMgr.java:532)
    at oracle.jbo.client.Configuration.createRootApplicationModule(Configura tion.java:1320)
    at
    oracle.jbo.client.Configuration.createRootApplicationModule(Configura tion.java:1298)
    at view.Login.jbInit(Login.java:81)
    at view.Login.<init>(Login.java:39)
    at view.MainFrame.<clinit>(MainFrame.java:26)
    at view.Combit.<init>(Combit.java:13)
    at view.Combit.main(Combit.java:50)
    In fact, the bc4j.xcfg file is not inside my JAR file (it belongs to the BC4J project, so when I created the JAR file for my "View" project, it never came into.
    How should I create the JAR file to have this file inside and fix my problem??
    Thanks a lot,
    David

    I'm having a similar problem -- but I am just trying to run the BC4J project -- not a project dependent on the BC4J components... where is the classpath being incorrectly set?
    oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.jbo.JboException, msg=JBO-33001: Cannot find the configuration file infra\mainmenu\bc4j\common\bc4j.xcfg in the classpath
         void oracle.jbo.JboException.<init>(java.lang.Throwable)
              JboException.java:344
         oracle.jbo.common.ampool.ApplicationPool oracle.jbo.common.ampool.PoolMgr.findPool(java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
              PoolMgr.java:481
         oracle.jbo.common.ampool.ApplicationPool oracle.jbo.common.ampool.ContextPoolManager.findPool(java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
              ContextPoolManager.java:166
         oracle.jbo.common.ampool.ApplicationPool oracle.jbo.uicli.mom.JUMetaObjectManager.createPool(java.lang.String, java.util.Properties)
              JUMetaObjectManager.java:471
         oracle.jbo.common.ampool.SessionCookie oracle.jbo.http.HttpContainer.findSessionCookie(javax.servlet.http.HttpSession, java.lang.String, java.lang.String, java.util.Properties)
              HttpContainer.java:638
         oracle.jbo.common.ampool.SessionCookie oracle.cabo.data.jbo.servlet.RootAppModuleRegistryImpl.getSessionCookie(oracle.cabo.servlet.BajaContext, oracle.cabo.data.jbo.def.RootAppModuleDef)
         oracle.jbo.ApplicationModule oracle.cabo.data.jbo.servlet.RootAppModuleRegistryImpl.useRootAppModule(oracle.cabo.servlet.BajaContext, oracle.cabo.data.jbo.def.RootAppModuleDef)
         oracle.jbo.ApplicationModule oracle.cabo.data.jbo.servlet.RootAppModuleRegistryImpl.useRootAppModule(oracle.cabo.servlet.BajaContext, java.lang.String)
         void oracle.cabo.data.jbo.servlet.RootAppModuleRegistryImpl.useAll(oracle.cabo.servlet.BajaContext)
         void oracle.cabo.data.jbo.xml.parse.JboParserExtensionImpl$JboPageDescription.renderStarted(oracle.cabo.servlet.BajaContext, oracle.cabo.servlet.Page, oracle.cabo.ui.RenderingContext)
         void oracle.cabo.servlet.ui.UINodePageRenderer.renderPage(oracle.cabo.servlet.BajaContext, oracle.cabo.servlet.Page)
         void oracle.cabo.servlet.AbstractPageBroker.renderPage(oracle.cabo.servlet.BajaContext, oracle.cabo.servlet.Page)
         oracle.cabo.servlet.Page oracle.cabo.servlet.PageBrokerHandler.handleRequest(oracle.cabo.servlet.BajaContext)
         void oracle.cabo.servlet.UIXServlet.doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
         void javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
              HttpServlet.java:740
         void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
              HttpServlet.java:853
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
              ServletRequestDispatcher.java:721
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(javax.servlet.ServletRequest, javax.servlet.http.HttpServletResponse)
              ServletRequestDispatcher.java:306
         boolean com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.ApplicationServerThread, com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.EvermindHttpServletRequest, com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.EvermindHttpServletResponse, java.io.InputStream, java.io.OutputStream, boolean)
              HttpRequestHandler.java:767
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(java.lang.Thread)
              HttpRequestHandler.java:259
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run()
              HttpRequestHandler.java:106
         void EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run()
              PooledExecutor.java:803
         void java.lang.Thread.run()
              Thread.java:484
    ## Detail 0 ##
    oracle.jbo.JboException: JBO-33001: Cannot find the configuration file infra\mainmenu\bc4j\common\bc4j.xcfg in the classpath
         void oracle.jbo.client.Configuration.loadFromClassPath(java.lang.String)
              Configuration.java:314
         oracle.jbo.common.ampool.ApplicationPool oracle.jbo.common.ampool.PoolMgr.createPool(java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
              PoolMgr.java:272
         oracle.jbo.common.ampool.ApplicationPool oracle.jbo.common.ampool.PoolMgr.findPool(java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
              PoolMgr.java:457
         oracle.jbo.common.ampool.ApplicationPool oracle.jbo.common.ampool.ContextPoolManager.findPool(java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
              ContextPoolManager.java:166
         oracle.jbo.common.ampool.ApplicationPool oracle.jbo.uicli.mom.JUMetaObjectManager.createPool(java.lang.String, java.util.Properties)
              JUMetaObjectManager.java:471
         oracle.jbo.common.ampool.SessionCookie oracle.jbo.http.HttpContainer.findSessionCookie(javax.servlet.http.HttpSession, java.lang.String, java.lang.String, java.util.Properties)
              HttpContainer.java:638
         oracle.jbo.common.ampool.SessionCookie oracle.cabo.data.jbo.servlet.RootAppModuleRegistryImpl.getSessionCookie(oracle.cabo.servlet.BajaContext, oracle.cabo.data.jbo.def.RootAppModuleDef)
         oracle.jbo.ApplicationModule oracle.cabo.data.jbo.servlet.RootAppModuleRegistryImpl.useRootAppModule(oracle.cabo.servlet.BajaContext, oracle.cabo.data.jbo.def.RootAppModuleDef)
         oracle.jbo.ApplicationModule oracle.cabo.data.jbo.servlet.RootAppModuleRegistryImpl.useRootAppModule(oracle.cabo.servlet.BajaContext, java.lang.String)
         void oracle.cabo.data.jbo.servlet.RootAppModuleRegistryImpl.useAll(oracle.cabo.servlet.BajaContext)
         void oracle.cabo.data.jbo.xml.parse.JboParserExtensionImpl$JboPageDescription.renderStarted(oracle.cabo.servlet.BajaContext, oracle.cabo.servlet.Page, oracle.cabo.ui.RenderingContext)
         void oracle.cabo.servlet.ui.UINodePageRenderer.renderPage(oracle.cabo.servlet.BajaContext, oracle.cabo.servlet.Page)
         void oracle.cabo.servlet.AbstractPageBroker.renderPage(oracle.cabo.servlet.BajaContext, oracle.cabo.servlet.Page)
         oracle.cabo.servlet.Page oracle.cabo.servlet.PageBrokerHandler.handleRequest(oracle.cabo.servlet.BajaContext)
         void oracle.cabo.servlet.UIXServlet.doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
         void javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
              HttpServlet.java:740
         void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
              HttpServlet.java:853
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
              ServletRequestDispatcher.java:721
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(javax.servlet.ServletRequest, javax.servlet.http.HttpServletResponse)
              ServletRequestDispatcher.java:306
         boolean com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.ApplicationServerThread, com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.EvermindHttpServletRequest, com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.EvermindHttpServletResponse, java.io.InputStream, java.io.OutputStream, boolean)
              HttpRequestHandler.java:767
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(java.lang.Thread)
              HttpRequestHandler.java:259
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run()
              HttpRequestHandler.java:106
         void EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run()
              PooledExecutor.java:803
         void java.lang.Thread.run()
              Thread.java:484
    ## Detail 0 ##
    oracle.jbo.JboException: JBO-33000: Cannot find the configuration file registerConnectionsFromDocument
         void oracle.jbo.client.Configuration.registerConnectionsFromDocument()
              Configuration.java:871
         void oracle.jbo.client.Configuration.loadFromStream(java.io.InputStream)
              Configuration.java:248
         void oracle.jbo.client.Configuration.loadFromClassPath(java.lang.String)
              Configuration.java:308
         oracle.jbo.common.ampool.ApplicationPool oracle.jbo.common.ampool.PoolMgr.createPool(java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
              PoolMgr.java:272
         oracle.jbo.common.ampool.ApplicationPool oracle.jbo.common.ampool.PoolMgr.findPool(java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
              PoolMgr.java:457
         oracle.jbo.common.ampool.ApplicationPool oracle.jbo.common.ampool.ContextPoolManager.findPool(java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
              ContextPoolManager.java:166
         oracle.jbo.common.ampool.ApplicationPool oracle.jbo.uicli.mom.JUMetaObjectManager.createPool(java.lang.String, java.util.Properties)
              JUMetaObjectManager.java:471
         oracle.jbo.common.ampool.SessionCookie oracle.jbo.http.HttpContainer.findSessionCookie(javax.servlet.http.HttpSession, java.lang.String, java.lang.String, java.util.Properties)
              HttpContainer.java:638
         oracle.jbo.common.ampool.SessionCookie oracle.cabo.data.jbo.servlet.RootAppModuleRegistryImpl.getSessionCookie(oracle.cabo.servlet.BajaContext, oracle.cabo.data.jbo.def.RootAppModuleDef)
         oracle.jbo.ApplicationModule oracle.cabo.data.jbo.servlet.RootAppModuleRegistryImpl.useRootAppModule(oracle.cabo.servlet.BajaContext, oracle.cabo.data.jbo.def.RootAppModuleDef)
         oracle.jbo.ApplicationModule oracle.cabo.data.jbo.servlet.RootAppModuleRegistryImpl.useRootAppModule(oracle.cabo.servlet.BajaContext, java.lang.String)
         void oracle.cabo.data.jbo.servlet.RootAppModuleRegistryImpl.useAll(oracle.cabo.servlet.BajaContext)
         void oracle.cabo.data.jbo.xml.parse.JboParserExtensionImpl$JboPageDescription.renderStarted(oracle.cabo.servlet.BajaContext, oracle.cabo.servlet.Page, oracle.cabo.ui.RenderingContext)
         void oracle.cabo.servlet.ui.UINodePageRenderer.renderPage(oracle.cabo.servlet.BajaContext, oracle.cabo.servlet.Page)
         void oracle.cabo.servlet.AbstractPageBroker.renderPage(oracle.cabo.servlet.BajaContext, oracle.cabo.servlet.Page)
         oracle.cabo.servlet.Page oracle.cabo.servlet.PageBrokerHandler.handleRequest(oracle.cabo.servlet.BajaContext)
         void oracle.cabo.servlet.UIXServlet.doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
         void javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
              HttpServlet.java:740
         void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
              HttpServlet.java:853
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
              ServletRequestDispatcher.java:721
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(javax.servlet.ServletRequest, javax.servlet.http.HttpServletResponse)
              ServletRequestDispatcher.java:306
         boolean com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.ApplicationServerThread, com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.EvermindHttpServletRequest, com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.EvermindHttpServletResponse, java.io.InputStream, java.io.OutputStream, boolean)
              HttpRequestHandler.java:767
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(java.lang.Thread)
              HttpRequestHandler.java:259
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run()
              HttpRequestHandler.java:106
         void EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run()
              PooledExecutor.java:803
         void java.lang.Thread.run()
              Thread.java:484
    ## Detail 0 ##
    java.lang.NullPointerException
         void oracle.jbo.client.Configuration.registerConnectionsFromDocument()
              Configuration.java:860
         void oracle.jbo.client.Configuration.loadFromStream(java.io.InputStream)
              Configuration.java:248
         void oracle.jbo.client.Configuration.loadFromClassPath(java.lang.String)
              Configuration.java:308
         oracle.jbo.common.ampool.ApplicationPool oracle.jbo.common.ampool.PoolMgr.createPool(java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
              PoolMgr.java:272
         oracle.jbo.common.ampool.ApplicationPool oracle.jbo.common.ampool.PoolMgr.findPool(java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
              PoolMgr.java:457
         oracle.jbo.common.ampool.ApplicationPool oracle.jbo.common.ampool.ContextPoolManager.findPool(java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
              ContextPoolManager.java:166
         oracle.jbo.common.ampool.ApplicationPool oracle.jbo.uicli.mom.JUMetaObjectManager.createPool(java.lang.String, java.util.Properties)
              JUMetaObjectManager.java:471
         oracle.jbo.common.ampool.SessionCookie oracle.jbo.http.HttpContainer.findSessionCookie(javax.servlet.http.HttpSession, java.lang.String, java.lang.String, java.util.Properties)
              HttpContainer.java:638
         oracle.jbo.common.ampool.SessionCookie oracle.cabo.data.jbo.servlet.RootAppModuleRegistryImpl.getSessionCookie(oracle.cabo.servlet.BajaContext, oracle.cabo.data.jbo.def.RootAppModuleDef)
         oracle.jbo.ApplicationModule oracle.cabo.data.jbo.servlet.RootAppModuleRegistryImpl.useRootAppModule(oracle.cabo.servlet.BajaContext, oracle.cabo.data.jbo.def.RootAppModuleDef)
         oracle.jbo.ApplicationModule oracle.cabo.data.jbo.servlet.RootAppModuleRegistryImpl.useRootAppModule(oracle.cabo.servlet.BajaContext, java.lang.String)
         void oracle.cabo.data.jbo.servlet.RootAppModuleRegistryImpl.useAll(oracle.cabo.servlet.BajaContext)
         void oracle.cabo.data.jbo.xml.parse.JboParserExtensionImpl$JboPageDescription.renderStarted(oracle.cabo.servlet.BajaContext, oracle.cabo.servlet.Page, oracle.cabo.ui.RenderingContext)
         void oracle.cabo.servlet.ui.UINodePageRenderer.renderPage(oracle.cabo.servlet.BajaContext, oracle.cabo.servlet.Page)
         void oracle.cabo.servlet.AbstractPageBroker.renderPage(oracle.cabo.servlet.BajaContext, oracle.cabo.servlet.Page)
         oracle.cabo.servlet.Page oracle.cabo.servlet.PageBrokerHandler.handleRequest(oracle.cabo.servlet.BajaContext)
         void oracle.cabo.servlet.UIXServlet.doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
         void javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
              HttpServlet.java:740
         void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
              HttpServlet.java:853
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
              ServletRequestDispatcher.java:721
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(javax.servlet.ServletRequest, javax.servlet.http.HttpServletResponse)
              ServletRequestDispatcher.java:306
         boolean com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.ApplicationServerThread, com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.EvermindHttpServletRequest, com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.EvermindHttpServletResponse, java.io.InputStream, java.io.OutputStream, boolean)
              HttpRequestHandler.java:767
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(java.lang.Thread)
              HttpRequestHandler.java:259
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run()
              HttpRequestHandler.java:106
         void EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run()
              PooledExecutor.java:803
         void java.lang.Thread.run()
              Thread.java:484

  • Jar file and classpath problem

    I0m writing a program that use the kunststoff.jar Look&Feel.
    Now I would like to put all I'm writing into a jar file but I always have a NoClassFoundException when I try to start my application.
    here is a MANIFEST:ME I'm using:
    Manifest-Version: 1.0
    Created-By: 1.4.2-beta (Sun Microsystems Inc.)
    Main-Class: JListaR.JListaR
    Class-Path: kunststoff.jar img\ .why this don't work?

    Unfortunately you can't embed jars within a jar and
    expect them to be referencable for the classpath from
    outside the main jar. The "Class-Path" attribute in
    the manifest is used to refer to other jar files
    outside of your jar file.
    The usual approach to solve this problem is to unpack
    the jar files you want to embed and then rejar
    everything together in one big jar file again. This
    isn't always a great approach though, I know I'm
    looking for an alternative. So far my only alternative
    is dynamic class loading using a classloader, however
    this isn't great if you need to refer to several
    hundreds or even thousands of classes.thank you very mach...now I understand because it dosen't work correctly!

  • CLASSPATH and JDBC Drivers in a Jar File

    Hi all, I am creating an application in JDev that uses JDBC to connect to a 10g database. I am deploying my application to a jar and running it on the database server using the jdk installed with the database. $ORACLE_HOME/jdk/bin I want to also use the jdbc driver installed in $ORACLE_HOME/jdbc/lib instead of including the driver in my application jar file. How can I cause my jar file to find the jdbc lib?
    Can I register it directly with the DriverMannager using the file? My app knows the $ORACLE_HOME.
    Or do I just include the jdbc driver in my jar?
    John

    I was hoping it would be that easy. But I am still having problems. Here is my setup.
    export MON_JAVA="$ORACLE_HOME/jdk/bin/java -classpath /u01/app/oracle/product/10.2.0/db_1/jdbc/lib/ojdbc14.jar"
    $MON_JAVA -jar PMonitor.jar -c trace
    and I get this error when connecting to the database.
    Exception in thread "main" java.lang.NoClassDefFoundError: oracle/jdbc/OracleDriver
    I also tried the classes.jar with the same results.

  • What are the basic .jar files to be set in web dynpro project classpath

    Hi,
    I am having a problem while customizing the ESS. I used DTR, DC and imported configuration. After that, I created project from one of the DC(say ess/jp/addr). Later when I open an iView from any Web Dynpro component, I am getting lot of errors without even making any modifications.
    I closed the project and reopened it and reload & rebuilt, but it doesn't solved my problem. In my classpath settings I couldn't find any jar files except the jre_lib. Could you please let me know what are the basic jar files we have to set in classpath and where to get them from. We are using NWDS 7.0.06 version.
    Can you please let me know how to solve this or any other way to work around this.
    It's an urgent to be fixed as early as possible, plz help me out.
    Thanks & Regards,
    Raj

    Hi Julien,
    Thanks for your reply.
    We imported the the specified SCAs in our track.
    we are getting the following errors.
    Kind Status Priority Description Resource In Folder Location
    Error The import com.sap.xss.per cannot be resolved CcPerAddressInterface.java NS1_XSSTR_Dessusaddrsap.com/gen_wdp/packages/com/sap/xss/hr/per/us/address/cc line 18
    Error com.sap.pcuigp cannot be resolved (or is not a valid type) for the argument fpm of the method loadConfiguration CcPerAddressInterface.java NS1_XSSTR_Dessusaddrsap.com/gen_wdp/packages/com/sap/xss/hr/per/us/address/cc line 113
    Error com.sap.pcuigp cannot be resolved (or is not a valid return type) for the method getNextPerspective CcPerAddressInterface.java NS1_XSSTR_Dessusaddrsap.com/gen_wdp/packages/com/sap/xss/hr/per/us/address/cc line 127
    Error com.sap.pcuigp cannot be resolved (or is not a valid type) for the argument currentPerspective of the method getNextPerspective CcPerAddressInterface.java NS1_XSSTR_Dessusaddrsap.com/gen_wdp/packages/com/sap/xss/hr/per/us/address/cc line 127
    Error com.sap.pcuigp cannot be resolved (or is not a valid return type) for the method getCAPState CcPerAddressInterface.java NS1_XSSTR_Dessusaddrsap.com/gen_wdp/packages/com/sap/xss/hr/per/us/address/cc line 137
    Error com.sap.pcuigp cannot be resolved (or is not a valid type) for the argument perspective of the method getCAPState CcPerAddressInterface.java NS1_XSSTR_Dessusaddrsap.com/gen_wdp/packages/com/sap/xss/hr/per/us/address/cc line 137
    we manually set below .jar files in classpath settings.
    pcuixssfpm.jar
    pcuixssutils.jar
    logging.jar
    essper.jar
    Is there any alternative to work around.
    Thanks & Regards,
    Raj

Maybe you are looking for

  • A question regarding authorisation policies in OIM 11g

    Hi, I went through the list of OOTB Authorization policies in OIM 11g, just to know what all permissions were given to the 'ALL USERS' role which will be assigned to any OIM user by default. Below two policies are of a bit confusion to me. It would b

  • Multiple Language Printing in Smartforms

    Hi Friends , System is Unicode enabled , i have created a standard text ( through Tcode - SO10 ) in CHINESE ( logon language - EN only ). When i call it in my Smartforms it is displaying like boxes ( garbage ) and if i call same in sapscript then it

  • UCM10gR3 - find empty fields

    Hello, I want to find all records with empty custom metadata field. We use RIDC API for integration with our application. We tried to use <NOT> (dDocAccount <matches> `*`), but it didn't work. Do you have some Idea? Thanks Martin

  • Safari suddenly won't work

    I have used safari for years and never had a problem. Now, I click on the icon in the dock, it bounces a few times and get either nothing or a white screen. The toolbar appears to be there but nothing works. I have changed nothing. Safari now works n

  • Airport and firewire drive

    A few days ago the airport signal is grayed out when I am running from my firewire drive. I tryed a different firewire drive and it was the same. Next I tryed a different Powerbook with both drives and it too was the same, grayed out in the menubar.