deploying jogl.dll in jar file?

Hi,
I’m pleased to inform that my jogl application is close to being deployable. Thank you all for your help so far.
My next question is:
Is there a way to deploy my application in a jar file along with the jogl dll files?
e.g. with web start?
I want people to be able to launch my application without having to manually installing jogl first.
Can I have the windows, mac, and linux library files on my web server, then when the user clicks on the application link, it dynamically downloads and installs the appropriate library file for that particular platform, then launches my app?
Any suggestions would be gratefully appreciated.
Thanks
-Jeroen
:slight_smile:

It’s not jogl, but here is the jnlp for cosmic trip which uses LWJGL:


<?xml version="1.0" encoding="utf-8"?> 
<!-- JNLP File --> 
<jnlp 
  spec="1.0+" 
  codebase="http://www.mycgiserver.com/~movegaga/" 
  href="cosmictrip.jnlp"> 
  <information> 
    <title>Cosmic Trip</title> 
    <vendor>Move GA*GA</vendor> 
    <homepage href="http://www.mycgiserver.com/~movegaga/"/> 
    <description>3D shoot-em up.</description> 
    <description kind="short">3D shoot-em up.</description> 
    <icon href="ico_ct.gif"/>
    <offline-allowed/> 
  </information> 
  <security> 
      <all-permissions/> 
  </security>
  <resources> 
    <j2se version="1.4+"/> 
    <jar href="GLGame1.jar"/>
    <jar href="Music1.jar"/>
    <jar href="Sound1.jar"/>
    <jar href="Graphics.jar"/>
    <jar href="lwjgl.jar"/>
  </resources> 
  <resources os="Windows">
    <nativelib href="lwjgl_win.jar"/>
  </resources> 
  <resources os="Linux">
    <nativelib href="lwjgl_rh8.jar"/>
  </resources> 
  <application-desc main-class="net.movegaga.GameWindow"/> 
</jnlp>

The windows .dll is in lwjgl_win.jar, the linux .so one in lwjgl_rh8.jar. You should do the same thing with the jogl native libs.

Now, bring on your web startable app :slight_smile:

EDIT: Don’t forget to create a key using the keytool and sign all your jars using jarsigner.

Erik

Heres the jnlp I use for S-Type, which in turn is largly pinched from Kev’s rather good webstart tutorial ( http://www.cokeandcode.com/info/webstart-howto.html )


<?xml version="1.0" encoding="utf-8"?>

<!-- VScript Editor Webstart Script -->

<jnlp
spec="1.0+"
codebase="http://co-project.lboro.ac.uk/users/cojc5/Webstart"
href="SType.jnlp">

<information>
      <title>S-Type</title>
      <vendor>Orangy Tang Studios</vendor>
      <homepage href="http://studenti.lboro.ac.uk/~cojc5/"/>
      <description>S-Type</description>
      <icon href="icon.gif"/>
      <offline-allowed/>
</information>

<security>
      <all-permissions/>
</security>

<resources>
      <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/>
      <jar href="VScriptEngine.jar" main="true"/>
      <jar href="Data.jar"/>
      <jar href="Library/KunststoffLookAndFeel.jar"/>
</resources>

      <resources os="Linux">
            <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/>
            <jar href="Library/JoglLinux.jar"/>
            <nativelib href="Library/JoglLinuxNative.jar"/>
      </resources>
      
      <resources os="Mac OS">
            <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/>
            <jar href="Library/JoglMacOSX.jar"/>
            <nativelib href="Library/JoglMacOSXNative.jar"/>
      </resources>
      
      <resources os="Solaris" arch="sparc">
            <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/>
            <jar href="Library/JoglSolaris.jar"/>
            <nativelib href="Library/JoglSolarisNative.jar"/>
      </resources>

      <resources os="Windows">
            <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/>
            <jar href="Library/JoglWin32.jar"/>
            <nativelib href="Library/JoglWin32Native.jar"/> 
      </resources>

<application-desc main-class="com.vscript.core.VScript">
      <argument>scene=Data/Scenes/sType_TestWorld01.scene</argument>
      <argument>-renderEditorMode</argument>
      <argument>-useSimpleFramebuffer</argument>
      <argument>+useScissorTest</argument>
      <argument>+useHardwareColouredLighting</argument>
      <argument>-showWireframe</argument>
</application-desc>

</jnlp>

All native libs need to be jar’ed up for webstart deployment, usually one jar for each native file keeps things nice and manageable I find.

Wonderful! ;D
Thanks for your excellent suggestions, Erik and Orangy Tang.
Much appreciated.
Will let you know when it’s online.
Thanks again.
:slight_smile:
-Jeroen