I am trying to compile a simple java applet from the examples of JUNG. I was desperate enough to try adding everything in the classpath.
$ javac -cp collections-generic-4.01.jar -cp colt-1.2.0.jar
-cp concurrent-1.3.4.jar -cp j3d-core-1.3.1.jar -cp jung-3d-2.0.1-sources.jar
-cp jung-3d-2.0.1.jar -cp jung-3d-demos-2.0.1-sources.jar -cp jung-3d-demos-2.0.1.jar
-cp jung-algorithms-2.0.1-sources.jar -cp jung-algorithms-2.0.1.jar
-cp jung-api-2.0.1-sources.jar -cp jung-api-2.0.1.jar
-cp jung-graph-impl-2.0.1-sources.jar -cp jung-graph-impl-2.0.1.jar
-cp jung-io-2.0.1-sources.jar -cp jung-io-2.0.1.jar -cp jung-jai-2.0.1-sources.jar
-cp jung-jai-2.0.1.jar -cp jung-jai-samples-2.0.1-sources.jar
-cp jung-jai-samples-2.0.1.jar -cp jung-samples-2.0.1-sources.jar
-cp jung-samples-2.0.1.jar -cp jung-visualization-2.0.1-sources.jar
-cp jung-visualization-2.0.1.jar -cp stax-api-1.0.1.jar -cp vecmath-1.3.1.jar
-cp wstx-asl-3.2.6.jar
But the result is always the same.
edu/uci/ics/jung/samples/AddNodeDemo.java
edu/uci/ics/jung/samples/AddNodeDemo.java:13: package edu.uci.ics.jung.algorithms.layout does not exist
import edu.uci.ics.jung.algorithms.layout.AbstractLayout;
^
edu/uci/ics/jung/samples/AddNodeDemo.java:14: package edu.uci.ics.jung.algorithms.layout does not exist
import edu.uci.ics.jung.algorithms.layout.FRLayout;
^
And much more…
Please note that I know nothing about java.
You cannot do multiple
-cpswitches like that. Combine them likejava -cp one:two:threeon Linux/OSX andjava -cp one;two;threeon Windows.If you are actually interested in learning java, check out compiling with Ant.