JogAmp JAR File Handling: Difference between revisions

From JogampWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 4: Line 4:


Native JAR files are loaded [{{SERVER}}/jogl/doc/userguide/index.html#automatednativelibraryloading automatically].
Native JAR files are loaded [{{SERVER}}/jogl/doc/userguide/index.html#automatednativelibraryloading automatically].
= Applet / JNLP Usage =
* [[Using JOGL in a Java applet|Using JOGL in a Java Applet]]
* [[Using JOGL in Java Web Start|Using JOGL in Java Web Start]]
A short ''copy'' is included in the static page [{{SERVER}}/jogl/doc/deployment/JOGL-DEPLOYMENT.html#TraditionalApplets JOGL Deployment for traditional Applets].


= Custom Bundling =
= Custom Bundling =
Line 76: Line 83:
       Rsrc-Main-Class: Test01
       Rsrc-Main-Class: Test01
       Main-Class: org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader
       Main-Class: org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader
= Applet / JNLP Usage =
* [[Using JOGL in a Java applet|Using JOGL in a Java Applet]]
* [[Using JOGL in Java Web Start|Using JOGL in Java Web Start]]
A short ''copy'' is included in the static page [{{SERVER}}/jogl/doc/deployment/JOGL-DEPLOYMENT.html#TraditionalApplets JOGL Deployment for traditional Applets].

Revision as of 12:18, 13 June 2013

Native JAR Files

See Native JAR Files explained.

Native JAR files are loaded automatically.

Applet / JNLP Usage

A short copy is included in the static page JOGL Deployment for traditional Applets.

Custom Bundling

Eclipse

Native JAR files and their respective base JAR files can be bundled in custom ways, e.g. eclipse Jar-In-Jar etc.

   Manual tested w/ Eclipse:
   
   Preparations:
   ===============
   
   1) Set up a vanilla eclipse (3.7.0) workspace
   
   2) Add the JOGL User Library:
     - Window.Preference
      - Java.Build_Path.User_Libraries:
        + JOGL
           + gluegen-rt.jar
           + jogl.all.jar
           + gluegen-rt-natives-linux-amd64.jar
           + jogl-all-natives-linux-amd64.jar
   
           You may add all other native JARs here.
           Note that these are not required in the CLASSPATH by JOGL,
           however, they are required by Eclipse to export your project as a Runnable JAR File.
   3) New test project
     -  Right-click your project in the Package Explorer and click "Properties".
          - Select "Java Build Path" and click the "Libraries" tab.
             + JOGL
     - Add some simple code ..
     - Run as Java Application ..
   
   Test-1:
   =========
   
   Export
     - Right-click your project in the Package Explorer and click "Export"
       - Select Java.Runnable_JAR_file
         + Launch configuration
         + some destination path
         + Library handling:
           Copy required libraries into a sub-folder next to the generated JAR
   
   Result: Works!
   
   ./lala01.jar
   ./lala01_lib/jogl.all.jar
   ./lala01_lib/jogl-all-natives-linux-amd64.jar
   ./lala01_lib/... etc ..
   
   Test-2:
   =========
   
   Export
     - Right-click your project in the Package Explorer and click "Export"
       - Select Java.Runnable_JAR_file
         + Launch configuration
         + some destination path
         + Library handling:
           Package required libraries into generated JAR
   Result: Works!
   
   ./lala02.jar:
     Manifest-Version: 1.0
     Rsrc-Class-Path: ./ gluegen-rt-natives-linux-amd64.jar gluegen-rt.jar
                         jogl-all-natives-linux-amd64.jar jogl.all.jar
     Class-Path: .
     Rsrc-Main-Class: Test01
     Main-Class: org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader