<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://jogamp.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://jogamp.org/bugzilla/"
          
          maintainer="sgothel@jausoft.com"
>

    <bug>
          <bug_id>1145</bug_id>
          
          <creation_ts>2015-03-10 10:48:40 +0100</creation_ts>
          <short_desc>Provide a JogAmp Big Fat Jar for Beginners [convenient, but inefficient]</short_desc>
          <delta_ts>2015-09-27 03:25:38 +0200</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>General</product>
          <component>builds</component>
          <version>2.3.2</version>
          <rep_platform>All</rep_platform>
          <op_sys>all</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>---</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>843</dependson>
    
    <dependson>1032</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sven Gothel">sgothel</reporter>
          <assigned_to name="Xerxes Rånby">xerxes</assigned_to>
          <cc>gouessej</cc>
    
    <cc>xerxes</cc>
          
          <cf_type>FEATURE</cf_type>
          <cf_scm_refs>gluegen 0240a71c56c1108da6863a2bb34e971ac6a4e061
gluegen cb2c86e887d1ae8a29eab5e3967b6ec99d853218
jogl 3f13a60ca428ed879ad2ac551f7bd808b9ba44a9
jogamp-scripting e58bf0a5418a777ae79387df1a24a6907df686ba
jogamp-scripting 0283ed5a7bf9401161845b11179f8689eafdd7a2
jogamp-scripting 6fa617357f82d015e4bfc959b3f38095d66b0b5a
gluegen bf4d8786cb732d86db333b43020ecf0af27f60bf
gluegen 32f09a5894ce3b157d5439df83703fa6f5336ff4
gluegen 73bb0ada4c77ef86d37747532f4807e0ec0ab51d</cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>4639</commentid>
    <comment_count>0</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2015-03-10 10:48:40 +0100</bug_when>
    <thetext>Beginners may like to experiment using JogAmp modules
by simply downloading one jar file, attached it to their IDE
and play with it.

The one big fat jar file then contains:
  - all modules java-jar
  - all modules and all platforms native jar

Technology wise, we do support 
 - Bug 843 - Allow multi-java-jar w/ multi-native-jar
 - Bug 1032 - Add fallback for native-jar-file location via classpath

Hence this task requires one to simply bundle 
the big fat jogamp jar when aggregating, 
i.e. producing the jogamp-all 7z file!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4640</commentid>
    <comment_count>1</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2015-03-10 10:53:16 +0100</bug_when>
    <thetext>(In reply to comment #0)
&gt; 
&gt; The one big fat jar file then contains:
&gt;   - all modules java-jar
&gt;   - all modules and all platforms native jar

We should also see how to handle the API doc here, i.e.
  [1] add it to the big fat jar file, _or_
  [2] also provide a big far source zip file

Since [2] would somewhat spoil the intention (one file),
IMHO we should target for [1].</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4668</commentid>
    <comment_count>2</comment_count>
    <who name="Julien Gouesse">gouessej</who>
    <bug_when>2015-03-23 14:10:13 +0100</bug_when>
    <thetext>Should the JogAmp big fat JAR contain both mobile (Android) and desktop native libraries? I remember that I had to remove the Android natives from the directory of the classpath because they were loaded under GNU Linux :s In my humble opinion, we should check that when a developer puts the JARs of the native libraries into the same directory (even those not required by the platform), the proper ones are always loaded and GlueGen never tries to load Android native libraries under GNU Linux.

We&apos;ll need to update the wiki, especially if the JogAmp big fat JAR contains the source code and the documentation. As some web browsers still modify the JARs for security purposes (they break them by putting them into ZIP archives), this JogAmp big fat JAR should still be put into a 7z archive.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4852</commentid>
    <comment_count>3</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2015-07-29 04:19:19 +0200</bug_when>
    <thetext>gluegen 0240a71c56c1108da6863a2bb34e971ac6a4e061
    New distributed files in &apos;dist&apos; subfolder for 
    producing fat files via jogamp-scripting:
    
    dist/jogamp-fat.mf
    dist/jogamp-test-fat.mf
    dist/junit.jar

jogamp-scripting e58bf0a5418a777ae79387df1a24a6907df686ba
    Provide JogAmp Big Fat Jars and Fat 7z Archive
    
    New files:
    - fat/jogamp-fat.jar
    - fat/jogamp-fat-test.jar
    - fat/jogamp-fat-java-src.jar
    - archive/jogamp-fat-all.7z

jogamp-scripting 0283ed5a7bf9401161845b11179f8689eafdd7a2
  - Add fat/jogamp-fat-test-java-src.jar</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4853</commentid>
    <comment_count>4</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2015-07-29 04:23:00 +0200</bug_when>
    <thetext>fat jars will be visible w/ next aggregated build, i.e. tomorrow.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4857</commentid>
    <comment_count>5</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2015-07-29 11:01:51 +0200</bug_when>
    <thetext>gluegen cb2c86e887d1ae8a29eab5e3967b6ec99d853218
  Use &apos;Main-Class&apos; for default launch of useful info/demos

jogl 3f13a60ca428ed879ad2ac551f7bd808b9ba44a9
  Add default main entry test TestGearsES2SimpleNEWT

jogamp-scripting 6fa617357f82d015e4bfc959b3f38095d66b0b5a
  Add oculusvr jars

+++

i.e. fat jars can be launched directly via &apos;java -jar jogamp-fat.jar&apos;
and &apos;java -jar jogamp-fat-test.jar&apos;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4858</commentid>
    <comment_count>6</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2015-07-29 15:56:12 +0200</bug_when>
    <thetext>(In reply to comment #2)
&gt; Should the JogAmp big fat JAR contain both mobile (Android) and desktop
&gt; native libraries? I remember that I had to remove the Android natives from
&gt; the directory of the classpath because they were loaded under GNU Linux :s
&gt; In my humble opinion, we should check that when a developer puts the JARs of
&gt; the native libraries into the same directory (even those not required by the
&gt; platform), the proper ones are always loaded and GlueGen never tries to load
&gt; Android native libraries under GNU Linux.
&gt; 
&gt; We&apos;ll need to update the wiki, especially if the JogAmp big fat JAR contains
&gt; the source code and the documentation. As some web browsers still modify the
&gt; JARs for security purposes (they break them by putting them into ZIP
&gt; archives), this JogAmp big fat JAR should still be put into a 7z archive.

All implemented .. and build available:

&lt;http://jogamp.org/deployment/archive/master/gluegen_876-joal_603-jogl_1414-jocl_1066/archive/jogamp-fat-all.7z&gt;

&lt;http://jogamp.org/deployment/archive/master/gluegen_876-joal_603-jogl_1414-jocl_1066/fat/&gt;

- not including Android natives
- launchable</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4923</commentid>
    <comment_count>7</comment_count>
    <who name="Xerxes Rånby">xerxes</who>
    <bug_when>2015-08-12 13:26:41 +0200</bug_when>
    <thetext>Corner Case 1: jogamp modules fail to load the natives if you unpack the fat-jar.
gluegen JNILibLoaderBase needs to be updated to look for natives in the natives/${os.and.arch}/ located on the classpath as a fallback to support using an unpacked fat-jar.

Testcase:
mkdir fat-test
cd fat-test
wget http://jogamp.org/deployment/archive/master/gluegen_882-joal_608-jogl_1422-jocl_1071-signed/fat/jogamp-fat.jar
wget wget http://jogamp.org/deployment/archive/master/gluegen_882-joal_608-jogl_1422-jocl_1071-signed/fat/jogamp-fat-test.jar
unzip -o jogamp-fat-test.jar
unzip -o jogamp-fat.jar
java -cp . com.jogamp.opengl.test.junit.graph.demos.GPUTextNewtDemo
xranby@Xerxes-ESPRIMO:~/fat-test$ java -cp . com.jogamp.opengl.test.junit.graph.demos.GPUTextNewtDemo
Desired win size 800x400
Desired win pos  10/10
Scene MSAA Samples 0
Graph MSAA Samples 0
Graph VBAA Samples 4
Exception in thread &quot;main&quot; java.lang.UnsatisfiedLinkError: Can&apos;t load library: /home/xranby/fat-test/libgluegen-rt.so
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1854)
	at java.lang.Runtime.load0(Runtime.java:795)
	at java.lang.System.load(System.java:1062)
	at com.jogamp.common.jvm.JNILibLoaderBase.loadLibraryInternal(JNILibLoaderBase.java:596)
	at com.jogamp.common.jvm.JNILibLoaderBase.access$000(JNILibLoaderBase.java:63)
	at com.jogamp.common.jvm.JNILibLoaderBase$DefaultAction.loadLibrary(JNILibLoaderBase.java:95)
	at com.jogamp.common.jvm.JNILibLoaderBase.loadLibrary(JNILibLoaderBase.java:459)
	at com.jogamp.common.os.DynamicLibraryBundle$GlueJNILibLoader.loadLibrary(DynamicLibraryBundle.java:421)
	at com.jogamp.common.os.Platform$1.run(Platform.java:317)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.jogamp.common.os.Platform.&lt;clinit&gt;(Platform.java:287)
	at com.jogamp.opengl.GLProfile.&lt;clinit&gt;(GLProfile.java:146)
	at com.jogamp.opengl.test.junit.graph.demos.GPUTextNewtDemo.main(GPUTextNewtDemo.java:103)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4924</commentid>
    <comment_count>8</comment_count>
    <who name="Xerxes Rånby">xerxes</who>
    <bug_when>2015-08-12 14:59:12 +0200</bug_when>
    <thetext>(In reply to comment #7)
&gt; Corner Case 1: jogamp modules fail to load the natives if you unpack the
&gt; fat-jar.
&gt; gluegen JNILibLoaderBase needs to be updated to look for natives in the
&gt; natives/${os.and.arch}/ located on the classpath as a fallback to support
&gt; using an unpacked fat-jar.

Branch to merge:
https://github.com/xranby/gluegen/tree/bug1145

Fixes Bug 1145 cc1 when using an unpacked fat-jar
By add current working directory + natives/os-arch/ + library names
to enumerateLibraryPaths</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4929</commentid>
    <comment_count>9</comment_count>
    <who name="Xerxes Rånby">xerxes</who>
    <bug_when>2015-08-13 02:43:49 +0200</bug_when>
    <thetext>Corner Case 2: null versions reported using the fat-jar

Testcase:
java -cp jogamp-fat.jar com.jogamp.newt.opengl.GLWindow

outputs null versions:
-----------------------------------------------------------------------------------------------------
Package: com.jogamp.gluegen
Extension Name: null
Specification Title: null
...
Implementation Commit: null
-----------------------------------------------------------------------------------------------------
Package: com.jogamp.opengl
Extension Name: null
...
Implementation Commit: null</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4930</commentid>
    <comment_count>10</comment_count>
    <who name="Julien Gouesse">gouessej</who>
    <bug_when>2015-08-13 11:01:33 +0200</bug_when>
    <thetext>(In reply to comment #9)
&gt; Corner Case 2: null versions reported using the fat-jar
&gt; 
&gt; Testcase:
&gt; java -cp jogamp-fat.jar com.jogamp.newt.opengl.GLWindow
&gt; 
&gt; outputs null versions:
&gt; -----------------------------------------------------------------------------
&gt; ------------------------
&gt; Package: com.jogamp.gluegen
&gt; Extension Name: null
&gt; Specification Title: null
&gt; ...
&gt; Implementation Commit: null
&gt; -----------------------------------------------------------------------------
&gt; ------------------------
&gt; Package: com.jogamp.opengl
&gt; Extension Name: null
&gt; ...
&gt; Implementation Commit: null

This information is extracted from the manifest as far as I know.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4931</commentid>
    <comment_count>11</comment_count>
    <who name="Julien Gouesse">gouessej</who>
    <bug_when>2015-08-13 11:04:12 +0200</bug_when>
    <thetext>See:
https://github.com/sgothel/gluegen/blob/master/src/java/com/jogamp/common/GlueGenVersion.java#L49
https://github.com/sgothel/jogl/blob/master/src/jogl/classes/com/jogamp/opengl/JoglVersion.java#L54</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4946</commentid>
    <comment_count>12</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2015-08-18 02:25:15 +0200</bug_when>
    <thetext>gluegen bf4d8786cb732d86db333b43020ecf0af27f60bf

Fix cc1 NativeLibrary: 
  Add current working directory + natives/os-arch/ + library names

Fixes Bug 1145 cc1 when using an unpacked fat-jar</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4947</commentid>
    <comment_count>13</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2015-08-18 02:51:40 +0200</bug_when>
    <thetext>gluegen 32f09a5894ce3b157d5439df83703fa6f5336ff4

    Fix cc2: Null versions reported using the fat-jar (JogampVersion)
    
    In case we run fat-jar file, the package name is &apos;com.jogamp&apos;
    and all entries are based upon GlueGen.
    
    JogampVersion will fall back trying to find a fat-jar Manifest
    in case a null Manifest is being passed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4966</commentid>
    <comment_count>14</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2015-08-18 12:19:49 +0200</bug_when>
    <thetext>73bb0ada4c77ef86d37747532f4807e0ec0ab51d
  JNILibLoaderBase.addNativeJarLibsImpl: Proper order: 
  #1 single-slim-jar, #2 fat-jar, #3 Classpath + TAG.class
    
  We shall attempt the official recommendation 
  of deployment first (single-slim-jar)
  not wasting time trying a &apos;nativeLibraryPath&apos; lookup within the classpath.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>