Login  Register

Re: Beginner Deployment Questions

Posted by Wade Walker on Jan 26, 2014; 6:48pm
URL: https://forum.jogamp.org/Beginner-Deployment-Questions-tp4031359p4031362.html

cinolt wrote
Now the problem is how 3rd party libraries come into the picture. I know with asm/C/C++ you  simply statically link the libraries or provide DLL's for them. How is this usually handled with Java?
Depends on what form the third-party library is provided in. If the library is a JAR, you can:

1. Include that JAR with your app distribution, side-by-side with your own as a separate file.
2. Unpack that JAR and repack its contents into your own (may violate the license of the third-party library)
3. Pack that JAR inside your JAR (requires special treatment to load its contents at runtime)

If the third-party library is a dll/so/dylib, you can:

1. Include them in your app distribution, side-by-side with your files. When you call loadLibrary() you just give it the path to your own program's directory.
2. Pack them into your JAR, then unpack them into a temp directory when your program runs (this is what JOGL does).