Classpath Probems with Java on Win95

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Steven Mason

    Classpath Probems with Java on Win95

    Here's my problem. I've certain jar files I've included in my
    classpath that I need to work with. I've included these in my path
    variable so when I type path at the command line I get :

    PATH=C:\WINDOWS \system32;C:\WI NDOWS;C:\WINDOW S\System32\Wbem ;C:\Program
    Files\j2sdk\j2s dk1.4.2\bin;C:\ jwsdp-1.2\jwsdp-shared\bin;=C:\ jwsdp-1.2\webapps\axi s\lib\axis.jar; C:\jwsdp-1.2\webapps\axi s\lib\wsdl4j.ja r;C:\jwsdp-1.2\webapps\axi s\lib\commons-discovery.jar;C :\jwsdp-1.2\webapps\axi s\lib\commons-logging.jar;C:\ jwsdp-1.2\webapps\axi s\lib\jaxrpc.ja r;C:\jwsdp-1.2\webapps\axi s\lib\saaj.jar; C:\jwsdp-1.2\webapps\axi s\lib\log4j-1.2.8.jar;C:\jw sdp-1.2\webapps\axi s\lib\xml-
    pis.jar;C:\jwsd p-1.2\webapps\axi s\lib\xercesImp l.jar;

    However when I run a command like:

    java org.apache.axis .wsdl.WSDL2Java

    I get a class not found error. So I run a batch file with this in it:

    set AXIS_HOME=C:\jw sdp-1.2\webapps\axi s
    set AXIS_LIB=%AXIS_ HOME%\lib
    set AXISCLASSPATH=% AXIS_LIB%\axis. jar;%AXIS_LIB%\ wsdl4j.jar;%AXI S_LIB%\commons-discovery.jar;% AXIS_LIB%\commo ns-logging.jar;%AX IS_LIB%\jaxrpc. jar;%AXIS_LIB%\ saaj.jar;%AXIS_ LIB%\log4j-1.2.8.jar;%AXIS _LIB%\xml-apis.jar;%AXIS_ LIB%\xercesImpl .jar;

    And then when I run java I have to include the -cp option, such as:

    java -cp .;%AXISCLASSPAT H% org.apache.axis .wsdl.WSDL2Java

    And everything works fine. However I'm getting tired of typing out
    the classpath option everytime and I was wondering if anyone had any
    insight on what the problem might be.

    Thanks,
    steve
  • Me

    #2
    Re: Classpath Probems with Java on Win95

    Your path is for searching for executables, not java classes. Set a
    Classpath variable for your jar files.

    Good luck
    Rich

    in article 8a201200.031012 1215.12e94c69@p osting.google.c om, Steven Mason at
    digitalwarrior0 3@yahoo.com wrote on 10/12/03 4:15 PM:
    [color=blue]
    > Here's my problem. I've certain jar files I've included in my
    > classpath that I need to work with. I've included these in my path
    > variable so when I type path at the command line I get :
    >
    > PATH=C:\WINDOWS \system32;C:\WI NDOWS;C:\WINDOW S\System32\Wbem ;C:\Program
    > Files\j2sdk\j2s dk1.4.2\bin;C:\ jwsdp-1.2\jwsdp-shared\bin;=C:\ jwsdp-1.2\webapps
    > \axis\lib\axis. jar;C:\jwsdp-1.2\webapps\axi s\lib\wsdl4j.ja r;C:\jwsdp-1.2\webap
    > ps\axis\lib\com mons-discovery.jar;C :\jwsdp-1.2\webapps\axi s\lib\commons-loggin
    > g.jar;C:\jwsdp-1.2\webapps\axi s\lib\jaxrpc.ja r;C:\jwsdp-1.2\webapps\axi s\lib\s
    > aaj.jar;C:\jwsd p-1.2\webapps\axi s\lib\log4j-1.2.8.jar;C:\jw sdp-1.2\webapps\axi
    > s\lib\xml-
    > pis.jar;C:\jwsd p-1.2\webapps\axi s\lib\xercesImp l.jar;
    >
    > However when I run a command like:
    >
    > java org.apache.axis .wsdl.WSDL2Java
    >
    > I get a class not found error. So I run a batch file with this in it:
    >
    > set AXIS_HOME=C:\jw sdp-1.2\webapps\axi s
    > set AXIS_LIB=%AXIS_ HOME%\lib
    > set
    > AXISCLASSPATH=% AXIS_LIB%\axis. jar;%AXIS_LIB%\ wsdl4j.jar;%AXI S_LIB%\commons-dis
    > covery.jar;%AXI S_LIB%\commons-logging.jar;%AX IS_LIB%\jaxrpc. jar;%AXIS_LIB%\ saa
    > j.jar;%AXIS_LIB %\log4j-1.2.8.jar;%AXIS _LIB%\xml-apis.jar;%AXIS_ LIB%\xercesImpl
    > .jar;
    >
    > And then when I run java I have to include the -cp option, such as:
    >
    > java -cp .;%AXISCLASSPAT H% org.apache.axis .wsdl.WSDL2Java
    >
    > And everything works fine. However I'm getting tired of typing out
    > the classpath option everytime and I was wondering if anyone had any
    > insight on what the problem might be.
    >
    > Thanks,
    > steve[/color]

    Comment

    Working...