I’m trying to turn my JoGL project into a jar. Can someone tell me what I’m doing wrong?
did you do this on your own or in an IDE?
On my own, why?
cause maybe you made a mistake in specifying the main class. cause an IDE aks you which main class you want.
I am not sure on how to do it without an IDE, but if you can, try it with an IDE
like netbeans, bluej, or eclypse.
Nah, I fixed it. had files in wrong jre.
What files?
Don’t ever put jogl/gluegen jars/dlls in a system or JRE folder!
- Your jar will only work on your computer
- You can’t run any webstart app, that uses a different jogl version anymore
Unfortunately solely executable jars are not possible, when using native libraries. Under windows, you can place the dlls in the same folder than the jar as a workaround. This will not work on linux (and mac!?). So you will need a start script for every platform that contains a -Djava.library.path=“path/to/the/folder/containing/the/natives” argument in your java call.
Another option would be to use webstart.
Making your JAR with ANT or in command line with the command jar -cmvf works fine too.
what I maent was, have a program do it for you.
when I meant by yourself, I meant make a zip with the stuff and rename to jarg
How do I use JoGL with webstart? That’s what I want to do in the end result.
Best would be to specify the location of the JOGL extension as resource dependency:
<?xml version="1.0" encoding="UTF-8"?>
<jnlp codebase="http://www.yourorg.org/path/to/app/download" href="launch.jnlp" spec="1.0+">
<information>
<title>JOGL Web Start Template</title>
<vendor>cylab</vendor>
<homepage href="http://www.yourorg.org/path/to/app/description"/>
<description kind="short">Starts a JOGL Application via webstart</description>
<description>Starts a JOGL Application via webstart and uses the official JOGL webstart extension</description>
</information>
<resources>
<j2se version="1.5+"/>
<jar eager="true" href="YourProject.jar" main="true"/>
<extension href="http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl.jnlp" name="jogl"/>
</resources>
<application-desc main-class="org.yourorg.yourproject.YourMainClass">
</application-desc>
</jnlp>
Replace the codebase, package , class and jar name with the equivalents from your project and you are done.