Which of these 3 locations should Java3D be kept in?

209 views Asked by At

Right now I'm trying to get Java3D to work with JDK 1.8.0 in Eclipse on OS X. I've tried following this tutorial (among many others) and am finding varying levels of no success. I believe part of the problem is that there are currently 3 separate locations with the Java3D .jars are ending up on the build path:

  • /Library/Java/Extensions/ as a part of the JRE system library
  • /System/Library/Java/Extensions/ as a part of the JRE system library
  • My personal libraries folder as external included .jar files

Earlier in project development, I hadn't updated the files in the Library folders (they were whatever came with the Mac), and in that case there were no Eclipse errors, but the project could not be run (UnsatisfiedLinkError: no j3dcore-ogl in java.library.path)

Now that I've updated both of the JRE system library .jar files, the code has errors: Access restriction: The type '...' is not API (restriction on required library '/Library/Java/Extensions/j3dcore.jar')

What's the proper way to clean up all these locations so that the project only references one set of these .jars, and where should these .jar's be?

1

There are 1 answers

1
gouessej On

There is only one way to clean up: uninstall all those obsolete versions of Java3D provided by Apple ("whatever came with the Mac") and follow my instructions.

The extension mechanism has been removed from Java 1.9, relying on it is a very bad idea. Only use a carefully chosen "personal libraries folder" whose scope affects only your application and not the rest of the operating system.

If you need some help on Java3D, rather use its official forum.