jogamp
›
java3d
Login
Register
Re: Java3D Version detection
Posted by
philjord
on
Dec 20, 2016; 8:02pm
URL:
https://forum.jogamp.org/Java3D-Version-detection-tp4037543p4037544.html
VirtualUniverse provides this via the getProperties() method
So
String versionString = (String) VirtualUniverse.getProperties().get("j3d.version");
System.out.println("versionString " +versionString);
Will output something like
versionString 1.7.0_pre2
Note that output is for the 1.7.0 version, which is simplified a little.
If you wrap the VirtualUniverse is a try catch for ClassNotFoundException that will tell you if they have the Java3D jars on the classpath, obviously.
For more info see
https://github.com/hharrison/java3d-core/blob/master/src/javax/media/j3d/VirtualUniverse.java#L552-L582
and
https://github.com/hharrison/java3d-core/blob/master/build-tools/VersionInfo.java#L225
Free forum by Nabble
Edit this page