Results 1 to 2 of 2
  1. #1
    fred is offline Member
    Join Date
    Jul 2007
    Posts
    41
    Rep Power
    0

    Default Doubt with classpath

    I have my java project compiled as test.jar.

    This project need other jars : if I want to launch my jar, what is the correct syntax to include in java -classpath directive other jars?



    java -classpath C:\java\lib\JavaDde.jar;C:\java\lib\joc-v2.0.5-eval.jar; -jar C:\test.jar

    This doesn't work, any ideas?

  2. #2
    simon is offline Member
    Join Date
    Jul 2007
    Posts
    44
    Rep Power
    0

    Default

    you need to put the java main class target so the JVM knows which class to execute.

    java -classpath C:\java\lib\JavaDde.jar:C:\java\lib\joc-v2.0.5-eval.jar: -jar C:\test.jar Test

Similar Threads

  1. Replies: 3
    Last Post: 08-14-2009, 12:57 PM
  2. Set classPath?
    By rgbosque in forum New To Java
    Replies: 3
    Last Post: 02-07-2008, 02:14 PM
  3. GNU Classpath 0.96.1
    By JavaBean in forum Java Software
    Replies: 0
    Last Post: 11-01-2007, 04:14 PM
  4. GNU Classpath 0.96
    By JavaBean in forum Java Software
    Replies: 0
    Last Post: 10-16-2007, 06:35 PM
  5. Adding JARs to the classpath at runtime?
    By johann_p in forum Advanced Java
    Replies: 1
    Last Post: 06-26-2007, 10:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •