AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only
  • 1.  export var="-DJava.class.path"

    Posted Wed January 17, 2007 08:51 PM

    Originally posted by: SystemAdmin


    Hi,

    I wanted to know what export var="-DJava.class.path" mean ? What happens if we set the classpath as above ?

    Thanks, Deepak


  • 2.  Re: export var="-DJava.class.path"

    Posted Thu January 18, 2007 10:09 AM

    Originally posted by: SystemAdmin


    Normally I set the classpath for AIX Java in one of these ways:
    -cp <fullpath>
    -classpath <fullpath>
    export CLASSPATH=<fullpath>

    the -DJava.class.path does not work the same way. For example:

    $ java -cp /code/java/test heaptest/HeapTest
    java HeapTest <numThreads> <num of (CPU + Heap) cycles> (class is found)
    $ java -DJava.class.path /code/java/test heaptest/HeapTest
    The java class is not found: /code/java/test (class is not found)

    However when I do a search of javacore files that were created for Oracle I do see that people include both this and the CLASSPATH:

    CLASSPATH=:/opt/oracle/product/9.2.0/jdbc/lib/classes12.zip
    -Djava.class.path=:/opt/oracle/product/9.2.0/jdbc/lib/classes12.zip

    A quick google shows that:

    Djava.class.path=...: This specifies all the JAR files that need to be in the CLASSPATH. Note that the Web Server itself has been packaged into the webserver.jar file. You can either package your classes into a JAR file or specify the current working directory using the "-current" parameter (later).

    The more appropriate forum for this is the IBM Java and Runtimes Forumm at:
    http://www-128.ibm.com/developerworks/forums/dw_forum.jsp?forum=367&cat=10