Hi guys I'm trying to get into Java3D by implementing <http://www.java3d.org/starting.html>, to start with: import com.sun.j3d.utils.geometry.*; import com.sun.j3d.utils.universe.*; import javax.media.j3d.*; public class Hello3D { public Hello3D() { 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 ) { System.setProperty("sun.awt.noerasebackground", "true"); new Hello3D(); } } I added j3dcore.jar, j3dutils.jar, and vecmath.jar from /deployment/java3d/1.6.0-final/jogamp-java3d.7z to my project. Furthermore I added jog-all, gluegen-rt and gluegen-rt-natives-macosx-universal from /deployment/jogamp-current/jar. I am using a MacBook Pro 64bit with MacOS 10.15.5 Catalina and IntelliJ IDEA. When I run main, I get this exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: /Users/Denis/Documents/Java/Workspace/Sandbox 3D/natives/macosx-universal//gluegen-rt at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1825) at java.lang.Runtime.load0(Runtime.java:809) at java.lang.System.load(System.java:1086) at com.jogamp.common.jvm.JNILibLoaderBase.loadLibraryInternal(JNILibLoaderBase.java:624) at com.jogamp.common.jvm.JNILibLoaderBase.access$000(JNILibLoaderBase.java:63) at com.jogamp.common.jvm.JNILibLoaderBase$DefaultAction.loadLibrary(JNILibLoaderBase.java:106) at com.jogamp.common.jvm.JNILibLoaderBase.loadLibrary(JNILibLoaderBase.java:487) at com.jogamp.common.os.DynamicLibraryBundle$GlueJNILibLoader.loadLibrary(DynamicLibraryBundle.java:421) at com.jogamp.common.os.Platform$1.run(Platform.java:317) at java.security.AccessController.doPrivileged(Native Method) at com.jogamp.common.os.Platform.<clinit>(Platform.java:287) at com.jogamp.opengl.GLProfile.<clinit>(GLProfile.java:147) at jogamp.opengl.ThreadingImpl$1.run(ThreadingImpl.java:83) at jogamp.opengl.ThreadingImpl$1.run(ThreadingImpl.java:66) at java.security.AccessController.doPrivileged(Native Method) at jogamp.opengl.ThreadingImpl.<clinit>(ThreadingImpl.java:66) at com.jogamp.opengl.Threading.disableSingleThreading(Threading.java:164) at javax.media.j3d.JoglPipeline.initialize(JoglPipeline.java:129) at javax.media.j3d.Pipeline.createPipeline(Pipeline.java:92) at javax.media.j3d.MasterControl.loadLibraries(MasterControl.java:858) at javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:267) at Hello3D.<init>(Hello3D.java:10) at Hello3D.main(Hello3D.java:21) What am I doing wrong? By the way: I couldn't use the jars "jogl-all.jar", "gluegen-rt.jar", and "gluegen-rt-natives-macosx-universal.jar" as project libraries, because then I got those build exceptions: Error:java: error reading /Users/Denis/Documents/Java/Workspace/Sandbox 3D/lib/jogl-all.jar; error in opening zip file Error:java: error reading /Users/Denis/Documents/Java/Workspace/Sandbox 3D/lib/gluegen-rt.jar; error in opening zip file Error:(1, 1) java: cannot access unnamed package Error reading file /Users/Denis/Documents/Java/Workspace/Sandbox 3D/lib/jogl-all.jar: error in opening zip file I had to extract the contents of the jars and add them as folders to the project library. Many thanx & best regards :-Denis |
Administrator
|
Hello
Sorry, I forgot to reply :s You need jogamp-fat.jar, please strictly follow my instructions: http://gouessej.wordpress.com/2012/08/01/java-3d-est-de-retour-java-3d-is-back/ Ensure that there is no problem of integrity with the files you download. I advise you to run your program without an IDE as a first step. I don't provide instructions for proprietary IDEs.
Julien Gouesse | Personal blog | Website
|
Free forum by Nabble | Edit this page |