Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>When you specify jars in the classpath you can't just specify the directory they're in, you need to list the jars explicitly (the change Jon Skeet refers to in jdk6 may be a change this but I don't remember it either).</p> <p>I wouldn't put those jars in the jdk lib directory. Make a lib directory next to the src directory for your Promomon.java file, add your jars to that, and list the jars individually in the classpath when you compile and run. And when I say classpath I don't mean the environment variable. Here are some alternatives:</p> <ul> <li>create a couple of executable files that contain the compile and run commands and add the jar files to the list of stuff in the -cp switch. </li> <li>Get ant and make a build.xml file. </li> <li>Use an IDE like eclipse and specify the jars (in the Eclipse menu pick File->BuildPath->Configure Build Path and pick the "Libraries" tab).</li> </ul> <p>Going from "Hello World" to a program that uses third-party libraries is a big step with Java. The simple approach to getting something compiled and running stops working fast.</p> <p>BTW I looked it up <a href="http://download.oracle.com/javase/6/docs/technotes/tools/windows/classpath.html" rel="nofollow noreferrer">here</a> and the JDK6 change is that you can use wildcards in the classpath, so instead of listing the jars individually like</p> <pre><code>-cp=/usr/myapp/classes:/usr/myapp/lib/foo.jar:/usr/myapp/lib/bar.jar </code></pre> <p>you can say</p> <pre><code>-cp=/usr/myapp/classes:/usr/myapp/lib/*.jar </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload