Re: Java 3D in eclipse Mac OSX not functioning
Posted by
jmaasing on
Feb 02, 2015; 1:20pm
URL: https://forum.jogamp.org/Java-3D-in-eclipse-Mac-OSX-not-functioning-tp4033010p4033978.html
def: Executable JAR is a jar you can run using 'java -jar myexectuable.jar'
When you use '-jar' the '-cp' argument is ignored:
http://docs.oracle.com/javase/8/docs/technotes/tools/unix/java.html#BABDJJFISo how to handle all the other JAR-files your project needs?
There are two 'clean' ways:
1) Package your application as a ZIP-file, include your executable jar. Then include all the other JAR-files in for example a 'lib' directory. Then you set up the MANIFEST.MF file in your executable JAR to point to the lib-directory. See documentation on MANIFEST.MF for details.
2) Make a "fat"-jar. That means you unpack _all_ jar-files into a single directory and then JAR that directory together. Every class-file ends up in a single JAR-file. This sounds good but it is not without problems. There have been many discussions on these forums about this.
There is an 'unclean' way. Install the dependencies in a boot classpath or 'ext' directory in the JVM. I've heard that jogl has been included in Apple JVM this way. Also, this was a a recommended way to install Java3D a long time ago. This has many, many, many problems with conflicting versions et c since the JVM will favour these classes regardless of what an application packages. This should be avoided at all cost.