As you may know, when you run a Java application, the JVM uses at least 3 classloaders: the bootstrap classloader, the extension classloader and the application classloader (which loads the classes in the classpath). When using JNLP in an applet or in an application, the JVM uses one more classloader. It is even more complicated when using a servlet container or a module system.
This is what I mean by "installed extensions":http://docs.oracle.com/javase/tutorial/ext/basics/install.html
I sometimes use Java3D 1.6.0 and I often use JogAmp (especially JOGL and JOAL). Some developers complain about Apple going on shipping an obsolete version of Java3D as an extension which is loaded by default before the version available in the classpath, it obviously causes some conflicts.
As far as I know, there is a property allowing to override the set of directories used to find the extensions to load, this property is called "java.ext.dirs". I've looked at the source code of OpenJDK:http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/sun/misc/Launcher.java#166
Setting it to "" should solve my problem, the obsolete version of Java3D shouldn't be picked if there is no directory denoted in java.ext.dirs. However, a developer under OS X goes on complaining that it doesn't work but as he hasn't given me any information about the version of OS X and the JVM, I don't know what to do. I can try to reproduce his "bug" on a Mac but if it reproducible only with a particular version of Java and/or OS X, I won't succeed. Please can some Mac OS X users confirm whether this property is honored with OpenJDK and/or Oracle Java?
As far as I know, it can be set as a JVM option in command line, in a JNLP file or just very early in the program by calling System.setProperty("java.ext.dirs", "").