Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

On my Mac, I can easily compile a Java project using Java3D. On a plain Maverick with default-jdk, I get a lot of errors:

./DreiDimAnsicht.java:52: cannot find symbol
symbol  : class Canvas3D
location: class DreiDimAnsicht
        Canvas3D canvas = new Canvas3D(config); 
                              ^

So I installed the libjava3d-java package but it gives me the exact same error messages. Since I want to use Launchpad's build service, I cannot just install some stuff on my machine to get it to work. Is there some package that I can install to get the compilation to work?

I compile it with a plain javac MainClass.java.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

You have to add the jars to the classpath when compiling and when running the final jar file with the application.

When compiling:

javac -cp /usr/share/java/j3dcore.jar:/usr/share/java/j3dutils.jar:/usr/share/java/vecmath.jar MainClass.jar

To specify the classpath when running the jar, put the classpath in the manifest file. Add the following line:

Class-Path: /usr/share/java/j3dcore.jar /usr/share/java/j3dutils.jar /usr/share/java/vecmath.jar
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.