Re: Migrating Java 3D to Maven, and publishing Maven artifacts

Posted by gouessej on
URL: https://forum.jogamp.org/Java-3D-Use-Maven-to-build-and-publish-Maven-artifacts-tp4035555p4035818.html

Hi

ctrueden wrote
Hi Julien,

> the extension mechanism has been dropped in Java 1.9, you'll have to
> make some other changes to go on using AppleScript.

AppleScript was just an example—the main point is that Oracle Java adds /System/Library/Java/Extensions to the java.ext.path by default, which makes it impossible to use Java 3D 1.6. And manually controlling the java.ext.path:

1. Might not be possible in some deployment environments; and
2. Requires you to manually specify all other needed directories—in particular, the JRE's lib/ext folder.
It's possible to remove some JARs from the classpath at runtime but it must be done very early. The point is OpenJDK and Oracle Java 1.9 have no notion of extension mechanism anyway. Another solution consists in stopping to rely on it right now by adding the JARs that you were accustomed to refer to under the hood explicitly into your classpath and setting java.ext.path to "". I can help you to fix a few corner cases. What do you think about this solution?

ctrueden wrote
> That's why another solution consists in changing nothing within
> Java3D. You can bundle your own JRE with your software.

Bundling your own JRE is insufficient on OS X, because your bundled Oracle JRE adds /System/Library/Java/Extensions to the extensions path by default, preventing use of Java 3D 1.6.
You can use OpenJDK 1.9.

ctrueden wrote
> - Java3D 1.6 pre 13 remains frozen
...
> Java3D 1.7 uses another namespace instead of "javax.media"

I really like this idea! However, given the rate things are going with Java 3D these days, I cannot afford to hold my breath for Java 3D 1.7—nor even to invest the energy required to push for it over the next months.

I receive multiple bug reports each month relating to Java 3D + Java 8 incompatibility; users need it fixed ASAP. So for the time being, I will keep maintaining the org.scijava fork, with updated package prefixes: org.scijava.java3d and org.scijava.vecmath.

In the meantime, if there anything I can do to help move Java 3D forward on the Maven front etc., the JogAmp team is welcome to contact me via email.
I can help you to find a satisfying workaround. Blacklisting the old craps would allow to solve your problem within Java3D without any major changes. Where is your bug tracker?
Julien Gouesse | Personal blog | Website