schievelbein
April 20th, 2012, 05:52 PM
I have installed the latest Java according to the stickies.
I can run the Helloworld included and it runs fine, so JAVA is installed correctly. The problem is with Java3D, I have installed it, but I do not think that the ClassPath is set correctly or something.I am trying to run the following Hello3d.java program and get the error that follows. Can anyone give me any idea of what to do to correct this? What commands should I run to verify Classpath and other settings?
import com.sun.j3d.utils.universe.SimpleUniverse;
import com.sun.j3d.utils.geometry.ColorCube;
import javax.media.j3d.BranchGroup;
public class Hello3d {
public Hello3d()
{
SimpleUniverse universe = new SimpleUniverse();
BranchGroup group = new BranchGroup();
group.addChild(new ColorCube(0.3));
universe.getViewingPlatform().setNominalViewingTra nsform();
universe.addBranchGraph(group);
}
public static void main( String[] args ) {
new Hello3d();
}
} // end of class Hello3d
$ javac Hello3d.java
Hello3d.java:1: package com.sun.j3d.utils.universe does not exist
import com.sun.j3d.utils.universe.SimpleUniverse;
^
Hello3d.java:3: package com.sun.j3d.utils.geometry does not exist
import com.sun.j3d.utils.geometry.ColorCube;
^
Hello3d.java:5: package javax.media.j3d does not exist
import javax.media.j3d.BranchGroup;
^
Hello3d.java:13: cannot find symbol
symbol : class SimpleUniverse
location: class Hello3d
SimpleUniverse universe = new SimpleUniverse();
^
Hello3d.java:13: cannot find symbol
symbol : class SimpleUniverse
location: class Hello3d
SimpleUniverse universe = new SimpleUniverse();
^
Hello3d.java:15: cannot find symbol
symbol : class BranchGroup
location: class Hello3d
BranchGroup group = new BranchGroup();
^
Hello3d.java:15: cannot find symbol
symbol : class BranchGroup
location: class Hello3d
BranchGroup group = new BranchGroup();
^
Hello3d.java:17: cannot find symbol
symbol : class ColorCube
location: class Hello3d
group.addChild(new ColorCube(0.3));
^
8 errors
I can run the Helloworld included and it runs fine, so JAVA is installed correctly. The problem is with Java3D, I have installed it, but I do not think that the ClassPath is set correctly or something.I am trying to run the following Hello3d.java program and get the error that follows. Can anyone give me any idea of what to do to correct this? What commands should I run to verify Classpath and other settings?
import com.sun.j3d.utils.universe.SimpleUniverse;
import com.sun.j3d.utils.geometry.ColorCube;
import javax.media.j3d.BranchGroup;
public class Hello3d {
public Hello3d()
{
SimpleUniverse universe = new SimpleUniverse();
BranchGroup group = new BranchGroup();
group.addChild(new ColorCube(0.3));
universe.getViewingPlatform().setNominalViewingTra nsform();
universe.addBranchGraph(group);
}
public static void main( String[] args ) {
new Hello3d();
}
} // end of class Hello3d
$ javac Hello3d.java
Hello3d.java:1: package com.sun.j3d.utils.universe does not exist
import com.sun.j3d.utils.universe.SimpleUniverse;
^
Hello3d.java:3: package com.sun.j3d.utils.geometry does not exist
import com.sun.j3d.utils.geometry.ColorCube;
^
Hello3d.java:5: package javax.media.j3d does not exist
import javax.media.j3d.BranchGroup;
^
Hello3d.java:13: cannot find symbol
symbol : class SimpleUniverse
location: class Hello3d
SimpleUniverse universe = new SimpleUniverse();
^
Hello3d.java:13: cannot find symbol
symbol : class SimpleUniverse
location: class Hello3d
SimpleUniverse universe = new SimpleUniverse();
^
Hello3d.java:15: cannot find symbol
symbol : class BranchGroup
location: class Hello3d
BranchGroup group = new BranchGroup();
^
Hello3d.java:15: cannot find symbol
symbol : class BranchGroup
location: class Hello3d
BranchGroup group = new BranchGroup();
^
Hello3d.java:17: cannot find symbol
symbol : class ColorCube
location: class Hello3d
group.addChild(new ColorCube(0.3));
^
8 errors