compile error: java.lang.UnsatisfiedLinkError: no J3D in java.library.path
I run my first program with 3D graphics in java but it has one exception please help me in solve that. this is my code:
public class Test extends Applet {
public Test() {
SimpleUniverse universe = new SimpleUniverse();
BranchGroup group = new BranchGroup();
group.addChild(new ColorCube(0.3));
universe.getViewingPlatform().setNominalViewingTransform();
universe.addBranchGraph(group);
}
}
public static void main(String[] args) {
// TODO code application logic here
new Test();
}
}
and this is it's error
Exception in thread "main" java.lang.UnsatisfiedLinkError: no J3D in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1028)
at javax.media.j3d.MasterControl$22.run(MasterControl.java:889)
at java.security.AccessController.doPrivileged(Native Method)
at javax.media.j3d.MasterControl.loadLibraries(MasterControl.java:886)
at javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:229)
开发者_运维百科 at test1.Test.<init>(Test.java:26)
at test1.Main.main(Main.java:19)
Java Result: 1
BUILD SUCCESSFUL (total time: 2 seconds)
Some bits of Java3D require native libraries to work.
See here for a description of what's necessary.
Seems like you trying to import a library that doesn't exist, or is in the wrong location.
精彩评论