summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.classpath2
-rw-r--r--make/build.xml17
-rw-r--r--make/doc/javadoc/stylesheet.css6
-rwxr-xr-xmake/gluegen-cpptasks-base.xml100
-rwxr-xr-xmake/gluegen-properties.xml6
-rwxr-xr-xmake/gluegen.properties4
-rwxr-xr-xmake/jogamp-env.xml6
-rw-r--r--make/lib/archive/cpptasks/cpptasks-1.0b5-accumulated.patch80
-rw-r--r--make/lib/archive/cpptasks/cpptasks-1.0b5.patches.txt6
-rw-r--r--make/lib/archive/cpptasks/cpptasks-1.0b5.zipbin2221439 -> 0 bytes
-rw-r--r--make/lib/archive/cpptasks/obsolete/cpptasks-1.0b5-darwin.patch70
-rw-r--r--make/lib/archive/cpptasks/obsolete/cpptasks-1.0b5-gcclinker.patch17
-rw-r--r--make/lib/archive/cpptasks/obsolete/cpptasks-patch-suncc-c91f003551542c2aab62dd8ef89a7894c7e50689.tar.gzbin7743 -> 0 bytes
-rwxr-xr-xmake/lib/cpptasks-version.txt14
-rw-r--r--make/lib/cpptasks.jarbin364220 -> 375610 bytes
-rwxr-xr-xmake/lib/gluegen-clang.properties1
-rw-r--r--make/lib/junit-sources.jarbin0 -> 201041 bytes
-rw-r--r--make/lib/junit.LICENSE.txt249
-rw-r--r--make/lib/junit.jarbin237344 -> 297784 bytes
-rw-r--r--make/lib/junit.txt1
-rw-r--r--make/resources/android/AndroidManifest-Launcher.xml6
-rw-r--r--make/resources/android/AndroidManifest-Runtime.xml2
-rw-r--r--make/resources/android/AndroidManifest-Test.xml5
-rwxr-xr-xmake/scripts/check-java-major-version.sh4
-rwxr-xr-xmake/scripts/java-win32.bat4
-rwxr-xr-xmake/scripts/java-win64.bat4
-rwxr-xr-xmake/scripts/make.gluegen.all.macosx-clang.sh29
-rwxr-xr-xmake/scripts/make.gluegen.all.win32.bat4
-rwxr-xr-xmake/scripts/make.gluegen.all.win64.bat4
-rwxr-xr-xmake/scripts/runtest.sh6
-rw-r--r--make/stub_includes/jni/macosx/jawt_md.h2
-rw-r--r--make/stub_includes/platform/glibc-compat-symbols.h20
-rw-r--r--src/java/com/jogamp/common/jvm/JNILibLoaderBase.java140
-rw-r--r--src/java/com/jogamp/common/net/URIQueryProps.java137
-rw-r--r--src/java/com/jogamp/common/os/Platform.java14
-rw-r--r--src/java/com/jogamp/common/util/IOUtil.java119
-rw-r--r--src/java/com/jogamp/common/util/JarUtil.java83
-rw-r--r--src/java/com/jogamp/common/util/PropertyAccess.java9
-rw-r--r--src/java/com/jogamp/common/util/VersionUtil.java4
-rw-r--r--src/java/com/jogamp/common/util/cache/TempJarCache.java101
-rw-r--r--src/java/jogamp/common/os/PlatformPropsImpl.java15
-rw-r--r--src/junit/com/jogamp/common/net/AssetURLConnectionRegisteredTest.java4
-rw-r--r--src/junit/com/jogamp/common/net/AssetURLConnectionUnregisteredTest.java4
-rw-r--r--src/junit/com/jogamp/common/net/URLCompositionTest.java30
-rw-r--r--src/junit/com/jogamp/common/nio/BuffersTest.java4
-rw-r--r--src/junit/com/jogamp/common/nio/CachedBufferFactoryTest.java4
-rw-r--r--src/junit/com/jogamp/common/nio/TestBuffersFloatDoubleConversion.java4
-rw-r--r--src/junit/com/jogamp/common/nio/TestPointerBufferEndian.java4
-rw-r--r--src/junit/com/jogamp/common/nio/TestStructAccessorEndian.java4
-rw-r--r--src/junit/com/jogamp/common/os/TestElfReader01.java4
-rw-r--r--src/junit/com/jogamp/common/util/IntIntHashMapTest.java4
-rw-r--r--src/junit/com/jogamp/common/util/IntObjectHashMapTest.java4
-rw-r--r--src/junit/com/jogamp/common/util/LongIntHashMapTest.java4
-rw-r--r--src/junit/com/jogamp/common/util/TestArrayHashSet01.java4
-rw-r--r--src/junit/com/jogamp/common/util/TestFloatStack01.java4
-rw-r--r--src/junit/com/jogamp/common/util/TestIOUtil01.java4
-rw-r--r--src/junit/com/jogamp/common/util/TestIteratorIndexCORE.java4
-rw-r--r--src/junit/com/jogamp/common/util/TestJarUtil.java4
-rw-r--r--src/junit/com/jogamp/common/util/TestLFRingBuffer01.java4
-rw-r--r--src/junit/com/jogamp/common/util/TestPlatform01.java4
-rw-r--r--src/junit/com/jogamp/common/util/TestRunnableTask01.java4
-rw-r--r--src/junit/com/jogamp/common/util/TestSyncRingBuffer01.java4
-rw-r--r--src/junit/com/jogamp/common/util/TestSystemPropsAndEnvs.java4
-rw-r--r--src/junit/com/jogamp/common/util/TestTempJarCache.java10
-rw-r--r--src/junit/com/jogamp/common/util/TestValueConversion.java4
-rw-r--r--src/junit/com/jogamp/common/util/TestVersionInfo.java4
-rw-r--r--src/junit/com/jogamp/common/util/TestVersionNumber.java4
-rw-r--r--src/junit/com/jogamp/common/util/locks/TestRecursiveLock01.java4
-rw-r--r--src/junit/com/jogamp/common/util/locks/TestRecursiveThreadGroupLock01.java4
-rw-r--r--src/junit/com/jogamp/common/util/locks/TestSingletonServerSocket00.java4
-rw-r--r--src/junit/com/jogamp/common/util/locks/TestSingletonServerSocket01.java4
-rw-r--r--src/junit/com/jogamp/common/util/locks/TestSingletonServerSocket02.java4
-rw-r--r--src/junit/com/jogamp/gluegen/test/junit/generation/PCPPTest.java4
-rw-r--r--src/junit/com/jogamp/gluegen/test/junit/generation/Test1p1JavaEmitter.java4
-rw-r--r--src/junit/com/jogamp/gluegen/test/junit/generation/Test1p2ProcAddressEmitter.java4
-rw-r--r--src/junit/com/jogamp/gluegen/test/junit/structgen/TestStructGen01.java4
-rw-r--r--src/junit/com/jogamp/junit/sec/TestSecIOUtil01.java4
-rw-r--r--src/junit/com/jogamp/junit/util/JunitTracer.java3
-rw-r--r--test/TestEclipse_JarInJar/lala02.orig.jarbin0 -> 4748589 bytes
-rw-r--r--test/TestEclipse_JarInJar/make-jarinjar.sh21
-rw-r--r--test/TestEclipse_JarInJar/run-jarinjar.sh8
-rw-r--r--test/TestMultiAndFatJar/make-fat_and_multi.sh45
-rw-r--r--test/TestMultiAndFatJar/run-fat.sh9
-rw-r--r--test/TestMultiAndFatJar/run-multi.sh9
-rw-r--r--test/TestOneJar_InJar/jogamp01/build.xml123
-rw-r--r--test/TestOneJar_InJar/jogamp01/ide/eclipse/jogamp01-suite.launch26
-rw-r--r--test/TestOneJar_InJar/jogamp01/ide/eclipse/test-jogamp01 (JarLaunch build).launch12
-rw-r--r--test/TestOneJar_InJar/jogamp01/junit/jogamp/test/Jogamp01Suite.java73
-rw-r--r--test/TestOneJar_InJar/jogamp01/lib/README.txt1
-rw-r--r--test/TestOneJar_InJar/jogamp01/one-jar/build.onejar.xml54
-rw-r--r--test/TestOneJar_InJar/jogamp01/one-jar/dist/one-jar-ant-task-0.97.jarbin0 -> 92003 bytes
-rw-r--r--test/TestOneJar_InJar/jogamp01/one-jar/dist/one-jar-ant-task.xml10
-rw-r--r--test/TestOneJar_InJar/jogamp01/one-jar/dist/one-jar-boot-0.97.jarbin0 -> 69299 bytes
-rw-r--r--test/TestOneJar_InJar/jogamp01/one-jar/lib/junit-3.8.1.jarbin0 -> 121070 bytes
-rw-r--r--test/TestOneJar_InJar/jogamp01/src/jogamp/main/Jogamp01Main.java31
-rw-r--r--test/TestOneJar_InJar/jogamp01/test/jogamp/test/Test.java32
-rw-r--r--test/TestOneJar_InJar/make-one_jar.sh18
-rw-r--r--test/TestOneJar_InJar/one-jar-license.txt33
-rw-r--r--test/TestOneJar_InJar/run-one.sh9
99 files changed, 1508 insertions, 476 deletions
diff --git a/.classpath b/.classpath
index 0c85db3..19bcd90 100644
--- a/.classpath
+++ b/.classpath
@@ -20,10 +20,10 @@
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="gluegen/build/obj"/>
</attributes>
</classpathentry>
- <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Ant"/>
<classpathentry kind="lib" path="make/lib/antlr.jar"/>
<classpathentry kind="lib" path="make/lib/android-sdk/15/android.jar" sourcepath="make/lib/android-sdk/15/android-java-src.zip"/>
+ <classpathentry kind="lib" path="make/lib/junit.jar" sourcepath="make/lib/junit-sources.jar"/>
<classpathentry kind="output" path="build/eclipse-classes"/>
</classpath>
diff --git a/make/build.xml b/make/build.xml
index 2fe2d69..554ba43 100644
--- a/make/build.xml
+++ b/make/build.xml
@@ -704,7 +704,7 @@
<!-- Build GlueGen using the generated Java files along with the
- original source. -->
- <!--compile gluegen-rt first-->
+ <!-- Compile gluegen-rt first -->
<javac destdir="${classes}"
includeAntRuntime="false"
includes="${gluegen-rt.classes} ${jogamp.common.classes}"
@@ -720,14 +720,20 @@
<classpath refid="cc_gluegen.classpath" />
</javac>
- <!--compile gluegen (compile time) -->
+ <!-- Compile gluegen (compile time).
+
+ Uses host.rt.jar, since we require 'com.sun.tools.doclets.Taglet',
+ w/o it breaks build on OSX w/ Java6 compiler.
+ Surprisingly it works on other platforms, which seems to pick classes
+ outside of the 'bootclasspath'.
+ -->
<javac destdir="${classes}"
includeAntRuntime="true"
excludes="${gluegen.excludes.all} ${gluegen-rt.classes} ${java.part.android}"
memoryMaximumSize="${javac.memorymax}"
encoding="UTF-8"
- source="${host.sourcelevel}"
- target="${host.targetlevel}"
+ source="${target.sourcelevel}"
+ target="${target.targetlevel}"
bootclasspath="${host.rt.jar}"
debug="${javacdebug}" debuglevel="${javacdebuglevel}">
<src path="${src.java}" />
@@ -975,7 +981,8 @@
</target>
<target name="tag.build" depends="init">
- <echo message='gluegen.build.number=${gluegen.build.number}${line.separator}' file="${build}/artifact.properties"/>
+ <echo message='gluegen.build.version=${jogamp.version}${line.separator}' file="${build}/artifact.properties"/>
+ <echo message='gluegen.build.number=${gluegen.build.number}${line.separator}' file="${build}/artifact.properties" append="true"/>
<echo message='gluegen.build.id=${gluegen.build.id}${line.separator}' file="${build}/artifact.properties" append="true"/>
<echo message='gluegen.build.branch=${gluegen.build.branch}${line.separator}' file="${build}/artifact.properties" append="true"/>
<echo message='gluegen.build.commit=${gluegen.build.commit}${line.separator}' file="${build}/artifact.properties" append="true"/>
diff --git a/make/doc/javadoc/stylesheet.css b/make/doc/javadoc/stylesheet.css
index 2c05854..9f63956 100644
--- a/make/doc/javadoc/stylesheet.css
+++ b/make/doc/javadoc/stylesheet.css
@@ -22,14 +22,14 @@ a:hover, a:focus {
}
a:active {
text-decoration:none;
- color:#4444ff;
+ color:#4444cc;
}
a[name] {
- color:#4444ff;
+ color:#4444cc;
}
a[name]:hover {
text-decoration:none;
- color:#4444ff;
+ color:#4444cc;
}
pre {
font-size:1.3em;
diff --git a/make/gluegen-cpptasks-base.xml b/make/gluegen-cpptasks-base.xml
index f8455e8..cae62c0 100755
--- a/make/gluegen-cpptasks-base.xml
+++ b/make/gluegen-cpptasks-base.xml
@@ -99,6 +99,8 @@
- properties appropriately. They are only set to "true" if the OS/compiler
- configuration is exactly as specified.
-
+ - isGCC
+ - isCLANG
- isVCFamily
- isVC6
- isVC7
@@ -737,6 +739,15 @@
- out because this must sometimes be called late in the setup process
-->
<target name="gluegen.cpptasks.detect.compiler">
+ <condition property="isGCC">
+ <equals arg1="${gcc.compat.compiler}" arg2="gcc" />
+ </condition>
+ <condition property="isCLANG">
+ <equals arg1="${gcc.compat.compiler}" arg2="clang" />
+ </condition>
+ <echo message="GCC=${isGCC}" />
+ <echo message="CLANG=${isCLANG}" />
+
<!-- Set up compiler selection on Windows -->
<condition property="isVCFamily">
<and>
@@ -878,7 +889,7 @@
<!-- UNIX compiler configuration -->
- <compiler id="compiler.cfg.freebsd" name="gcc">
+ <compiler id="compiler.cfg.freebsd" name="${gcc.compat.compiler}">
<defineset>
<define name="__unix__"/>
<define name="__X11__" if="isX11"/>
@@ -890,7 +901,7 @@
</defineset>
</compiler>
- <compiler id="compiler.cfg.linux" name="gcc">
+ <compiler id="compiler.cfg.linux" name="${gcc.compat.compiler}">
<defineset>
<define name="__unix__"/>
<define name="__X11__" if="isX11"/>
@@ -900,7 +911,7 @@
</defineset>
</compiler>
- <compiler id="compiler.cfg.linux.x86" name="gcc">
+ <compiler id="compiler.cfg.linux.x86" name="${gcc.compat.compiler}">
<compilerarg value="-m32"/>
<defineset>
<define name="__unix__"/>
@@ -911,7 +922,7 @@
</defineset>
</compiler>
- <compiler id="compiler.cfg.linux.amd64" name="gcc">
+ <compiler id="compiler.cfg.linux.amd64" name="${gcc.compat.compiler}">
<compilerarg value="-fPIC"/>
<compilerarg value="-m64"/>
<defineset>
@@ -927,7 +938,7 @@
- lib/gluegen-cpptasks-linux-armv6.xml (armv5te + softfp), or
- lib/gluegen-cpptasks-linux-armv6hf.xml (armv6 + hardfp)
for official JogAmp builds! -->
- <compiler id="compiler.cfg.linux.armv6" name="gcc">
+ <compiler id="compiler.cfg.linux.armv6" name="${gcc.compat.compiler}">
<defineset>
<define name="__unix__"/>
<define name="__X11__" if="isX11"/>
@@ -938,11 +949,11 @@
<compilerarg value="-fpic" />
</compiler>
- <compiler id="compiler.cfg.android" name="gcc">
+ <compiler id="compiler.cfg.android" name="${gcc.compat.compiler}">
<!-- shall be defined in custom ${gluegen-cpptasks.file} ! -->
</compiler>
- <compiler id="compiler.cfg.freebsd" name="gcc">
+ <compiler id="compiler.cfg.freebsd" name="${gcc.compat.compiler}">
<defineset>
<define name="__unix__"/>
<define name="__X11__" if="isX11"/>
@@ -982,7 +993,7 @@
<!-- SOLARIS compiler configuration -->
- <compiler id="compiler.cfg.solaris" name="gcc">
+ <compiler id="compiler.cfg.solaris" name="${gcc.compat.compiler}">
<compilerarg value="-m32"/>
<defineset>
<define name="__unix__"/>
@@ -994,7 +1005,7 @@
</defineset>
</compiler>
- <compiler id="compiler.cfg.solaris.sparcv9" name="gcc">
+ <compiler id="compiler.cfg.solaris.sparcv9" name="${gcc.compat.compiler}">
<compilerarg value="-fast" />
<compilerarg value="-xchip=ultra" />
<compilerarg value="-xarch=v9a" />
@@ -1008,7 +1019,7 @@
</defineset>
</compiler>
- <compiler id="compiler.cfg.solaris.amd64" name="gcc">
+ <compiler id="compiler.cfg.solaris.amd64" name="${gcc.compat.compiler}">
<compilerarg value="-fPIC"/>
<compilerarg value="-m64"/>
<!-- compilerarg value="-fast" /-->
@@ -1027,7 +1038,7 @@
<!-- MacOSX compiler configuration -->
- <compiler id="compiler.cfg.macosx" name="gcc">
+ <compiler id="compiler.cfg.macosx" name="${gcc.compat.compiler}">
<!-- Note: Apple doesn't seem to provide ppc binaries on Snow Leopard -->
<compilerarg value="-arch" if="use.macosppc"/>
<compilerarg value="ppc" if="use.macosppc"/>
@@ -1040,7 +1051,6 @@
<compilerarg value="-ObjC" />
<compilerarg value="-mmacosx-version-min=10.5"/>
<defineset>
- <define name="macosx" />
<define name="_DEBUG" if="c.compiler.use-debug"/>
<define name="DEBUG" if="c.compiler.use-debug"/>
<define name="NDEBUG" unless="c.compiler.use-debug"/>
@@ -1060,7 +1070,7 @@
<compilerarg value="-m32"/>
</compiler>
- <compiler id="compiler.cfg.win32.mingw" name="gcc">
+ <compiler id="compiler.cfg.win32.mingw" name="${gcc.compat.compiler}">
<compilerarg value="-g" if="c.compiler.use-debug"/>
<compilerarg value="-O0" if="c.compiler.use-debug"/>
<compilerarg value="-O2" unless="c.compiler.use-debug"/>
@@ -1077,7 +1087,7 @@
</defineset>
</compiler>
- <compiler id="compiler.cfg.win64.mingw" name="gcc">
+ <compiler id="compiler.cfg.win64.mingw" name="${gcc.compat.compiler}">
<compilerarg value="-g" if="c.compiler.use-debug"/>
<compilerarg value="-O0" if="c.compiler.use-debug"/>
<compilerarg value="-O2" unless="c.compiler.use-debug"/>
@@ -1124,91 +1134,91 @@
<!-- Unix linker configuration -->
- <linker id="linker.cfg.linux" name="gcc">
- <linkerarg value="-static-libgcc"/>
+ <linker id="linker.cfg.linux" name="${gcc.compat.compiler}">
+ <linkerarg value="-static-libgcc" if="isGCC"/>
</linker>
- <linker id="linker.cfg.linux.x86" name="gcc">
+ <linker id="linker.cfg.linux.x86" name="${gcc.compat.compiler}">
<linkerarg value="-m32"/>
- <linkerarg value="-static-libgcc"/>
+ <linkerarg value="-static-libgcc" if="isGCC"/>
</linker>
- <linker id="linker.cfg.linux.amd64" name="gcc">
+ <linker id="linker.cfg.linux.amd64" name="${gcc.compat.compiler}">
<linkerarg value="-m64"/>
- <linkerarg value="-static-libgcc"/>
+ <linkerarg value="-static-libgcc" if="isGCC"/>
</linker>
<!-- Using default compiler settings - utilize:
- lib/gluegen-cpptasks-linux-armv6.xml (armv5te + softfp), or
- lib/gluegen-cpptasks-linux-armv6hf.xml (armv6 + hardfp)
for official JogAmp builds! -->
- <linker id="linker.cfg.linux.armv6" name="gcc">
+ <linker id="linker.cfg.linux.armv6" name="${gcc.compat.compiler}">
<linkerarg value="-fpic" />
<linkerarg value="-nostdlib" />
<linkerarg value="-Bdynamic" />
- <linkerarg value="-static-libgcc"/>
+ <linkerarg value="-static-libgcc" if="isGCC"/>
</linker>
- <linker id="linker.cfg.linux.alpha" name="gcc">
+ <linker id="linker.cfg.linux.alpha" name="${gcc.compat.compiler}">
</linker>
- <linker id="linker.cfg.linux.hppa" name="gcc">
+ <linker id="linker.cfg.linux.hppa" name="${gcc.compat.compiler}">
</linker>
- <linker id="linker.cfg.linux.mips" name="gcc">
+ <linker id="linker.cfg.linux.mips" name="${gcc.compat.compiler}">
</linker>
- <linker id="linker.cfg.linux.mipsel" name="gcc">
+ <linker id="linker.cfg.linux.mipsel" name="${gcc.compat.compiler}">
</linker>
- <linker id="linker.cfg.linux.ppc" name="gcc">
+ <linker id="linker.cfg.linux.ppc" name="${gcc.compat.compiler}">
</linker>
- <linker id="linker.cfg.linux.s390" name="gcc">
+ <linker id="linker.cfg.linux.s390" name="${gcc.compat.compiler}">
</linker>
- <linker id="linker.cfg.linux.s390x" name="gcc">
+ <linker id="linker.cfg.linux.s390x" name="${gcc.compat.compiler}">
</linker>
- <linker id="linker.cfg.linux.sparc" name="gcc">
+ <linker id="linker.cfg.linux.sparc" name="${gcc.compat.compiler}">
</linker>
- <compiler id="linker.cfg.android" name="gcc">
+ <compiler id="linker.cfg.android" name="${gcc.compat.compiler}">
<!-- shall be defined in custom ${gluegen-cpptasks.file} ! -->
</compiler>
<linker id="linker.cfg.hpux" name="aCC">
</linker>
- <linker id="linker.cfg.freebsd.x86" name="gcc">
+ <linker id="linker.cfg.freebsd.x86" name="${gcc.compat.compiler}">
<linkerarg value="-m32"/>
</linker>
- <linker id="linker.cfg.freebsd.amd64" name="gcc">
+ <linker id="linker.cfg.freebsd.amd64" name="${gcc.compat.compiler}">
<linkerarg value="-m64"/>
</linker>
<!-- SOLARIS linker configuration -->
- <linker id="linker.cfg.solaris" name="gcc">
+ <linker id="linker.cfg.solaris" name="${gcc.compat.compiler}">
<linkerarg value="-m32"/>
- <linkerarg value="-static-libgcc"/>
+ <linkerarg value="-static-libgcc" if="isGCC"/>
</linker>
- <linker id="linker.cfg.solaris.sparcv9" name="gcc">
+ <linker id="linker.cfg.solaris.sparcv9" name="${gcc.compat.compiler}">
<linkerarg value="-xarch=v9a" />
- <linkerarg value="-static-libgcc"/>
+ <linkerarg value="-static-libgcc" if="isGCC"/>
</linker>
- <linker id="linker.cfg.solaris.amd64" name="gcc">
+ <linker id="linker.cfg.solaris.amd64" name="${gcc.compat.compiler}">
<linkerarg value="-m64"/>
- <linkerarg value="-static-libgcc"/>
+ <linkerarg value="-static-libgcc" if="isGCC"/>
<!-- linkerarg value="-xarch=amd64" / -->
</linker>
<!-- MacOSX linker configuration -->
- <linker id="linker.cfg.macosx" name="gcc">
+ <linker id="linker.cfg.macosx" name="${gcc.compat.compiler}">
<!-- Note: Apple doesn't seem to provide ppc binaries on Snow Leopard -->
<linkerarg value="-arch" if="use.macosppc"/>
<linkerarg value="ppc" if="use.macosppc"/>
@@ -1217,7 +1227,7 @@
<linkerarg value="-arch" if="use.macosx64"/>
<linkerarg value="x86_64" if="use.macosx64"/>
<linkerarg value="-mmacosx-version-min=10.5"/>
- <linkerarg value="-static-libgcc"/>
+ <linkerarg value="-static-libgcc" if="isGCC"/>
<!-- Note: Apple doesn't seem to provide ppc64 binaries on Leopard -->
</linker>
@@ -1236,20 +1246,20 @@
<linkerarg value="-static-libgcc"/>
</linker>
- <linker id="linker.cfg.win32.mingw" name="gcc" incremental="false">
+ <linker id="linker.cfg.win32.mingw" name="${gcc.compat.compiler}" incremental="false">
<linkerarg value="-m32"/>
<linkerarg value="-Wl,--enable-auto-import"/> <!-- for linking against dll directly -->
<linkerarg value="-Wl,--enable-stdcall-fixup"/> <!-- for linking against dll directly -->
<linkerarg value="-Wl,--kill-at" /> <!-- remove @ from function names, ie no __stdcall @nn -->
- <linkerarg value="-static-libgcc"/>
+ <linkerarg value="-static-libgcc" if="isGCC"/>
</linker>
- <linker id="linker.cfg.win64.mingw" name="gcc" incremental="false">
+ <linker id="linker.cfg.win64.mingw" name="${gcc.compat.compiler}" incremental="false">
<linkerarg value="-m64"/>
<linkerarg value="-Wl,--enable-auto-import"/> <!-- for linking against dll directly -->
<linkerarg value="-Wl,--enable-stdcall-fixup"/> <!-- for linking against dll directly -->
<linkerarg value="-Wl,--kill-at" /> <!-- remove @ from function names, ie no __stdcall @nn -->
- <linkerarg value="-static-libgcc"/>
+ <linkerarg value="-static-libgcc" if="isGCC"/>
</linker>
<linker id="linker.cfg.win32.msvc" name="msvc" incremental="false">
diff --git a/make/gluegen-properties.xml b/make/gluegen-properties.xml
index 7efc4c1..cac32bb 100755
--- a/make/gluegen-properties.xml
+++ b/make/gluegen-properties.xml
@@ -6,6 +6,9 @@
- This Ant project file depends on the following properties being set
- externally:
-
+ - gcc.compat.compiler
+ - either "gcc" (default) or "clang"
+ -
- win32.c.compiler (required to be set on Windows):
- one of "vc6", "vc7", "vc8", "mingw32" (default) or "mingw64".
- c.compiler.debug:
@@ -79,6 +82,9 @@
<property name="ant-junit-all.apk" value="${gluegen.root}/make/lib/ant-junit-all.apk" />
+ <!-- maybe overriden, e.g. with "clang" -->
+ <property name="gcc.compat.compiler" value="gcc"/>
+
<condition property="win32.c.compiler" value="mingw64">
<and>
<os family="windows" />
diff --git a/make/gluegen.properties b/make/gluegen.properties
index 03aec9c..62bb84d 100755
--- a/make/gluegen.properties
+++ b/make/gluegen.properties
@@ -30,6 +30,10 @@
# MinGW is used per default, hence the default value "mingw32".
# win32.c.compiler=mingw32
+# You can set the gcc compatible compiler to either gcc or clang:
+#gcc.compat.compiler=gcc
+#gcc.compat.compiler=clang
+
# MacOsX libraries can be universal / fat binaries.
# The following switches enables/disables a target platform.
# If non of them is enabled, the default
diff --git a/make/jogamp-env.xml b/make/jogamp-env.xml
index b6d427c..d312061 100755
--- a/make/jogamp-env.xml
+++ b/make/jogamp-env.xml
@@ -77,8 +77,8 @@
<echo message="jogamp.jar.codebase ${jogamp.jar.codebase}"/>
<property name="jogamp.version.major" value="2"/>
- <property name="jogamp.version.minor" value="0"/>
- <property name="jogamp.version.submi" value="3"/>
+ <property name="jogamp.version.minor" value="1"/>
+ <property name="jogamp.version.submi" value="1"/>
<property name="jogamp.version.devel" value="-rc-${version.timestamp}"/> <!-- Devel tag -->
<!-- property name="jogamp.version.devel" value="-rc12"/--> <!-- RC tag -->
<!-- property name="jogamp.version.devel" value=""/--> <!-- Release tag -->
@@ -87,7 +87,7 @@
<echo message="jogamp.version ${jogamp.version}"/>
<!-- This is the Android version: xxyyzzz, xx=API yy screen-from-to zzz app-version-->
- <property name="jogamp.version.int" value="0914013"/>
+ <property name="jogamp.version.int" value="0914015"/>
<echo message="jogamp.version.int ${jogamp.version.int}"/>
<!-- only set 'junit.is.disabled' if set in environment as 'true' to disable JUNIT tests -->
diff --git a/make/lib/archive/cpptasks/cpptasks-1.0b5-accumulated.patch b/make/lib/archive/cpptasks/cpptasks-1.0b5-accumulated.patch
deleted file mode 100644
index 4965a22..0000000
--- a/make/lib/archive/cpptasks/cpptasks-1.0b5-accumulated.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-diff -Nur cpptasks-1.0b5/src/main/java/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java cpptasks-1.0b5-patched/src/main/java/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java
---- cpptasks-1.0b5/src/main/java/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java 2008-04-02 19:26:44.000000000 +0200
-+++ cpptasks-1.0b5-patched/src/main/java/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java 2012-03-06 19:39:46.739351056 +0100
-@@ -59,7 +59,7 @@
- args.addElement("-bundle");
- } else {
- if (linkType.isSharedLibrary()) {
-- args.addElement("-prebind");
-+ // args.addElement("-prebind"); // Only required for OSX 10.3 and earlier, no auto-add (can add manually though)
- args.addElement("-dynamiclib");
- }
- }
-diff -Nur cpptasks-1.0b5/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccLinker.java cpptasks-1.0b5-patched/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccLinker.java
---- cpptasks-1.0b5/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccLinker.java 2008-04-02 19:26:44.000000000 +0200
-+++ cpptasks-1.0b5-patched/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccLinker.java 2012-03-06 19:42:21.241385093 +0100
-@@ -17,6 +17,8 @@
- package net.sf.antcontrib.cpptasks.gcc;
- import java.io.File;
- import java.util.Vector;
-+import java.util.HashSet;
-+import java.util.Arrays;
-
- import net.sf.antcontrib.cpptasks.CUtil;
- import net.sf.antcontrib.cpptasks.compiler.LinkType;
-@@ -33,9 +35,10 @@
- private static final String[] libtoolObjFiles = new String[]{".fo", ".a",
- ".lib", ".dll", ".so", ".sl"};
- private static String[] linkerOptions = new String[]{"-bundle",
-- "-dynamiclib", "-nostartfiles", "-nostdlib", "-prebind", "-s",
-+ "-dynamiclib", "-nostartfiles", "-nostdlib", "-prebind", "-noprebind", "-s",
- "-static", "-shared", "-symbolic", "-Xlinker",
- "--export-all-symbols", "-static-libgcc",};
-+ private static String[] darwinLinkerOptions = new String[]{"-arch", "-weak_framework", "-lazy_framework", "-weak_library" };
- private static final GccLinker dllLinker = new GccLinker("gcc", objFiles,
- discardFiles, "lib", ".so", false, new GccLinker("gcc", objFiles,
- discardFiles, "lib", ".so", true, null));
-@@ -78,6 +81,9 @@
- */
- public String decorateLinkerOption(StringBuffer buf, String arg) {
- String decoratedArg = arg;
-+ if (arg.startsWith("--sysroot")) {
-+ return arg;
-+ }
- if (arg.length() > 1 && arg.charAt(0) == '-') {
- switch (arg.charAt(1)) {
- //
-@@ -97,12 +103,13 @@
- break;
- default :
- boolean known = false;
-- for (int i = 0; i < linkerOptions.length; i++) {
-- if (linkerOptions[i].equals(arg)) {
-- known = true;
-- break;
-- }
-+ HashSet allLinkerOptions = new HashSet();
-+ allLinkerOptions.addAll(Arrays.asList(linkerOptions));
-+ if (isDarwin()) {
-+ allLinkerOptions.addAll(Arrays.asList(darwinLinkerOptions));
- }
-+ known = allLinkerOptions.contains(arg);
-+
- if (!known) {
- buf.setLength(0);
- buf.append("-Wl,");
-diff -Nur cpptasks-1.0b5/src/test/java/net/sf/antcontrib/cpptasks/gcc/TestAbstractLdLinker.java cpptasks-1.0b5-patched/src/test/java/net/sf/antcontrib/cpptasks/gcc/TestAbstractLdLinker.java
---- cpptasks-1.0b5/src/test/java/net/sf/antcontrib/cpptasks/gcc/TestAbstractLdLinker.java 2008-04-02 19:26:44.000000000 +0200
-+++ cpptasks-1.0b5-patched/src/test/java/net/sf/antcontrib/cpptasks/gcc/TestAbstractLdLinker.java 2012-03-06 19:39:46.891349119 +0100
-@@ -73,9 +73,8 @@
- pluginOutType.setValue("shared");
- pluginType.setOutputType(pluginOutType);
- linker.addImpliedArgs(false, pluginType, args);
-- assertEquals(2, args.size());
-- assertEquals("-prebind", args.elementAt(0));
-- assertEquals("-dynamiclib", args.elementAt(1));
-+ assertEquals(1, args.size());
-+ assertEquals("-dynamiclib", args.elementAt(0));
- }
- /**
- * Checks for proper arguments for plugin generation on Darwin
diff --git a/make/lib/archive/cpptasks/cpptasks-1.0b5.patches.txt b/make/lib/archive/cpptasks/cpptasks-1.0b5.patches.txt
deleted file mode 100644
index c8136b1..0000000
--- a/make/lib/archive/cpptasks/cpptasks-1.0b5.patches.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-cpptasks-1.0b5-accumulated.patch - The accumulated patch, you only need to apply this one!
-
-The single original patches:
-
-obsolete/cpptasks-1.0b5-darwin.patch - Make OSX/Darwin work (linker options etc)
-obsolete/cpptasks-1.0b5-gcclinker.patch - Make crosscompilation work (--sysroot .. etc)
diff --git a/make/lib/archive/cpptasks/cpptasks-1.0b5.zip b/make/lib/archive/cpptasks/cpptasks-1.0b5.zip
deleted file mode 100644
index 21f8c07..0000000
--- a/make/lib/archive/cpptasks/cpptasks-1.0b5.zip
+++ /dev/null
Binary files differ
diff --git a/make/lib/archive/cpptasks/obsolete/cpptasks-1.0b5-darwin.patch b/make/lib/archive/cpptasks/obsolete/cpptasks-1.0b5-darwin.patch
deleted file mode 100644
index 8af11be..0000000
--- a/make/lib/archive/cpptasks/obsolete/cpptasks-1.0b5-darwin.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-diff -Nur cpptasks-1.0b5/src/main/java/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java cpptasks-1.0b5-osx-patched/src/main/java/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java
---- cpptasks-1.0b5/src/main/java/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java 2008-04-02 19:26:44.000000000 +0200
-+++ cpptasks-1.0b5-osx-patched/src/main/java/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java 2012-01-09 14:40:36.277639850 +0100
-@@ -59,7 +59,7 @@
- args.addElement("-bundle");
- } else {
- if (linkType.isSharedLibrary()) {
-- args.addElement("-prebind");
-+ // args.addElement("-prebind"); // Only required for OSX 10.3 and earlier, no auto-add (can add manually though)
- args.addElement("-dynamiclib");
- }
- }
-diff -Nur cpptasks-1.0b5/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccLinker.java cpptasks-1.0b5-osx-patched/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccLinker.java
---- cpptasks-1.0b5/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccLinker.java 2008-04-02 19:26:44.000000000 +0200
-+++ cpptasks-1.0b5-osx-patched/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccLinker.java 2012-01-09 15:25:12.994904288 +0100
-@@ -17,6 +17,8 @@
- package net.sf.antcontrib.cpptasks.gcc;
- import java.io.File;
- import java.util.Vector;
-+import java.util.HashSet;
-+import java.util.Arrays;
-
- import net.sf.antcontrib.cpptasks.CUtil;
- import net.sf.antcontrib.cpptasks.compiler.LinkType;
-@@ -33,9 +35,10 @@
- private static final String[] libtoolObjFiles = new String[]{".fo", ".a",
- ".lib", ".dll", ".so", ".sl"};
- private static String[] linkerOptions = new String[]{"-bundle",
-- "-dynamiclib", "-nostartfiles", "-nostdlib", "-prebind", "-s",
-+ "-dynamiclib", "-nostartfiles", "-nostdlib", "-prebind", "-noprebind", "-s",
- "-static", "-shared", "-symbolic", "-Xlinker",
- "--export-all-symbols", "-static-libgcc",};
-+ private static String[] darwinLinkerOptions = new String[]{"-arch", "-weak_framework", "-lazy_framework", "-weak_library" };
- private static final GccLinker dllLinker = new GccLinker("gcc", objFiles,
- discardFiles, "lib", ".so", false, new GccLinker("gcc", objFiles,
- discardFiles, "lib", ".so", true, null));
-@@ -97,12 +100,13 @@
- break;
- default :
- boolean known = false;
-- for (int i = 0; i < linkerOptions.length; i++) {
-- if (linkerOptions[i].equals(arg)) {
-- known = true;
-- break;
-- }
-+ HashSet allLinkerOptions = new HashSet();
-+ allLinkerOptions.addAll(Arrays.asList(linkerOptions));
-+ if (isDarwin()) {
-+ allLinkerOptions.addAll(Arrays.asList(darwinLinkerOptions));
- }
-+ known = allLinkerOptions.contains(arg);
-+
- if (!known) {
- buf.setLength(0);
- buf.append("-Wl,");
-diff -Nur cpptasks-1.0b5/src/test/java/net/sf/antcontrib/cpptasks/gcc/TestAbstractLdLinker.java cpptasks-1.0b5-osx-patched/src/test/java/net/sf/antcontrib/cpptasks/gcc/TestAbstractLdLinker.java
---- cpptasks-1.0b5/src/test/java/net/sf/antcontrib/cpptasks/gcc/TestAbstractLdLinker.java 2008-04-02 19:26:44.000000000 +0200
-+++ cpptasks-1.0b5-osx-patched/src/test/java/net/sf/antcontrib/cpptasks/gcc/TestAbstractLdLinker.java 2012-01-09 15:29:42.379687367 +0100
-@@ -73,9 +73,8 @@
- pluginOutType.setValue("shared");
- pluginType.setOutputType(pluginOutType);
- linker.addImpliedArgs(false, pluginType, args);
-- assertEquals(2, args.size());
-- assertEquals("-prebind", args.elementAt(0));
-- assertEquals("-dynamiclib", args.elementAt(1));
-+ assertEquals(1, args.size());
-+ assertEquals("-dynamiclib", args.elementAt(0));
- }
- /**
- * Checks for proper arguments for plugin generation on Darwin
diff --git a/make/lib/archive/cpptasks/obsolete/cpptasks-1.0b5-gcclinker.patch b/make/lib/archive/cpptasks/obsolete/cpptasks-1.0b5-gcclinker.patch
deleted file mode 100644
index 0eb4c76..0000000
--- a/make/lib/archive/cpptasks/obsolete/cpptasks-1.0b5-gcclinker.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Index: src/main/java/net/sf/antcontrib/cpptasks/gcc/GccLinker.java
-===================================================================
---- src/main/java/net/sf/antcontrib/cpptasks/gcc/GccLinker.java (revision 177)
-+++ src/main/java/net/sf/antcontrib/cpptasks/gcc/GccLinker.java (working copy)
-@@ -78,6 +78,12 @@
- */
- public String decorateLinkerOption(StringBuffer buf, String arg) {
- String decoratedArg = arg;
-+ if (arg.startsWith("--sysroot")) {
-+ return arg;
-+ }
-+ if (arg.startsWith("-nostdlib")) {
-+ return arg;
-+ }
- if (arg.length() > 1 && arg.charAt(0) == '-') {
- switch (arg.charAt(1)) {
- //
diff --git a/make/lib/archive/cpptasks/obsolete/cpptasks-patch-suncc-c91f003551542c2aab62dd8ef89a7894c7e50689.tar.gz b/make/lib/archive/cpptasks/obsolete/cpptasks-patch-suncc-c91f003551542c2aab62dd8ef89a7894c7e50689.tar.gz
deleted file mode 100644
index 22f1cde..0000000
--- a/make/lib/archive/cpptasks/obsolete/cpptasks-patch-suncc-c91f003551542c2aab62dd8ef89a7894c7e50689.tar.gz
+++ /dev/null
Binary files differ
diff --git a/make/lib/cpptasks-version.txt b/make/lib/cpptasks-version.txt
index 8c746d6..339d395 100755
--- a/make/lib/cpptasks-version.txt
+++ b/make/lib/cpptasks-version.txt
@@ -1,13 +1,5 @@
Current cpptasks is from
- <http://ant-contrib.sourceforge.net/cpptasks/index.html>
-
-Version '1.0 beta 5' / r175:
- <http://ant-contrib.svn.sourceforge.net/viewvc/ant-contrib/cpptasks/trunk/>
- <http://sourceforge.net/projects/ant-contrib/files/ant-contrib/cpptasks-1.0-beta5/>
+ <http://jogamp.org/git/?p=ant-cpptasks.git;a=summary>
-Plus the accumulated patches:
- - cpptasks-1.0b5-darwin.patch - Make OSX/Darwin work (linker options etc)
- - cpptasks-1.0b5-gcclinker.patch - Make crosscompilation work (--sysroot .. etc)
-
-See archive/cpptasks/
-and archive/cpptasks/cpptasks-1.0b5.patches.txt
+Original cpptasks is from
+ <http://ant-contrib.sourceforge.net/cpptasks/index.html>
diff --git a/make/lib/cpptasks.jar b/make/lib/cpptasks.jar
index a97e636..046a01c 100644
--- a/make/lib/cpptasks.jar
+++ b/make/lib/cpptasks.jar
Binary files differ
diff --git a/make/lib/gluegen-clang.properties b/make/lib/gluegen-clang.properties
new file mode 100755
index 0000000..bbb77ae
--- /dev/null
+++ b/make/lib/gluegen-clang.properties
@@ -0,0 +1 @@
+gcc.compat.compiler=clang
diff --git a/make/lib/junit-sources.jar b/make/lib/junit-sources.jar
new file mode 100644
index 0000000..11c221b
--- /dev/null
+++ b/make/lib/junit-sources.jar
Binary files differ
diff --git a/make/lib/junit.LICENSE.txt b/make/lib/junit.LICENSE.txt
index 3bdeeb7..78e1d6e 100644
--- a/make/lib/junit.LICENSE.txt
+++ b/make/lib/junit.LICENSE.txt
@@ -1,88 +1,267 @@
-Project Website incl source code: http://www.junit.org/
+junit.jar + junit-source.zip contains:
+ - junit version version 4.11
+ - hamcrest-core version 1.3
-Common Public License - v 1.0
+It is bundled for JogAmp builds allowing as a drop-in
+replacement of junit 4.8.2!
-THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+Below follows both project locations and licenses.
+
+++++
+
+Project Website incl source code:
+ http://hamcrest.org/
+ https://github.com/hamcrest/JavaHamcrest
+
+LICENSE: BSD-3-Clause
+ http://opensource.org/licenses/BSD-3-Clause
+
+BSD License
+
+Copyright (c) 2000-2006, www.hamcrest.org
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice, this list of
+conditions and the following disclaimer. Redistributions in binary form must reproduce
+the above copyright notice, this list of conditions and the following disclaimer in
+the documentation and/or other materials provided with the distribution.
+
+Neither the name of Hamcrest nor the names of its contributors may be used to endorse
+or promote products derived from this software without specific prior written
+permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
+WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGE.
+
+++++
+
+Project Website incl source code:
+ http://www.junit.org/
+ https://github.com/junit-team/junit/
+
+JUnit
+
+Eclipse Public License - v 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
+LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
+CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
1. DEFINITIONS
"Contribution" means:
- a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
+ a) in the case of the initial Contributor, the initial code and
+ documentation distributed under this Agreement, and
b) in the case of each subsequent Contributor:
i) changes to the Program, and
ii) additions to the Program;
- where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
+ where such changes and/or additions to the Program originate from and are
+distributed by that particular Contributor. A Contribution 'originates' from a
+Contributor if it was added to the Program by such Contributor itself or anyone
+acting on such Contributor's behalf. Contributions do not include additions to
+the Program which: (i) are separate modules of software distributed in
+conjunction with the Program under their own license agreement, and (ii) are
+not derivative works of the Program.
"Contributor" means any person or entity that distributes the Program.
-"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
+"Licensed Patents " mean patent claims licensable by a Contributor which are
+necessarily infringed by the use or sale of its Contribution alone or when
+combined with the Program.
"Program" means the Contributions distributed in accordance with this Agreement.
-"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
+"Recipient" means anyone who receives the Program under this Agreement,
+including all Contributors.
2. GRANT OF RIGHTS
- a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
-
- b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
-
- c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
-
- d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
+ a) Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide, royalty-free copyright license to
+reproduce, prepare derivative works of, publicly display, publicly perform,
+distribute and sublicense the Contribution of such Contributor, if any, and
+such derivative works, in source code and object code form.
+
+ b) Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide, royalty-free patent license under
+Licensed Patents to make, use, sell, offer to sell, import and otherwise
+transfer the Contribution of such Contributor, if any, in source code and
+object code form. This patent license shall apply to the combination of the
+Contribution and the Program if, at the time the Contribution is added by the
+Contributor, such addition of the Contribution causes such combination to be
+covered by the Licensed Patents. The patent license shall not apply to any
+other combinations which include the Contribution. No hardware per se is
+licensed hereunder.
+
+ c) Recipient understands that although each Contributor grants the
+licenses to its Contributions set forth herein, no assurances are provided by
+any Contributor that the Program does not infringe the patent or other
+intellectual property rights of any other entity. Each Contributor disclaims
+any liability to Recipient for claims brought by any other entity based on
+infringement of intellectual property rights or otherwise. As a condition to
+exercising the rights and licenses granted hereunder, each Recipient hereby
+assumes sole responsibility to secure any other intellectual property rights
+needed, if any. For example, if a third party patent license is required to
+allow Recipient to distribute the Program, it is Recipient's responsibility to
+acquire that license before distributing the Program.
+
+ d) Each Contributor represents that to its knowledge it has sufficient
+copyright rights in its Contribution, if any, to grant the copyright license
+set forth in this Agreement.
3. REQUIREMENTS
-A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
+A Contributor may choose to distribute the Program in object code form under
+its own license agreement, provided that:
a) it complies with the terms and conditions of this Agreement; and
b) its license agreement:
- i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
+ i) effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose;
- ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
+ ii) effectively excludes on behalf of all Contributors all liability for
+damages, including direct, indirect, special, incidental and consequential
+damages, such as lost profits;
- iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
+ iii) states that any provisions which differ from this Agreement are
+offered by that Contributor alone and not by any other party; and
- iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
+ iv) states that source code for the Program is available from such
+Contributor, and informs licensees how to obtain it in a reasonable manner on
+or through a medium customarily used for software exchange.
When the Program is made available in source code form:
- a) it must be made available under this Agreement; and
+ a) it must be made available under this Agreement; and
- b) a copy of this Agreement must be included with each copy of the Program.
+ b) a copy of this Agreement must be included with each copy of the
+Program.
-Contributors may not remove or alter any copyright notices contained within the Program.
+Contributors may not remove or alter any copyright notices contained within the
+Program.
-Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
+Each Contributor must identify itself as the originator of its Contribution, if
+any, in a manner that reasonably allows subsequent Recipients to identify the
+originator of the Contribution.
4. COMMERCIAL DISTRIBUTION
-Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
-
-For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
+Commercial distributors of software may accept certain responsibilities with
+respect to end users, business partners and the like. While this license is
+intended to facilitate the commercial use of the Program, the Contributor who
+includes the Program in a commercial product offering should do so in a manner
+which does not create potential liability for other Contributors. Therefore, if
+a Contributor includes the Program in a commercial product offering, such
+Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
+every other Contributor ("Indemnified Contributor") against any losses, damages
+and costs (collectively "Losses") arising from claims, lawsuits and other legal
+actions brought by a third party against the Indemnified Contributor to the
+extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may
+participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial product
+offering, Product X. That Contributor is then a Commercial Contributor. If that
+Commercial Contributor then makes performance claims, or offers warranties
+related to Product X, those performance claims and warranties are such
+Commercial Contributor's responsibility alone. Under this section, the
+Commercial Contributor would have to defend claims against the other
+Contributors related to those performance claims and warranties, and if a court
+requires any other Contributor to pay any damages as a result, the Commercial
+Contributor must pay those damages.
5. NO WARRANTY
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
+IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
+NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
+Recipient is solely responsible for determining the appropriateness of using
+and distributing the Program and assumes all risks associated with its exercise
+of rights under this Agreement, including but not limited to the risks and
+costs of program errors, compliance with applicable laws, damage to or loss of
+data, programs or equipment, and unavailability or interruption of operations.
6. DISCLAIMER OF LIABILITY
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
+CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
+PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
+WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
+GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
7. GENERAL
-If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
-
-If Recipient institutes patent litigation against a Contributor with respect to a patent applicable to software (including a cross-claim or counterclaim in a lawsuit), then any patent licenses granted by that Contributor to such Recipient under this Agreement shall terminate as of the date such litigation is filed. In addition, if Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
-
-All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
+If any provision of this Agreement is invalid or unenforceable under applicable
+law, it shall not affect the validity or enforceability of the remainder of the
+terms of this Agreement, and without further action by the parties hereto, such
+provision shall be reformed to the minimum extent necessary to make such
+provision valid and enforceable.
+
+If Recipient institutes patent litigation against any
+entity (including a cross-claim or counterclaim in a lawsuit) alleging that the
+Program itself (excluding combinations of the Program with other software or
+hardware) infringes such Recipient's patent(s), then such Recipient's rights
+granted under Section 2(b) shall terminate as of the date such litigation is
+filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails to
+comply with any of the material terms or conditions of this Agreement and does
+not cure such failure in a reasonable period of time after becoming aware of
+such noncompliance. If all Recipient's rights under this Agreement terminate,
+Recipient agrees to cease use and distribution of the Program as soon as
+reasonably practicable. However, Recipient's obligations under this Agreement
+and any licenses granted by Recipient relating to the Program shall continue
+and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement, but in
+order to avoid inconsistency the Agreement is copyrighted and may only be
+modified in the following manner. The Agreement Steward reserves the right to
+publish new versions (including revisions) of this Agreement from time to time.
+No one other than the Agreement Steward has the right to modify this Agreement.
+The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.
+
+This Agreement is governed by the laws of the State of New York and the
+intellectual property laws of the United States of America. No party to this
+Agreement will bring a legal action under this Agreement more than one year
+after the cause of action arose. Each party waives its rights to a jury trial
+in any resulting litigation.
-Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. IBM is the initial Agreement Steward. IBM may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
-This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.
diff --git a/make/lib/junit.jar b/make/lib/junit.jar
index 5b4bb84..af8b312 100644
--- a/make/lib/junit.jar
+++ b/make/lib/junit.jar
Binary files differ
diff --git a/make/lib/junit.txt b/make/lib/junit.txt
deleted file mode 100644
index c7b67bc..0000000
--- a/make/lib/junit.txt
+++ /dev/null
@@ -1 +0,0 @@
-version 4.8.2
diff --git a/make/resources/android/AndroidManifest-Launcher.xml b/make/resources/android/AndroidManifest-Launcher.xml
index 1805496..b554267 100644
--- a/make/resources/android/AndroidManifest-Launcher.xml
+++ b/make/resources/android/AndroidManifest-Launcher.xml
@@ -4,12 +4,14 @@
package="jogamp.android.launcher">
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
- <!-- uses-feature android:name="android.hardware.camera" android:required="false" / --> <!-- not yet -->
+ <uses-feature android:name="android.hardware.camera" android:required="false" />
+ <uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
<uses-permission android:name="android.permission.INTERNET" /> <!-- required for NV's PerfHud and I-Net data streaming -->
<!-- uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" / --> <!-- required for Android-Trace -->
+ <uses-permission android:name="android.permission.CAMERA" />
- <uses-sdk android:minSdkVersion="9" />
+ <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="14"/>
<application android:icon="@drawable/icon"
android:label="@string/app_launcher_name"
diff --git a/make/resources/android/AndroidManifest-Runtime.xml b/make/resources/android/AndroidManifest-Runtime.xml
index dc306b9..7c9d867 100644
--- a/make/resources/android/AndroidManifest-Runtime.xml
+++ b/make/resources/android/AndroidManifest-Runtime.xml
@@ -6,7 +6,7 @@
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
<!-- uses-feature android:name="android.hardware.camera" android:required="false" / --> <!-- not yet -->
- <uses-sdk android:minSdkVersion="9" />
+ <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="14"/>
<application android:icon="@drawable/icon"
android:label="@string/app_runtime_name"
diff --git a/make/resources/android/AndroidManifest-Test.xml b/make/resources/android/AndroidManifest-Test.xml
index 962eeb9..41bee09 100644
--- a/make/resources/android/AndroidManifest-Test.xml
+++ b/make/resources/android/AndroidManifest-Test.xml
@@ -4,11 +4,12 @@
package="com.jogamp.gluegen.test">
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
- <!-- uses-feature android:name="android.hardware.camera" android:required="false" / --> <!-- not yet -->
+ <uses-feature android:name="android.hardware.camera" android:required="false" />
+ <uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
<uses-library android:name="com.jogamp.common" android:required="true" />
- <uses-sdk android:minSdkVersion="9" />
+ <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="14"/>
<application android:icon="@drawable/icon"
android:label="@string/app_test_name"
diff --git a/make/scripts/check-java-major-version.sh b/make/scripts/check-java-major-version.sh
index 0e4424d..6b1711c 100755
--- a/make/scripts/check-java-major-version.sh
+++ b/make/scripts/check-java-major-version.sh
@@ -22,4 +22,8 @@ function do_it() {
}
do_it $1 2>&1 | tee check-java-major-version.log
+echo
+echo VERSIONS found:
+echo
+grep 'major version' check-java-major-version.log | sort -u
diff --git a/make/scripts/java-win32.bat b/make/scripts/java-win32.bat
index 616c9dd..7a66de0 100755
--- a/make/scripts/java-win32.bat
+++ b/make/scripts/java-win32.bat
@@ -1,7 +1,7 @@
set BLD_SUB=build-win32
-set J2RE_HOME=c:\jre1.7.0_25_x32
-set JAVA_HOME=c:\jdk1.7.0_25_x32
+set J2RE_HOME=c:\jre1.7.0_40_x32
+set JAVA_HOME=c:\jdk1.7.0_40_x32
set ANT_PATH=C:\apache-ant-1.8.2
set BLD_DIR=..\%BLD_SUB%
diff --git a/make/scripts/java-win64.bat b/make/scripts/java-win64.bat
index 17f389c..c0142eb 100755
--- a/make/scripts/java-win64.bat
+++ b/make/scripts/java-win64.bat
@@ -1,7 +1,7 @@
set BLD_SUB=build-win64
-set J2RE_HOME=c:\jre1.7.0_25_x64
-set JAVA_HOME=c:\jdk1.7.0_25_x64
+set J2RE_HOME=c:\jre1.7.0_40_x64
+set JAVA_HOME=c:\jdk1.7.0_40_x64
set ANT_PATH=C:\apache-ant-1.8.2
set BLD_DIR=..\%BLD_SUB%
diff --git a/make/scripts/make.gluegen.all.macosx-clang.sh b/make/scripts/make.gluegen.all.macosx-clang.sh
new file mode 100755
index 0000000..4f84d39
--- /dev/null
+++ b/make/scripts/make.gluegen.all.macosx-clang.sh
@@ -0,0 +1,29 @@
+#! /bin/sh
+
+if [ -e /opt-share/etc/profile.ant ] ; then
+ . /opt-share/etc/profile.ant
+fi
+
+# -Dc.compiler.debug=true
+#
+# -Dtarget.sourcelevel=1.6 \
+# -Dtarget.targetlevel=1.6 \
+# -Dtarget.rt.jar=/opt-share/jre1.6.0_30/lib/rt.jar \
+
+JAVA_HOME=`/usr/libexec/java_home -version 1.7`
+PATH=$JAVA_HOME/bin:$PATH
+export JAVA_HOME PATH
+
+export SOURCE_LEVEL=1.6
+export TARGET_LEVEL=1.6
+export TARGET_RT_JAR=/opt-share/jre1.6.0_30/lib/rt.jar
+
+export GLUEGEN_PROPERTIES_FILE="lib/gluegen-clang.properties"
+# or -Dgcc.compat.compiler=clang
+
+#export JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org"
+export JOGAMP_JAR_CODEBASE="Codebase: *.goethel.localnet"
+
+ant \
+ -Drootrel.build=build-macosx \
+ $* 2>&1 | tee make.gluegen.all.macosx.log
diff --git a/make/scripts/make.gluegen.all.win32.bat b/make/scripts/make.gluegen.all.win32.bat
index 29da9db..62a2214 100755
--- a/make/scripts/make.gluegen.all.win32.bat
+++ b/make/scripts/make.gluegen.all.win32.bat
@@ -1,7 +1,7 @@
set THISDIR="C:\JOGL"
-set J2RE_HOME=c:\jre1.7.0_25_x32
-set JAVA_HOME=c:\jdk1.7.0_25_x32
+set J2RE_HOME=c:\jre1.7.0_40_x32
+set JAVA_HOME=c:\jdk1.7.0_40_x32
set ANT_PATH=C:\apache-ant-1.8.2
set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;c:\mingw\bin;%PATH%
diff --git a/make/scripts/make.gluegen.all.win64.bat b/make/scripts/make.gluegen.all.win64.bat
index d46e740..aeec4f2 100755
--- a/make/scripts/make.gluegen.all.win64.bat
+++ b/make/scripts/make.gluegen.all.win64.bat
@@ -1,7 +1,7 @@
set THISDIR="C:\JOGL"
-set J2RE_HOME=c:\jre1.7.0_25_x64
-set JAVA_HOME=c:\jdk1.7.0_25_x64
+set J2RE_HOME=c:\jre1.7.0_40_x64
+set JAVA_HOME=c:\jdk1.7.0_40_x64
set ANT_PATH=C:\apache-ant-1.8.2
set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;c:\mingw64\bin;c:\mingw\bin;%PATH%
diff --git a/make/scripts/runtest.sh b/make/scripts/runtest.sh
index ac33ece..2681b84 100755
--- a/make/scripts/runtest.sh
+++ b/make/scripts/runtest.sh
@@ -75,7 +75,7 @@ function onetest() {
echo
}
#
-#onetest com.jogamp.common.GlueGenVersion 2>&1 | tee -a $LOG
+onetest com.jogamp.common.GlueGenVersion 2>&1 | tee -a $LOG
#onetest com.jogamp.common.util.TestSystemPropsAndEnvs 2>&1 | tee -a $LOG
#onetest com.jogamp.common.util.TestVersionInfo 2>&1 | tee -a $LOG
#onetest com.jogamp.common.util.TestVersionNumber 2>&1 | tee -a $LOG
@@ -97,8 +97,8 @@ function onetest() {
#onetest com.jogamp.common.util.TestTempJarCache 2>&1 | tee -a $LOG
#onetest com.jogamp.common.util.TestJarUtil 2>&1 | tee -a $LOG
#onetest com.jogamp.common.util.TestValueConversion 2>&1 | tee -a $LOG
-onetest com.jogamp.common.util.TestSyncRingBuffer01 $*
-onetest com.jogamp.common.util.TestLFRingBuffer01 $*
+#onetest com.jogamp.common.util.TestSyncRingBuffer01 $*
+#onetest com.jogamp.common.util.TestLFRingBuffer01 $*
#onetest com.jogamp.common.net.AssetURLConnectionUnregisteredTest 2>&1 | tee -a $LOG
#onetest com.jogamp.common.net.AssetURLConnectionRegisteredTest 2>&1 | tee -a $LOG
#onetest com.jogamp.common.net.URLCompositionTest 2>&1 | tee -a $LOG
diff --git a/make/stub_includes/jni/macosx/jawt_md.h b/make/stub_includes/jni/macosx/jawt_md.h
index e65474b..3b019dd 100644
--- a/make/stub_includes/jni/macosx/jawt_md.h
+++ b/make/stub_includes/jni/macosx/jawt_md.h
@@ -59,7 +59,7 @@ JAWT_MacOSXDrawingSurfaceInfo;
@property (readonly) CALayer *windowLayer;
@end
-#endif __GLUEGEN__
+#endif /* __GLUEGEN__ */
#ifdef __cplusplus
}
diff --git a/make/stub_includes/platform/glibc-compat-symbols.h b/make/stub_includes/platform/glibc-compat-symbols.h
index 135a8d6..5dc1a18 100644
--- a/make/stub_includes/platform/glibc-compat-symbols.h
+++ b/make/stub_includes/platform/glibc-compat-symbols.h
@@ -3,6 +3,9 @@
/**
*
+ * Note: Patching a specific glibc symbol version is only required if *not* statically linking glibc,
+ * which should be preferred.
+ *
* Note: JogAmp's minimum GLIBC is 2.4 due to '__stack_chk_fail' (stack overflow checking)
*
* GLIBC 2.4 - March 2006 - Standard for LSB 4.0, Used in SLES 10
@@ -12,13 +15,18 @@
*
* Check build-in macro definitions via 'gcc -dM -E - < /dev/null'
*/
-#if defined(__arm__)
- #define GLIBC_COMPAT_SYMBOL(FFF) __asm__(".symver " #FFF "," #FFF "@GLIBC_2.4");
-#elif defined(__amd64__)
- #define GLIBC_COMPAT_SYMBOL(FFF) __asm__(".symver " #FFF "," #FFF "@GLIBC_2.2.5");
+#if defined(__GNUC__) && !defined(__clang__)
+ #if defined(__arm__)
+ #define GLIBC_COMPAT_SYMBOL(FFF) __asm__(".symver " #FFF "," #FFF "@GLIBC_2.4");
+ #elif defined(__amd64__)
+ #define GLIBC_COMPAT_SYMBOL(FFF) __asm__(".symver " #FFF "," #FFF "@GLIBC_2.2.5");
+ #else
+ #define GLIBC_COMPAT_SYMBOL(FFF) __asm__(".symver " #FFF "," #FFF "@GLIBC_2.2.5");
+ #endif /*__amd64__*/
#else
- #define GLIBC_COMPAT_SYMBOL(FFF) __asm__(".symver " #FFF "," #FFF "@GLIBC_2.2.5");
-#endif /*__amd64__*/
+ #warning GLIBC_COMPAT_SYMBOL not supported with current compiler
+ #define GLIBC_COMPAT_SYMBOL(FFF)
+#endif
GLIBC_COMPAT_SYMBOL(memcpy)
diff --git a/src/java/com/jogamp/common/jvm/JNILibLoaderBase.java b/src/java/com/jogamp/common/jvm/JNILibLoaderBase.java
index 2023162..67cc05c 100644
--- a/src/java/com/jogamp/common/jvm/JNILibLoaderBase.java
+++ b/src/java/com/jogamp/common/jvm/JNILibLoaderBase.java
@@ -44,6 +44,7 @@ import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.URI;
import java.net.URISyntaxException;
+import java.net.URL;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.Arrays;
@@ -147,24 +148,56 @@ public class JNILibLoaderBase {
loaderAction = action;
}
- /* pp */ static final boolean addNativeJarLibsImpl(Class<?> classFromJavaJar, URI classJarURI, String nativeJarBasename, StringBuilder msg)
+ /**
+ *
+ * @param classFromJavaJar
+ * @param classJarURI
+ * @param jarBasename jar basename w/ suffix
+ * @param nativeJarBasename native jar basename w/ suffix
+ * @param msg
+ * @return
+ * @throws IOException
+ * @throws SecurityException
+ * @throws URISyntaxException
+ */
+ /* pp */ static final boolean addNativeJarLibsImpl(Class<?> classFromJavaJar, URI classJarURI, String jarBasename, String nativeJarBasename, StringBuilder msg)
throws IOException, SecurityException, URISyntaxException
{
msg.setLength(0); // reset
- msg.append("addNativeJarLibsImpl(classFromJavaJar ").append(classFromJavaJar).append(", classJarURI ").append(classJarURI).append(", nativeJarBaseName ").append(nativeJarBasename).append("): ");
+ msg.append("addNativeJarLibsImpl(classFromJavaJar ").append(classFromJavaJar).append(", classJarURI ").append(classJarURI)
+ .append(", nativeJarBaseName ").append(nativeJarBasename).append("): ");
boolean ok = false;
- if(TempJarCache.isInitialized()) {
- final String nativeJarName = nativeJarBasename+"-natives-"+PlatformPropsImpl.os_and_arch+".jar";
- msg.append(nativeJarName);
- final URI jarUriRoot = IOUtil.getDirname( JarUtil.getJarSubURI( classJarURI ) );
- msg.append(" + ").append(jarUriRoot);
- final URI nativeJarURI = JarUtil.getJarFileURI(jarUriRoot, nativeJarName);
- msg.append(" -> ").append(nativeJarURI);
- if(DEBUG) {
- System.err.println(msg.toString());
+ if(TempJarCache.isInitialized()) {
+ final URI jarSubURI = JarUtil.getJarSubURI( classJarURI );
+ if(null == jarSubURI) {
+ throw new IllegalArgumentException("JarSubURI is null of: "+classJarURI);
+ }
+ final String jarUriRoot_s = IOUtil.getURIDirname( jarSubURI.toString() );
+ msg.append("[ ").append(jarSubURI.toString()).append(" -> ").append(jarUriRoot_s).append(" ] + ");
+
+ final String nativeLibraryPath = "natives/"+PlatformPropsImpl.os_and_arch+"/";
+ final ClassLoader cl = classFromJavaJar.getClassLoader();
+ final URL nativeLibraryURI = cl.getResource(nativeLibraryPath);
+ if( null != nativeLibraryURI ) {
+ // We probably have one big-fat jar file, containing java classes
+ // and all native platform libraries under 'natives/os.and.arch'!
+ final URI nativeJarURI = JarUtil.getJarFileURI(jarUriRoot_s+jarBasename);
+ if( TempJarCache.addNativeLibs(classFromJavaJar, nativeJarURI, nativeLibraryPath) ) {
+ ok = true;
+ msg.append(jarBasename).append(" -> fat: ").append(nativeJarURI);
+ }
}
- TempJarCache.addNativeLibs(classFromJavaJar, nativeJarURI);
- ok = true;
+ if( !ok ) {
+ // We assume one slim native jar file per 'os.and.arch'!
+ final URI nativeJarURI = JarUtil.getJarFileURI(jarUriRoot_s+nativeJarBasename);
+ msg.append(nativeJarBasename).append(" -> slim: ").append(nativeJarURI);
+ ok = TempJarCache.addNativeLibs(classFromJavaJar, nativeJarURI, null /* nativeLibraryPath */);
+ }
+ } else {
+ msg.append("TempJarCache n/a");
+ }
+ if(DEBUG) {
+ System.err.println(msg.toString()+" - OK "+ok);
}
return ok;
}
@@ -193,7 +226,8 @@ public class JNILibLoaderBase {
final StringBuilder msg = new StringBuilder();
try {
final URI classJarURI = JarUtil.getJarURI(classFromJavaJar.getName(), classFromJavaJar.getClassLoader());
- return addNativeJarLibsImpl(classFromJavaJar, classJarURI, nativeJarBasename, msg);
+ final String jarName = JarUtil.getJarBasename(classJarURI);
+ return addNativeJarLibsImpl(classFromJavaJar, classJarURI, jarName, nativeJarBasename+"-natives-"+PlatformPropsImpl.os_and_arch+".jar", msg);
} catch (Exception e0) {
// IllegalArgumentException, IOException
System.err.println("Catched "+e0.getClass().getSimpleName()+": "+e0.getMessage()+", while "+msg.toString());
@@ -208,6 +242,30 @@ public class JNILibLoaderBase {
}
/**
+ * Loads and adds a JAR file's native library to the TempJarCache,
+ * calling {@link JNILibLoaderBase#addNativeJarLibs(Class[], String, String[])}
+ * with default JOGL deployment configuration:
+ * <pre>
+ return JNILibLoaderBase.addNativeJarLibs(classesFromJavaJars, "-all", new String[] { "-noawt", "-mobile", "-core", "-android" } );
+ * </pre>
+ * If <code>Class1.class</code> is contained in a JAR file which name includes <code>singleJarMarker</code> <i>-all</i>,
+ * implementation will attempt to resolve the native JAR file as follows:
+ * <ul>
+ * <li><i>ClassJar-all</i>[-noawt,-mobile,-android]?.jar to <i>ClassJar-all</i>-natives-<i>os.and.arch</i>.jar</li>
+ * </ul>
+ * Otherwise the native JAR files will be resolved for each class's JAR file:
+ * <ul>
+ * <li><i>ClassJar1</i>[-noawt,-mobile,-core,-android]?.jar to <i>ClassJar1</i>-natives-<i>os.and.arch</i>.jar</li>
+ * <li><i>ClassJar2</i>[-noawt,-mobile,-core,-android]?.jar to <i>ClassJar2</i>-natives-<i>os.and.arch</i>.jar</li>
+ * <li>..</li>
+ * </ul>
+ */
+ public static final boolean addNativeJarLibsJoglCfg(final Class<?>[] classesFromJavaJars) {
+ return addNativeJarLibs(classesFromJavaJars, "-all", joglDeployCfg);
+ }
+ private static final String[] joglDeployCfg = new String[] { "-noawt", "-mobile", "-core", "-android" };
+
+ /**
* Loads and adds a JAR file's native library to the TempJarCache.<br>
* The native library JAR file's URI is derived as follows:
* <ul>
@@ -223,37 +281,59 @@ public class JNILibLoaderBase {
* <li> [3] is it's <i>base URI</i></li>
* <li> [4] is the derived native JAR filename</li>
* </ul>
- *
- * Examples:<br>
- * <br>
+ * <p>
+ * Generic description:
+ * <pre>
+ final ClassLoader cl = GLProfile.class.getClassLoader();
+ final String newtFactoryClassName = "com.jogamp.newt.NewtFactory";
+ final Class<?>[] classesFromJavaJars = new Class<?>[] { Class1.class, Class2.class };
+ JNILibLoaderBase.addNativeJarLibs(classesFromJavaJars, "-all", new String[] { "-suff1", "-suff2" } );
+ * </pre>
+ * If <code>Class1.class</code> is contained in a JAR file which name includes <code>singleJarMarker</code>, here <i>-all</i>,
+ * implementation will attempt to resolve the native JAR file as follows:
+ * <ul>
+ * <li><i>ClassJar-all</i>[-suff1,-suff2]?.jar to <i>ClassJar-all</i>-natives-<i>os.and.arch</i>.jar</li>
+ * </ul>
+ * Otherwise the native JAR files will be resolved for each class's JAR file:
+ * <ul>
+ * <li><i>Class1Jar</i>[-suff1,-suff2]?.jar to <i>Class1Jar</i>-natives-<i>os.and.arch</i>.jar</li>
+ * <li><i>Class2Jar</i>[-suff1,-suff2]?.jar to <i>Class2Jar</i>-natives-<i>os.and.arch</i>.jar</li>
+ * </ul>
+ * </p>
+ * <p>
+ * Examples:
+ * </p>
+ * <p>
* JOCL:
* <pre>
- // only: jocl.jar -> jocl-natives-'os.and.arch'.jar
+ // only: jocl.jar -> jocl-natives-<i>os.and.arch</i>.jar
addNativeJarLibs(new Class<?>[] { JOCLJNILibLoader.class }, null, null );
* </pre>
*
* Newt Only:
* <pre>
- // either: [jogl-all.jar, jogl-all-noawt.jar, jogl-all-mobile.jar] -> jogl-all-natives-<os.and.arch>.jar
- // or: nativewindow-core.jar -> nativewindow-natives-<os.and.arch>.jar,
- // newt-core.jar -> newt-natives-<os.and.arch>.jar
- JNILibLoaderBase.addNativeJarLibs(new Class<?>[] { NWJNILibLoader.class, NEWTJNILibLoader.class }, "-all", new String[] { "-noawt", "-mobile", "-core" } );
+ // either: [jogl-all.jar, jogl-all-noawt.jar, jogl-all-mobile.jar, jogl-all-android.jar] -> jogl-all-natives-<i>os.and.arch</i>.jar
+ // or: nativewindow-core.jar -> nativewindow-natives-<i>os.and.arch</i>.jar,
+ // newt-core.jar -> newt-natives-<i>os.and.arch</i>.jar
+ JNILibLoaderBase.addNativeJarLibs(new Class<?>[] { NWJNILibLoader.class, NEWTJNILibLoader.class }, "-all", new String[] { "-noawt", "-mobile", "-core", "-android" } );
* </pre>
- *
+ * </p>
+ * <p>
* JOGL:
* <pre>
final ClassLoader cl = GLProfile.class.getClassLoader();
- // either: [jogl-all.jar, jogl-all-noawt.jar, jogl-all-mobile.jar] -> jogl-all-natives-<os.and.arch>.jar
- // or: nativewindow-core.jar -> nativewindow-natives-<os.and.arch>.jar,
- // jogl-core.jar -> jogl-natives-<os.and.arch>.jar,
- // (newt-core.jar -> newt-natives-<os.and.arch>.jar)? (if available)
+ // either: [jogl-all.jar, jogl-all-noawt.jar, jogl-all-mobile.jar, jogl-all-android.jar] -> jogl-all-natives-<i>os.and.arch</i>.jar
+ // or: nativewindow-core.jar -> nativewindow-natives-<i>os.and.arch</i>.jar,
+ // jogl-core.jar -> jogl-natives-<i>os.and.arch</i>.jar,
+ // (newt-core.jar -> newt-natives-<i>os.and.arch</i>.jar)? (if available)
final String newtFactoryClassName = "com.jogamp.newt.NewtFactory";
final Class<?>[] classesFromJavaJars = new Class<?>[] { NWJNILibLoader.class, GLProfile.class, null };
if( ReflectionUtil.isClassAvailable(newtFactoryClassName, cl) ) {
classesFromJavaJars[2] = ReflectionUtil.getClass(newtFactoryClassName, false, cl);
}
- JNILibLoaderBase.addNativeJarLibs(classesFromJavaJars, "-all", new String[] { "-noawt", "-mobile", "-core" } );
+ JNILibLoaderBase.addNativeJarLibs(classesFromJavaJars, "-all", new String[] { "-noawt", "-mobile", "-core", "-android" } );
* </pre>
+ * </p>
*
* @param classesFromJavaJars For each given Class, load the native library JAR.
* @param singleJarMarker Optional string marker like "-all" to identify the single 'all-in-one' JAR file
@@ -281,9 +361,9 @@ public class JNILibLoaderBase {
ok = null != jarName;
if(ok) {
final String jarBasename = jarName.substring(0, jarName.indexOf(".jar")); // ".jar" already validated w/ JarUtil.getJarBasename(..)
- final String nativeJarBasename = stripName(jarBasename, stripBasenameSuffixes);
+ final String nativeJarBasename = stripName(jarBasename, stripBasenameSuffixes)+"-natives-"+PlatformPropsImpl.os_and_arch+".jar";
done = null != singleJarMarker && jarBasename.indexOf(singleJarMarker) >= 0; // done if single-jar ('all' variant)
- ok = JNILibLoaderBase.addNativeJarLibsImpl(classesFromJavaJars[i], classJarURI, nativeJarBasename, msg);
+ ok = JNILibLoaderBase.addNativeJarLibsImpl(classesFromJavaJars[i], classJarURI, jarName, nativeJarBasename, msg);
if(ok) { count++; }
if(DEBUG && done) {
System.err.println("JNILibLoaderBase: addNativeJarLibs0: end after all-in-one JAR: "+jarBasename);
diff --git a/src/java/com/jogamp/common/net/URIQueryProps.java b/src/java/com/jogamp/common/net/URIQueryProps.java
new file mode 100644
index 0000000..fd91b9b
--- /dev/null
+++ b/src/java/com/jogamp/common/net/URIQueryProps.java
@@ -0,0 +1,137 @@
+/**
+ * Copyright 2013 JogAmp Community. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of JogAmp Community.
+ */
+package com.jogamp.common.net;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Map.Entry;
+
+/**
+ * Helper class to process URI's query, handled as properties.
+ * <p>
+ * The order of the URI segments (any properties) are <i>not</i> preserved.
+ * </p>
+ * <pre>
+ * URI: [scheme:][//authority][path][?query][#fragment]
+ * w/ authority: [user-info@]host[:port]
+ * Note: 'path' starts w/ fwd slash
+ * </pre>
+ */
+public class URIQueryProps {
+ private static final String QMARK = "?";
+ private static final char ASSIG = '=';
+ private static final String EMPTY = "";
+ private final String query_separator;
+
+ private final HashMap<String, String> properties = new HashMap<String, String>();
+
+ private URIQueryProps(char querySeparator) {
+ query_separator = String.valueOf(querySeparator);
+ }
+
+ public final Map<String, String> getProperties() { return properties; }
+ public final char getQuerySeparator() { return query_separator.charAt(0); }
+
+ public final String appendQuery(String baseQuery) {
+ boolean needsSep = false;
+ final StringBuilder sb = new StringBuilder();
+ if ( null != baseQuery ) {
+ if( !baseQuery.startsWith(QMARK) ) {
+ baseQuery = baseQuery.substring(1);
+ }
+ sb.append(baseQuery);
+ if( !baseQuery.endsWith(query_separator) ) {
+ needsSep = true;
+ }
+ }
+ Iterator<Entry<String, String>> entries = properties.entrySet().iterator();
+ while(entries.hasNext()) {
+ if(needsSep) {
+ sb.append(query_separator);
+ }
+ final Entry<String, String> entry = entries.next();
+ sb.append(entry.getKey());
+ if( EMPTY != entry.getValue() ) {
+ sb.append(ASSIG).append(entry.getValue());
+ }
+ needsSep = true;
+ }
+ return sb.toString();
+ }
+
+ public final URI appendQuery(URI base) throws URISyntaxException {
+ return new URI(base.getScheme(),
+ base.getRawUserInfo(), base.getHost(), base.getPort(),
+ base.getRawPath(), appendQuery(base.getRawQuery()), base.getRawFragment());
+ }
+
+ /**
+ *
+ * @param uri
+ * @param querySeparator should be either <i>;</i> or <i>&</i>, <i>;</i> is encouraged due to troubles of escaping <i>&</i>.
+ * @return
+ * @throws IllegalArgumentException if <code>querySeparator</code> is illegal, i.e. neither <i>;</i> nor <i>&</i>
+ */
+ public static final URIQueryProps create(URI uri, char querySeparator) throws IllegalArgumentException {
+ if( ';' != querySeparator && '&' != querySeparator ) {
+ throw new IllegalArgumentException("querySeparator is invalid: "+querySeparator);
+ }
+ final URIQueryProps data = new URIQueryProps(querySeparator);
+ final String q = uri.getQuery();
+ final int q_l = null != q ? q.length() : -1;
+ int q_e = -1;
+ while(q_e < q_l) {
+ int q_b = q_e + 1; // next term
+ q_e = q.indexOf(querySeparator, q_b);
+ if(0 == q_e) {
+ // single separator
+ continue;
+ }
+ if(0 > q_e) {
+ // end
+ q_e = q_l;
+ }
+ // n-part
+ final String part = q.substring(q_b, q_e);
+ final int assignment = part.indexOf(ASSIG);
+ if(0 < assignment) {
+ // assignment
+ final String k = part.substring(0, assignment);
+ final String v = part.substring(assignment+1);
+ data.properties.put(k, v);
+ } else {
+ // property key only
+ data.properties.put(part, EMPTY);
+ }
+ }
+ return data;
+ }
+}
diff --git a/src/java/com/jogamp/common/os/Platform.java b/src/java/com/jogamp/common/os/Platform.java
index 32fc9f4..a01a4b4 100644
--- a/src/java/com/jogamp/common/os/Platform.java
+++ b/src/java/com/jogamp/common/os/Platform.java
@@ -33,7 +33,7 @@ import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.concurrent.TimeUnit;
-import com.jogamp.common.util.IOUtil;
+import com.jogamp.common.jvm.JNILibLoaderBase;
import com.jogamp.common.util.JarUtil;
import com.jogamp.common.util.ReflectionUtil;
import com.jogamp.common.util.VersionNumber;
@@ -192,19 +192,11 @@ public class Platform extends PlatformPropsImpl {
// load GluegenRT native library
if(_USE_TEMP_JAR_CACHE[0] && TempJarCache.initSingleton()) {
- String nativeJarName = null;
- URI jarUriRoot = null;
- URI nativeJarURI = null;
try {
- final String jarName = JarUtil.getJarBasename( platformClassJarURI );
- final String nativeJarBasename = jarName.substring(0, jarName.indexOf(".jar")); // ".jar" already validated w/ JarUtil.getJarBasename(..)
- nativeJarName = nativeJarBasename+"-natives-"+PlatformPropsImpl.os_and_arch+".jar";
- jarUriRoot = IOUtil.getDirname( JarUtil.getJarSubURI( platformClassJarURI ) );
- nativeJarURI = JarUtil.getJarFileURI(jarUriRoot, nativeJarName);
- TempJarCache.bootstrapNativeLib(Platform.class, libBaseName, nativeJarURI);
+ JNILibLoaderBase.addNativeJarLibs(new Class<?>[] { Platform.class }, null, null );
} catch (Exception e0) {
// IllegalArgumentException, IOException
- System.err.println("Catched "+e0.getClass().getSimpleName()+": "+e0.getMessage()+", while TempJarCache.bootstrapNativeLib() of "+nativeJarURI+" ("+jarUriRoot+" + "+nativeJarName+")");
+ System.err.println("Catched "+e0.getClass().getSimpleName()+": "+e0.getMessage()+", while JNILibLoaderBase.addNativeJarLibs(..)");
}
}
DynamicLibraryBundle.GlueJNILibLoader.loadLibrary(libBaseName, false, cl);
diff --git a/src/java/com/jogamp/common/util/IOUtil.java b/src/java/com/jogamp/common/util/IOUtil.java
index de5a8ea..242f300 100644
--- a/src/java/com/jogamp/common/util/IOUtil.java
+++ b/src/java/com/jogamp/common/util/IOUtil.java
@@ -43,6 +43,7 @@ import java.net.URISyntaxException;
import java.net.URL;
import java.net.URLConnection;
import java.nio.ByteBuffer;
+import java.util.regex.Pattern;
import jogamp.common.Debug;
import jogamp.common.os.AndroidUtils;
@@ -169,7 +170,22 @@ public class IOUtil {
* @throws IOException
*/
public static int copyStream2Stream(InputStream in, OutputStream out, int totalNumBytes) throws IOException {
- final byte[] buf = new byte[Platform.getMachineDescription().pageSizeInBytes()];
+ return copyStream2Stream(Platform.getMachineDescription().pageSizeInBytes(), in, out, totalNumBytes);
+ }
+
+ /**
+ * Copy the specified input stream to the specified output stream. The total
+ * number of bytes written is returned.
+ *
+ * @param bufferSize the intermediate buffer size, should be {@link MachineDescription#pageSizeInBytes()} for best performance.
+ * @param in the source
+ * @param out the destination
+ * @param totalNumBytes informal number of expected bytes, maybe used for user feedback while processing. -1 if unknown
+ * @return
+ * @throws IOException
+ */
+ public static int copyStream2Stream(int bufferSize, InputStream in, OutputStream out, int totalNumBytes) throws IOException {
+ final byte[] buf = new byte[bufferSize];
int numBytes = 0;
while (true) {
int count;
@@ -181,7 +197,7 @@ public class IOUtil {
}
return numBytes;
}
-
+
/**
* Copy the specified input stream to a byte array, which is being returned.
*/
@@ -281,7 +297,7 @@ public class IOUtil {
* @throws URISyntaxException if path is empty or has no parent directory available while resolving <code>../</code>
*/
public static String slashify(String path, boolean startWithSlash, boolean endWithSlash) throws URISyntaxException {
- String p = path.replace('\\', '/'); // unify file seperator
+ String p = path.replace('\\', '/'); // unify file separator
if (startWithSlash && !p.startsWith("/")) {
p = "/" + p;
}
@@ -297,7 +313,7 @@ public class IOUtil {
* @throws URISyntaxException if the resulting string does not comply w/ an RFC 2396 URI
*/
public static URI toURISimple(File file) throws URISyntaxException {
- return new URI(FILE_SCHEME, null, slashify(file.getAbsolutePath(), true, file.isDirectory()), null);
+ return new URI(FILE_SCHEME, null, encodeToURI(slashify(file.getAbsolutePath(), true, file.isDirectory())), null);
}
/**
@@ -306,7 +322,7 @@ public class IOUtil {
* @throws URISyntaxException if the resulting string does not comply w/ an RFC 2396 URI
*/
public static URI toURISimple(String protocol, String file, boolean isDirectory) throws URISyntaxException {
- return new URI(protocol, null, slashify(file, true, isDirectory), null);
+ return new URI(protocol, null, encodeToURI(slashify(file, true, isDirectory)), null);
}
/**
@@ -429,7 +445,7 @@ public class IOUtil {
* @throws IllegalArgumentException if the URI doesn't match the expected formatting, or is null
* @throws URISyntaxException
*/
- public static URI getDirname(URI uri) throws IllegalArgumentException, URISyntaxException {
+ public static URI getURIDirname(URI uri) throws IllegalArgumentException, URISyntaxException {
if(null == uri) {
throw new IllegalArgumentException("URI is null");
}
@@ -437,6 +453,25 @@ public class IOUtil {
if( DEBUG ) {
System.out.println("getURIDirname "+uri+", extForm: "+uriS);
}
+ return new URI( getURIDirname(uriS) );
+ }
+
+ /**
+ * The URI's <code><i>protocol</i>:/some/path/gluegen-rt.jar</code>
+ * parent dirname URI <code><i>protocol</i>:/some/path/</code> will be returned.
+ * <p>
+ * <i>protocol</i> may be "file", "http", etc..
+ * </p>
+ *
+ * @param uri "<i>protocol</i>:/some/path/gluegen-rt.jar" (URI encoded)
+ * @return "<i>protocol</i>:/some/path/"
+ * @throws IllegalArgumentException if the URI doesn't match the expected formatting, or is null
+ * @throws URISyntaxException
+ */
+ public static String getURIDirname(String uriS) throws IllegalArgumentException, URISyntaxException {
+ if(null == uriS) {
+ throw new IllegalArgumentException("uriS is null");
+ }
// from
// file:/some/path/gluegen-rt.jar _or_ rsrc:gluegen-rt.jar
// to
@@ -446,7 +481,7 @@ public class IOUtil {
// no abs-path, check for protocol terminator ':'
idx = uriS.lastIndexOf(':');
if(0 > idx) {
- throw new IllegalArgumentException("URI does not contain protocol terminator ':', in <"+uri+">");
+ throw new IllegalArgumentException("URI does not contain protocol terminator ':', in <"+uriS+">");
}
}
uriS = uriS.substring(0, idx+1); // exclude jar name, include terminal '/' or ':'
@@ -454,7 +489,7 @@ public class IOUtil {
if( DEBUG ) {
System.out.println("getJarURIDirname res: "+uriS);
}
- return new URI(uriS);
+ return uriS;
}
/**
@@ -479,22 +514,40 @@ public class IOUtil {
* @throws URISyntaxException
*/
public static URL toURL(URI uri) throws IOException, IllegalArgumentException, URISyntaxException {
- final URL url;
+ URL url = null;
final String uriSchema = uri.getScheme();
final boolean isJAR = IOUtil.JAR_SCHEME.equals(uriSchema);
- final URI specificURI = isJAR ? JarUtil.getJarSubURI(uri) : uri;
+ final URI specificURI = isJAR ? JarUtil.getJarSubURI(uri) : uri;
+ int mode = 0;
if( IOUtil.FILE_SCHEME.equals( specificURI.getScheme() ) ) {
- final File f = new File(specificURI);
- if( specificURI == uri ) {
- url = new URL(IOUtil.FILE_SCHEME+IOUtil.SCHEME_SEPARATOR+f.getPath());
- // url = f.toURI().toURL(); // Doesn't work, since it uses encoded path!
- } else {
- final String post = isJAR ? IOUtil.JAR_SCHEME_SEPARATOR + JarUtil.getJarEntry(uri) : "";
- final String urlS = uriSchema+IOUtil.SCHEME_SEPARATOR+IOUtil.FILE_SCHEME+IOUtil.SCHEME_SEPARATOR+f.getPath()+post;
- url = new URL(urlS);
+ File f;
+ try {
+ f = new File(specificURI);
+ } catch( IllegalArgumentException iae) {
+ if( DEBUG ) {
+ System.out.println("toURL: "+uri+" -> File("+specificURI+") failed: "+iae.getMessage());
+ }
+ f = null;
}
- } else {
+ if( null != f ) {
+ if( specificURI == uri ) {
+ url = new URL(IOUtil.FILE_SCHEME+IOUtil.SCHEME_SEPARATOR+f.getPath());
+ // url = f.toURI().toURL(); // Doesn't work, since it uses encoded path!
+ mode = 1;
+ } else {
+ final String post = isJAR ? IOUtil.JAR_SCHEME_SEPARATOR + JarUtil.getJarEntry(uri) : "";
+ final String urlS = uriSchema+IOUtil.SCHEME_SEPARATOR+IOUtil.FILE_SCHEME+IOUtil.SCHEME_SEPARATOR+f.getPath()+post;
+ url = new URL(urlS);
+ mode = 2;
+ }
+ }
+ }
+ if( null == url ) {
url = uri.toURL();
+ mode = 3;
+ }
+ if( DEBUG ) {
+ System.err.println("IOUtil.toURL: "+uri+", isJar "+isJAR+": "+specificURI+" -> mode "+mode+", "+url);
}
return url;
}
@@ -675,7 +728,7 @@ public class IOUtil {
* @throws URISyntaxException if path is empty or has no parent directory available while resolving <code>../</code>
*/
public static URI getRelativeOf(URI baseURI, String relativePath) throws URISyntaxException {
- return compose(baseURI.getScheme(), baseURI.getRawSchemeSpecificPart(), relativePath, baseURI.getRawFragment());
+ return compose(baseURI.getScheme(), baseURI.getSchemeSpecificPart(), encodeToURI(relativePath), baseURI.getFragment());
}
/**
@@ -701,9 +754,11 @@ public class IOUtil {
* </p>
*
* @param scheme scheme of the resulting URI
- * @param schemeSpecificPart may include a query, which is separated while processing
- * @param relativePath denotes a relative file to the baseLocation's parent directory
+ * @param schemeSpecificPart may include a query, which is separated while processing (URI encoded)
+ * @param relativePath denotes a relative file to the baseLocation's parent directory (URI encoded)
+ * @param fragment the URI fragment (URI encoded)
* @throws URISyntaxException if path is empty or has no parent directory available while resolving <code>../</code>
+ * @see #encodeToURI(String)
*/
public static URI compose(String scheme, String schemeSpecificPart, String relativePath, String fragment) throws URISyntaxException {
// cut off optional query in scheme-specific-part
@@ -725,6 +780,26 @@ public class IOUtil {
return new URI(scheme, null == query ? schemeSpecificPart : schemeSpecificPart + "?" + query, fragment);
}
+ private static final Pattern patternSpaceRaw = Pattern.compile(" ");
+ private static final Pattern patternSpaceEnc = Pattern.compile("%20");
+
+ /**
+ * Escapes characters not complying w/ RFC 2396 and the {@link URI#URI(String)} ctor.
+ * <ul>
+ * <li>SPACE -> %20</li>
+ * </ul>
+ */
+ public static String encodeToURI(String s) {
+ return patternSpaceRaw.matcher(s).replaceAll("%20");
+ }
+
+ /**
+ * Reverses escaping of characters as performed via {@link #encodeToURI(String)}.
+ */
+ public static String decodeFromURI(String s) {
+ return patternSpaceEnc.matcher(s).replaceAll(" ");
+ }
+
/**
* Returns the connected URLConnection, or null if not url is not available
*/
diff --git a/src/java/com/jogamp/common/util/JarUtil.java b/src/java/com/jogamp/common/util/JarUtil.java
index 5604c3d..29e7dc7 100644
--- a/src/java/com/jogamp/common/util/JarUtil.java
+++ b/src/java/com/jogamp/common/util/JarUtil.java
@@ -53,6 +53,8 @@ import jogamp.common.Debug;
public class JarUtil {
private static final boolean DEBUG = Debug.debug("JarUtil");
+ private static final int BUFFER_SIZE = 4096;
+
/**
* Interface allowing users to provide an URL resolver that will convert custom classloader
* URLs like Eclipse/OSGi <i>bundleresource:</i> URLs to normal <i>jar:</i> URLs.
@@ -138,8 +140,9 @@ public class JarUtil {
throw new IllegalArgumentException("null arguments: clazzBinName "+clazzBinName+", cl "+cl);
}
final URI uri;
+ final URL url;
{
- final URL url = IOUtil.getClassURL(clazzBinName, cl);
+ url = IOUtil.getClassURL(clazzBinName, cl);
final String scheme = url.getProtocol();
if( null != resolver &&
!scheme.equals( IOUtil.JAR_SCHEME ) &&
@@ -163,6 +166,9 @@ public class JarUtil {
if( !uri.getScheme().equals( IOUtil.JAR_SCHEME ) ) {
throw new IllegalArgumentException("URI is not using scheme "+IOUtil.JAR_SCHEME+": <"+uri+">");
}
+ if(DEBUG) {
+ System.out.println("getJarURI res: "+clazzBinName+" -> "+url+" -> "+uri);
+ }
return uri;
}
@@ -187,7 +193,7 @@ public class JarUtil {
if( !classJarURI.getScheme().equals(IOUtil.JAR_SCHEME) ) {
throw new IllegalArgumentException("URI is not using scheme "+IOUtil.JAR_SCHEME+": <"+classJarURI+">");
}
- String uriS = classJarURI.getRawSchemeSpecificPart();
+ String uriS = classJarURI.getSchemeSpecificPart();
// from
// file:/some/path/gluegen-rt.jar!/com/jogamp/common/util/cache/TempJarCache.class
@@ -264,26 +270,27 @@ public class JarUtil {
if( !classJarURI.getScheme().equals(IOUtil.JAR_SCHEME) ) {
throw new IllegalArgumentException("URI is not a using scheme "+IOUtil.JAR_SCHEME+": <"+classJarURI+">");
}
- String uriS = classJarURI.getRawSchemeSpecificPart();
// from
// file:/some/path/gluegen-rt.jar!/com/jogamp/common/GlueGenVersion.class
// to
// file:/some/path/gluegen-rt.jar
- int idx = uriS.lastIndexOf('!');
+ final String uriS0 = classJarURI.getSchemeSpecificPart();
+ int idx = uriS0.lastIndexOf('!');
+ final String uriS1;
if (0 <= idx) {
- uriS = uriS.substring(0, idx); // exclude '!/'
+ uriS1 = uriS0.substring(0, idx); // exclude '!/'
} else {
throw new IllegalArgumentException("JAR URI does not contain jar uri terminator '!', uri <"+classJarURI+">");
}
-
- if(0 >= uriS.lastIndexOf(".jar")) {
+ if(0 >= uriS1.lastIndexOf(".jar")) {
throw new IllegalArgumentException("No Jar name in <"+classJarURI+">");
- }
+ }
+ final String uriS2 = IOUtil.encodeToURI(uriS1);
if(DEBUG) {
- System.out.println("getJarSubURI res: "+uriS);
+ System.out.println("getJarSubURI res: "+classJarURI+" -> "+uriS0+" -> "+uriS1+" -> "+uriS2);
}
- return new URI(uriS);
+ return new URI(uriS2);
}
/**
@@ -302,7 +309,7 @@ public class JarUtil {
if( !classJarURI.getScheme().equals(IOUtil.JAR_SCHEME) ) {
throw new IllegalArgumentException("URI is not a using scheme "+IOUtil.JAR_SCHEME+": <"+classJarURI+">");
}
- String uriS = classJarURI.getRawSchemeSpecificPart();
+ String uriS = classJarURI.getSchemeSpecificPart();
// from
// file:/some/path/gluegen-rt.jar!/com/jogamp/common/GlueGenVersion.class
@@ -391,6 +398,19 @@ public class JarUtil {
}
/**
+ * @param jarSubUriS file:/some/path/gluegen-rt.jar
+ * @return jar:file:/some/path/gluegen-rt.jar!/
+ * @throws IllegalArgumentException null arguments
+ * @throws URISyntaxException
+ */
+ public static URI getJarFileURI(String jarSubUriS) throws IllegalArgumentException, URISyntaxException {
+ if(null == jarSubUriS) {
+ throw new IllegalArgumentException("jarSubURIS is null");
+ }
+ return new URI(IOUtil.JAR_SCHEME, jarSubUriS+"!/", null);
+ }
+
+ /**
* @param jarFileURI jar:file:/some/path/gluegen-rt.jar!/
* @param jarEntry com/jogamp/common/GlueGenVersion.class
* @return jar:file:/some/path/gluegen-rt.jar!/com/jogamp/common/GlueGenVersion.class
@@ -499,22 +519,23 @@ public class JarUtil {
* @param dest
* @param nativeLibMap
* @param jarFile
- * @param deepDirectoryTraversal
+ * @param nativeLibraryPath if not null, only extracts native libraries within this path.
* @param extractNativeLibraries
* @param extractClassFiles
* @param extractOtherFiles
+ * @param deepDirectoryTraversal
* @return
* @throws IOException
*/
public static final int extract(File dest, Map<String, String> nativeLibMap,
JarFile jarFile,
+ String nativeLibraryPath,
boolean extractNativeLibraries,
- boolean extractClassFiles,
- boolean extractOtherFiles) throws IOException {
+ boolean extractClassFiles, boolean extractOtherFiles) throws IOException {
if (DEBUG) {
System.err.println("JarUtil: extract: "+jarFile.getName()+" -> "+dest+
- ", extractNativeLibraries "+extractNativeLibraries+
+ ", extractNativeLibraries "+extractNativeLibraries+" ("+nativeLibraryPath+")"+
", extractClassFiles "+extractClassFiles+
", extractOtherFiles "+extractOtherFiles);
}
@@ -528,11 +549,29 @@ public class JarUtil {
// Match entries with correct prefix and suffix (ignoring case)
final String libBaseName = NativeLibrary.isValidNativeLibraryName(entryName, false);
final boolean isNativeLib = null != libBaseName;
- if(isNativeLib && !extractNativeLibraries) {
- if (DEBUG) {
- System.err.println("JarUtil: JarEntry : " + entryName + " native-lib skipped");
+ if(isNativeLib) {
+ if(!extractNativeLibraries) {
+ if (DEBUG) {
+ System.err.println("JarUtil: JarEntry : " + entryName + " native-lib skipped, skip all native libs");
+ }
+ continue;
+ }
+ if(null != nativeLibraryPath) {
+ final String nativeLibraryPathS;
+ final String dirnameS;
+ try {
+ nativeLibraryPathS = IOUtil.slashify(nativeLibraryPath, false /* startWithSlash */, true /* endWithSlash */);
+ dirnameS = IOUtil.getDirname(entryName);
+ } catch (URISyntaxException e) {
+ throw new IOException(e);
+ }
+ if( !nativeLibraryPathS.equals(dirnameS) ) {
+ if (DEBUG) {
+ System.err.println("JarUtil: JarEntry : " + entryName + " native-lib skipped, not in path: "+nativeLibraryPathS);
+ }
+ continue;
+ }
}
- continue;
}
final boolean isClassFile = entryName.endsWith(".class");
@@ -566,20 +605,20 @@ public class JarUtil {
if (DEBUG) {
System.err.println("JarUtil: MKDIR: " + entryName + " -> " + destFile );
}
- destFile.mkdir();
+ destFile.mkdirs();
} else {
final File destFolder = new File(destFile.getParent());
if(!destFolder.exists()) {
if (DEBUG) {
System.err.println("JarUtil: MKDIR (parent): " + entryName + " -> " + destFolder );
}
- destFolder.mkdir();
+ destFolder.mkdirs();
}
final InputStream in = new BufferedInputStream(jarFile.getInputStream(entry));
final OutputStream out = new BufferedOutputStream(new FileOutputStream(destFile));
int numBytes = -1;
try {
- numBytes = IOUtil.copyStream2Stream(in, out, -1);
+ numBytes = IOUtil.copyStream2Stream(BUFFER_SIZE, in, out, -1);
} finally {
in.close();
out.close();
diff --git a/src/java/com/jogamp/common/util/PropertyAccess.java b/src/java/com/jogamp/common/util/PropertyAccess.java
index 1a4bc7e..fdb2665 100644
--- a/src/java/com/jogamp/common/util/PropertyAccess.java
+++ b/src/java/com/jogamp/common/util/PropertyAccess.java
@@ -40,12 +40,19 @@ public class PropertyAccess {
public static final String javaws_prefix = "javaws.";
static final HashSet<String> trustedPrefixes;
+ static final HashSet<String> trusted;
static {
trustedPrefixes = new HashSet<String>();
trustedPrefixes.add(javaws_prefix);
trustedPrefixes.add(jnlp_prefix);
// 'jogamp.' and maybe other trusted prefixes will be added later via 'addTrustedPrefix()'
+
+ trusted = new HashSet<String>();
+ trusted.add("sun.java2d.opengl");
+ trusted.add("sun.java2d.noddraw");
+ trusted.add("sun.java2d.d3d");
+ trusted.add("sun.awt.noerasebackground");
}
/**
@@ -60,7 +67,7 @@ public class PropertyAccess {
public static final boolean isTrusted(String propertyKey) {
final int dot1 = propertyKey.indexOf('.');
if(0<=dot1) {
- return trustedPrefixes.contains(propertyKey.substring(0, dot1+1));
+ return trustedPrefixes.contains(propertyKey.substring(0, dot1+1)) || trusted.contains(propertyKey);
} else {
return false;
}
diff --git a/src/java/com/jogamp/common/util/VersionUtil.java b/src/java/com/jogamp/common/util/VersionUtil.java
index 8d9e6a9..8030e94 100644
--- a/src/java/com/jogamp/common/util/VersionUtil.java
+++ b/src/java/com/jogamp/common/util/VersionUtil.java
@@ -55,7 +55,7 @@ public class VersionUtil {
sb.append(SEPERATOR).append(Platform.getNewline());
// environment
- sb.append("Platform: ").append(Platform.getOSType()).append(" / ").append(Platform.getOSName()).append(' ').append(Platform.getOSVersion()).append(" (os), ");
+ sb.append("Platform: ").append(Platform.getOSType()).append(" / ").append(Platform.getOSName()).append(' ').append(Platform.getOSVersion()).append(" (").append(Platform.getOSVersionNumber()).append("), ");
sb.append(Platform.getArchName()).append(" (arch), ").append(Platform.getABIType()).append(", ");
sb.append(Runtime.getRuntime().availableProcessors()).append(" cores");
sb.append(Platform.getNewline());
@@ -68,7 +68,7 @@ public class VersionUtil {
Platform.getMachineDescription().toString(sb).append(Platform.getNewline());
// JVM/JRE
- sb.append("Platform: Java Version: ").append(Platform.getJavaVersion()).append(", VM: ").append(Platform.getJavaVMName());
+ sb.append("Platform: Java Version: ").append(Platform.getJavaVersion()).append(" (").append(Platform.getJavaVersionNumber()).append("u").append(Platform.JAVA_VERSION_UPDATE).append("), VM: ").append(Platform.getJavaVMName());
sb.append(", Runtime: ").append(Platform.getJavaRuntimeName()).append(Platform.getNewline());
sb.append("Platform: Java Vendor: ").append(Platform.getJavaVendor()).append(", ").append(Platform.getJavaVendorURL());
sb.append(", JavaSE: ").append(Platform.isJavaSE());
diff --git a/src/java/com/jogamp/common/util/cache/TempJarCache.java b/src/java/com/jogamp/common/util/cache/TempJarCache.java
index 30dea45..ecf6e56 100644
--- a/src/java/com/jogamp/common/util/cache/TempJarCache.java
+++ b/src/java/com/jogamp/common/util/cache/TempJarCache.java
@@ -27,20 +27,13 @@
*/
package com.jogamp.common.util.cache;
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
import java.io.File;
-import java.io.FileOutputStream;
import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
import java.net.URI;
import java.net.URISyntaxException;
import java.security.cert.Certificate;
-import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;
-import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import jogamp.common.Debug;
@@ -204,25 +197,32 @@ public class TempJarCache {
*
* @param certClass if class is certified, the JarFile entries needs to have the same certificate
* @param jarURI
+ * @param nativeLibraryPath if not null, only extracts native libraries within this path.
+ * @return true if native libraries were added or previously loaded from given jarURI, otherwise false
* @throws IOException if the <code>jarURI</code> could not be loaded or a previous load attempt failed
* @throws SecurityException
* @throws URISyntaxException
* @throws IllegalArgumentException
*/
- public synchronized static final void addNativeLibs(Class<?> certClass, URI jarURI) throws IOException, SecurityException, IllegalArgumentException, URISyntaxException {
+ public synchronized static final boolean addNativeLibs(Class<?> certClass, URI jarURI, String nativeLibraryPath) throws IOException, SecurityException, IllegalArgumentException, URISyntaxException {
final LoadState nativeLibJarsLS = nativeLibJars.get(jarURI);
if( !testLoadState(nativeLibJarsLS, LoadState.LOOKED_UP) ) {
nativeLibJars.put(jarURI, LoadState.LOOKED_UP);
final JarFile jarFile = JarUtil.getJarFile(jarURI);
if(DEBUG) {
- System.err.println("TempJarCache: addNativeLibs: "+jarURI+": nativeJar "+jarFile.getName());
+ System.err.println("TempJarCache: addNativeLibs: "+jarURI+": nativeJar "+jarFile.getName()+" (NEW)");
}
validateCertificates(certClass, jarFile);
- JarUtil.extract(tmpFileCache.getTempDir(), nativeLibMap, jarFile, true, false, false);
+ final int num = JarUtil.extract(tmpFileCache.getTempDir(), nativeLibMap, jarFile, nativeLibraryPath, true, false, false);
nativeLibJars.put(jarURI, LoadState.LOADED);
- } else if( !testLoadState(nativeLibJarsLS, LoadState.LOADED) ) {
- throw new IOException("TempJarCache: addNativeLibs: "+jarURI+", previous load attempt failed");
+ return num > 0;
+ } else if( testLoadState(nativeLibJarsLS, LoadState.LOADED) ) {
+ if(DEBUG) {
+ System.err.println("TempJarCache: addNativeLibs: "+jarURI+": nativeJar "+jarURI+" (REUSE)");
+ }
+ return true;
}
+ throw new IOException("TempJarCache: addNativeLibs: "+jarURI+", previous load attempt failed");
}
/**
@@ -248,7 +248,7 @@ public class TempJarCache {
}
validateCertificates(certClass, jarFile);
JarUtil.extract(tmpFileCache.getTempDir(), null, jarFile,
- false, true, false);
+ null /* nativeLibraryPath */, false, true, false);
classFileJars.put(jarURI, LoadState.LOADED);
} else if( !testLoadState(classFileJarsLS, LoadState.LOADED) ) {
throw new IOException("TempJarCache: addClasses: "+jarURI+", previous load attempt failed");
@@ -276,7 +276,7 @@ public class TempJarCache {
}
validateCertificates(certClass, jarFile);
JarUtil.extract(tmpFileCache.getTempDir(), null, jarFile,
- false, false, true);
+ null /* nativeLibraryPath */, false, false, true);
resourceFileJars.put(jarURI, LoadState.LOADED);
} else if( !testLoadState(resourceFileJarsLS, LoadState.LOADED) ) {
throw new IOException("TempJarCache: addResources: "+jarURI+", previous load attempt failed");
@@ -330,7 +330,7 @@ public class TempJarCache {
}
validateCertificates(certClass, jarFile);
JarUtil.extract(tmpFileCache.getTempDir(), nativeLibMap, jarFile,
- extractNativeLibraries, extractClassFiles, extractOtherFiles);
+ null /* nativeLibraryPath */, extractNativeLibraries, extractClassFiles, extractOtherFiles);
// mark loaded (those were just loaded)
if(extractNativeLibraries) {
@@ -397,76 +397,7 @@ public class TempJarCache {
}
return null;
}
-
-
- /**
- * Bootstrapping version extracting the JAR files root entry containing libBaseName,
- * assuming it's a native library. This is used to get the 'gluegen-rt'
- * native library, hence bootstrapping.
- *
- * @param certClass if class is certified, the JarFile entries needs to have the same certificate
- *
- * @throws IOException
- * @throws SecurityException
- * @throws URISyntaxException
- * @throws IllegalArgumentException
- */
- public synchronized static final void bootstrapNativeLib(Class<?> certClass, String libBaseName, URI jarURI)
- throws IOException, SecurityException, IllegalArgumentException, URISyntaxException {
- checkInitialized();
- boolean ok = false;
- int countEntries = 0;
- final LoadState nativeLibJarsLS = nativeLibJars.get(jarURI);
- if( !testLoadState(nativeLibJarsLS, LoadState.LOOKED_UP) && !nativeLibMap.containsKey(libBaseName) ) {
- if(DEBUG) {
- System.err.println("TempJarCache: bootstrapNativeLib(certClass: "+certClass+", libBaseName "+libBaseName+", jarURI "+jarURI+")");
- }
- nativeLibJars.put(jarURI, LoadState.LOOKED_UP);
- final JarFile jarFile = JarUtil.getJarFile(jarURI);
- if(DEBUG) {
- System.err.println("TempJarCache: bootstrapNativeLib: nativeJar "+jarFile.getName());
- }
- validateCertificates(certClass, jarFile);
- final Enumeration<JarEntry> entries = jarFile.entries();
- while (entries.hasMoreElements()) {
- final JarEntry entry = entries.nextElement();
- final String entryName = entry.getName();
-
- if( entryName.indexOf('/') == -1 &&
- entryName.indexOf(File.separatorChar) == -1 &&
- entryName.indexOf(libBaseName) >= 0 )
- {
- final File destFile = new File(tmpFileCache.getTempDir(), entryName);
- final InputStream in = new BufferedInputStream(jarFile.getInputStream(entry));
- final OutputStream out = new BufferedOutputStream(new FileOutputStream(destFile));
- int numBytes = 0;
- try {
- final byte[] buf = new byte[ 2048 ];
- while (true) {
- int countBytes;
- if ((countBytes = in.read(buf)) == -1) { break; }
- out.write(buf, 0, countBytes);
- numBytes += countBytes;
- }
- } finally { in.close(); out.close(); }
- if (numBytes>0) {
- nativeLibMap.put(libBaseName, destFile.getAbsolutePath());
- nativeLibJars.put(jarURI, LoadState.LOADED);
- ok = true;
- countEntries++;
- }
- }
- }
- } else if( testLoadState(nativeLibJarsLS, LoadState.LOADED) ) {
- ok = true; // already loaded
- } else {
- throw new IOException("TempJarCache: bootstrapNativeLib: "+jarURI+", previous load attempt failed");
- }
- if(DEBUG) {
- System.err.println("TempJarCache: bootstrapNativeLib() done, count "+countEntries+", ok "+ok);
- }
- }
-
+
private static void validateCertificates(Class<?> certClass, JarFile jarFile) throws IOException, SecurityException {
if(null == certClass) {
throw new IllegalArgumentException("certClass is null");
diff --git a/src/java/jogamp/common/os/PlatformPropsImpl.java b/src/java/jogamp/common/os/PlatformPropsImpl.java
index 6089cc2..819fe9c 100644
--- a/src/java/jogamp/common/os/PlatformPropsImpl.java
+++ b/src/java/jogamp/common/os/PlatformPropsImpl.java
@@ -44,6 +44,8 @@ public abstract class PlatformPropsImpl {
/** Version 1.6. As a JVM version, it enables certain JVM 1. features. */
public static final VersionNumber Version16;
+ /** Version 1.7. As a JVM version, it enables certain JVM 1.7 features. */
+ public static final VersionNumber Version17;
public static final String OS;
public static final String OS_lower;
@@ -55,6 +57,7 @@ public abstract class PlatformPropsImpl {
public static final String JAVA_VENDOR_URL;
public static final String JAVA_VERSION;
public static final VersionNumber JAVA_VERSION_NUMBER;
+ public static final int JAVA_VERSION_UPDATE;
public static final String JAVA_VM_NAME;
public static final String JAVA_RUNTIME_NAME;
/** True if having {@link java.nio.LongBuffer} and {@link java.nio.DoubleBuffer} available. */
@@ -72,6 +75,7 @@ public abstract class PlatformPropsImpl {
static {
Version16 = new VersionNumber(1, 6, 0);
+ Version17 = new VersionNumber(1, 7, 0);
// We don't seem to need an AccessController.doPrivileged() block
// here as these system properties are visible even to unsigned Applets.
OS = System.getProperty("os.name");
@@ -84,6 +88,17 @@ public abstract class PlatformPropsImpl {
JAVA_VENDOR_URL = System.getProperty("java.vendor.url");
JAVA_VERSION = System.getProperty("java.version");
JAVA_VERSION_NUMBER = new VersionNumber(JAVA_VERSION);
+ {
+ final int usIdx = JAVA_VERSION.lastIndexOf("_");
+ int jvmUpdate = 0;
+ if( usIdx > 0 ) {
+ final String buildS = Platform.JAVA_VERSION.substring(usIdx+1);
+ try {
+ jvmUpdate = Integer.valueOf(buildS);
+ } catch (NumberFormatException nfe) {}
+ }
+ JAVA_VERSION_UPDATE = jvmUpdate;
+ }
JAVA_VM_NAME = System.getProperty("java.vm.name");
JAVA_RUNTIME_NAME = getJavaRuntimeNameImpl();
JAVA_SE = initIsJavaSE();
diff --git a/src/junit/com/jogamp/common/net/AssetURLConnectionRegisteredTest.java b/src/junit/com/jogamp/common/net/AssetURLConnectionRegisteredTest.java
index 2db3fb3..2a3df41 100644
--- a/src/junit/com/jogamp/common/net/AssetURLConnectionRegisteredTest.java
+++ b/src/junit/com/jogamp/common/net/AssetURLConnectionRegisteredTest.java
@@ -12,6 +12,10 @@ import org.junit.Test;
import com.jogamp.common.util.IOUtil;
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class AssetURLConnectionRegisteredTest extends AssetURLConnectionBase {
@BeforeClass
diff --git a/src/junit/com/jogamp/common/net/AssetURLConnectionUnregisteredTest.java b/src/junit/com/jogamp/common/net/AssetURLConnectionUnregisteredTest.java
index be32c98..29b698e 100644
--- a/src/junit/com/jogamp/common/net/AssetURLConnectionUnregisteredTest.java
+++ b/src/junit/com/jogamp/common/net/AssetURLConnectionUnregisteredTest.java
@@ -11,6 +11,10 @@ import org.junit.Test;
import com.jogamp.common.util.IOUtil;
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class AssetURLConnectionUnregisteredTest extends AssetURLConnectionBase {
@Test
public void assetUnregisteredURLConnection_RT2() throws IOException {
diff --git a/src/junit/com/jogamp/common/net/URLCompositionTest.java b/src/junit/com/jogamp/common/net/URLCompositionTest.java
index 5d19c1d..3083fbd 100644
--- a/src/junit/com/jogamp/common/net/URLCompositionTest.java
+++ b/src/junit/com/jogamp/common/net/URLCompositionTest.java
@@ -14,6 +14,10 @@ import org.junit.Test;
import com.jogamp.common.util.IOUtil;
import com.jogamp.junit.util.JunitTracer;
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class URLCompositionTest extends JunitTracer {
@BeforeClass
@@ -204,6 +208,32 @@ public class URLCompositionTest extends JunitTracer {
Assert.assertTrue(refURL.sameFile(uri2.toURL()));
}
+ @Test
+ public void testURLProps() throws IOException, URISyntaxException {
+ final String SCHEME = "camera";
+ final String HOST = "somewhere";
+ final String PATH = "0";
+ String[] args = new String[] {
+ SCHEME+"://"+HOST+"/"+PATH,
+ SCHEME+"://"+HOST+"/"+PATH+"?p1=1",
+ };
+ for(int i=0; i<args.length-1; i+=2) {
+ String uri_s0 = args[i];
+ String uri_s1 = args[i+1];
+ URI uri0 = new URI(uri_s0);
+ URI uri1 = new URI(uri_s1);
+ showURI(uri0);
+ showURI(uri1);
+ URIQueryProps data = URIQueryProps.create(uri1, ';');
+ if(null == data) {
+ System.err.println("Error: NULL: <"+uri_s1+"> -> "+uri1+" -> NULL");
+ } else {
+ URI uri1T = data.appendQuery(uri0);
+ showURI(uri1T);
+ Assert.assertEquals(uri1, uri1T);
+ }
+ }
+ }
public static void main(String args[]) throws IOException {
String tstname = URLCompositionTest.class.getName();
org.junit.runner.JUnitCore.main(tstname);
diff --git a/src/junit/com/jogamp/common/nio/BuffersTest.java b/src/junit/com/jogamp/common/nio/BuffersTest.java
index 02c246f..9ad7823 100644
--- a/src/junit/com/jogamp/common/nio/BuffersTest.java
+++ b/src/junit/com/jogamp/common/nio/BuffersTest.java
@@ -41,6 +41,10 @@ import static org.junit.Assert.*;
/**
* @author Michael Bien
*/
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class BuffersTest extends JunitTracer {
@Test
diff --git a/src/junit/com/jogamp/common/nio/CachedBufferFactoryTest.java b/src/junit/com/jogamp/common/nio/CachedBufferFactoryTest.java
index 326b4cf..b0cd49e 100644
--- a/src/junit/com/jogamp/common/nio/CachedBufferFactoryTest.java
+++ b/src/junit/com/jogamp/common/nio/CachedBufferFactoryTest.java
@@ -51,6 +51,10 @@ import static org.junit.Assert.*;
*
* @author Michael Bien
*/
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class CachedBufferFactoryTest extends JunitTracer {
private final int BUFFERCOUNT = 120;
diff --git a/src/junit/com/jogamp/common/nio/TestBuffersFloatDoubleConversion.java b/src/junit/com/jogamp/common/nio/TestBuffersFloatDoubleConversion.java
index 439ff08..192a49e 100644
--- a/src/junit/com/jogamp/common/nio/TestBuffersFloatDoubleConversion.java
+++ b/src/junit/com/jogamp/common/nio/TestBuffersFloatDoubleConversion.java
@@ -35,6 +35,10 @@ import org.junit.Test;
import com.jogamp.junit.util.JunitTracer;
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class TestBuffersFloatDoubleConversion extends JunitTracer {
public static boolean cmpFloatArray(float[] d1, int d1_offset, float[] d2, int d2_offset, int len) {
diff --git a/src/junit/com/jogamp/common/nio/TestPointerBufferEndian.java b/src/junit/com/jogamp/common/nio/TestPointerBufferEndian.java
index c40d1d3..3a1c584 100644
--- a/src/junit/com/jogamp/common/nio/TestPointerBufferEndian.java
+++ b/src/junit/com/jogamp/common/nio/TestPointerBufferEndian.java
@@ -11,6 +11,10 @@ import org.junit.Test;
import static java.lang.System.*;
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class TestPointerBufferEndian extends JunitTracer {
protected void testImpl (boolean direct) {
diff --git a/src/junit/com/jogamp/common/nio/TestStructAccessorEndian.java b/src/junit/com/jogamp/common/nio/TestStructAccessorEndian.java
index 6d8ed88..62eccf0 100644
--- a/src/junit/com/jogamp/common/nio/TestStructAccessorEndian.java
+++ b/src/junit/com/jogamp/common/nio/TestStructAccessorEndian.java
@@ -12,6 +12,10 @@ import com.jogamp.common.os.MachineDescription;
import com.jogamp.common.os.Platform;
import com.jogamp.junit.util.JunitTracer;
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class TestStructAccessorEndian extends JunitTracer {
@Test
diff --git a/src/junit/com/jogamp/common/os/TestElfReader01.java b/src/junit/com/jogamp/common/os/TestElfReader01.java
index 3993fc4..b058a0f 100644
--- a/src/junit/com/jogamp/common/os/TestElfReader01.java
+++ b/src/junit/com/jogamp/common/os/TestElfReader01.java
@@ -18,6 +18,10 @@ import org.junit.Test;
import com.jogamp.common.os.Platform.OSType;
import com.jogamp.junit.util.JunitTracer;
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class TestElfReader01 extends JunitTracer {
public static String GNU_LINUX_SELF_EXE = "/proc/self/exe";
public static String ARM_HF_EXE = "tst-exe-armhf";
diff --git a/src/junit/com/jogamp/common/util/IntIntHashMapTest.java b/src/junit/com/jogamp/common/util/IntIntHashMapTest.java
index ab348a3..fa56d3d 100644
--- a/src/junit/com/jogamp/common/util/IntIntHashMapTest.java
+++ b/src/junit/com/jogamp/common/util/IntIntHashMapTest.java
@@ -48,6 +48,10 @@ import static java.lang.System.*;
* @author Michael Bien
* @author Sven Gothel
*/
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class IntIntHashMapTest {
private static int iterations;
diff --git a/src/junit/com/jogamp/common/util/IntObjectHashMapTest.java b/src/junit/com/jogamp/common/util/IntObjectHashMapTest.java
index d0429e8..18cdf6c 100644
--- a/src/junit/com/jogamp/common/util/IntObjectHashMapTest.java
+++ b/src/junit/com/jogamp/common/util/IntObjectHashMapTest.java
@@ -47,6 +47,10 @@ import static org.junit.Assert.*;
* @author Michael Bien
* @author Sven Gothel
*/
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class IntObjectHashMapTest {
private static int iterations;
diff --git a/src/junit/com/jogamp/common/util/LongIntHashMapTest.java b/src/junit/com/jogamp/common/util/LongIntHashMapTest.java
index 9558065..ac1f7c4 100644
--- a/src/junit/com/jogamp/common/util/LongIntHashMapTest.java
+++ b/src/junit/com/jogamp/common/util/LongIntHashMapTest.java
@@ -48,6 +48,10 @@ import static java.lang.System.*;
* @author Michael Bien
* @author Simon Goller
*/
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class LongIntHashMapTest {
private static int iterations;
diff --git a/src/junit/com/jogamp/common/util/TestArrayHashSet01.java b/src/junit/com/jogamp/common/util/TestArrayHashSet01.java
index 1e1c281..10a4bf1 100644
--- a/src/junit/com/jogamp/common/util/TestArrayHashSet01.java
+++ b/src/junit/com/jogamp/common/util/TestArrayHashSet01.java
@@ -36,6 +36,10 @@ import org.junit.Test;
import com.jogamp.junit.util.JunitTracer;
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class TestArrayHashSet01 extends JunitTracer {
public static class Dummy {
diff --git a/src/junit/com/jogamp/common/util/TestFloatStack01.java b/src/junit/com/jogamp/common/util/TestFloatStack01.java
index 90ac2e0..eab83aa 100644
--- a/src/junit/com/jogamp/common/util/TestFloatStack01.java
+++ b/src/junit/com/jogamp/common/util/TestFloatStack01.java
@@ -37,6 +37,10 @@ import org.junit.Test;
import com.jogamp.junit.util.JunitTracer;
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class /*testname*/TestFloatStack01/*testname*/ extends JunitTracer {
static final boolean equals(/*value*/float/*value*/[] b, int bOffset,
diff --git a/src/junit/com/jogamp/common/util/TestIOUtil01.java b/src/junit/com/jogamp/common/util/TestIOUtil01.java
index b75127c..6a53bb5 100644
--- a/src/junit/com/jogamp/common/util/TestIOUtil01.java
+++ b/src/junit/com/jogamp/common/util/TestIOUtil01.java
@@ -46,6 +46,10 @@ import com.jogamp.common.os.MachineDescription;
import com.jogamp.common.os.Platform;
import com.jogamp.junit.util.JunitTracer;
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class TestIOUtil01 extends JunitTracer {
static final MachineDescription machine = Platform.getMachineDescription();
diff --git a/src/junit/com/jogamp/common/util/TestIteratorIndexCORE.java b/src/junit/com/jogamp/common/util/TestIteratorIndexCORE.java
index cb142a3..0ffed92 100644
--- a/src/junit/com/jogamp/common/util/TestIteratorIndexCORE.java
+++ b/src/junit/com/jogamp/common/util/TestIteratorIndexCORE.java
@@ -40,6 +40,10 @@ import org.junit.Test;
import com.jogamp.common.os.Platform;
import com.jogamp.junit.util.JunitTracer;
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class TestIteratorIndexCORE extends JunitTracer {
static int elems = 10;
diff --git a/src/junit/com/jogamp/common/util/TestJarUtil.java b/src/junit/com/jogamp/common/util/TestJarUtil.java
index fa45853..18fcaa7 100644
--- a/src/junit/com/jogamp/common/util/TestJarUtil.java
+++ b/src/junit/com/jogamp/common/util/TestJarUtil.java
@@ -53,6 +53,10 @@ import com.jogamp.common.util.cache.TempFileCache;
import com.jogamp.common.util.cache.TempJarCache;
import com.jogamp.junit.util.JunitTracer;
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class TestJarUtil extends JunitTracer {
static TempFileCache fileCache;
diff --git a/src/junit/com/jogamp/common/util/TestLFRingBuffer01.java b/src/junit/com/jogamp/common/util/TestLFRingBuffer01.java
index bcfeb11..1695b37 100644
--- a/src/junit/com/jogamp/common/util/TestLFRingBuffer01.java
+++ b/src/junit/com/jogamp/common/util/TestLFRingBuffer01.java
@@ -31,6 +31,10 @@ package com.jogamp.common.util;
import com.jogamp.common.util.LFRingbuffer;
import com.jogamp.common.util.Ringbuffer;
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class TestLFRingBuffer01 extends RingBuffer01Base {
public Ringbuffer<Integer> createEmpty(int initialCapacity) {
return new LFRingbuffer<Integer>(Integer[].class, initialCapacity);
diff --git a/src/junit/com/jogamp/common/util/TestPlatform01.java b/src/junit/com/jogamp/common/util/TestPlatform01.java
index 8c0fd46..c2218da 100644
--- a/src/junit/com/jogamp/common/util/TestPlatform01.java
+++ b/src/junit/com/jogamp/common/util/TestPlatform01.java
@@ -35,6 +35,10 @@ import com.jogamp.common.os.MachineDescription;
import com.jogamp.common.os.Platform;
import com.jogamp.junit.util.JunitTracer;
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class TestPlatform01 extends JunitTracer {
@Test
diff --git a/src/junit/com/jogamp/common/util/TestRunnableTask01.java b/src/junit/com/jogamp/common/util/TestRunnableTask01.java
index 6274294..6051a9b 100644
--- a/src/junit/com/jogamp/common/util/TestRunnableTask01.java
+++ b/src/junit/com/jogamp/common/util/TestRunnableTask01.java
@@ -36,6 +36,10 @@ import org.junit.Test;
import com.jogamp.junit.util.JunitTracer;
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class TestRunnableTask01 extends JunitTracer {
@Test
diff --git a/src/junit/com/jogamp/common/util/TestSyncRingBuffer01.java b/src/junit/com/jogamp/common/util/TestSyncRingBuffer01.java
index b598f15..0418d44 100644
--- a/src/junit/com/jogamp/common/util/TestSyncRingBuffer01.java
+++ b/src/junit/com/jogamp/common/util/TestSyncRingBuffer01.java
@@ -31,6 +31,10 @@ package com.jogamp.common.util;
import com.jogamp.common.util.Ringbuffer;
import com.jogamp.common.util.SyncedRingbuffer;
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class TestSyncRingBuffer01 extends RingBuffer01Base {
public Ringbuffer<Integer> createEmpty(int initialCapacity) {
return new SyncedRingbuffer<Integer>(Integer[].class, initialCapacity);
diff --git a/src/junit/com/jogamp/common/util/TestSystemPropsAndEnvs.java b/src/junit/com/jogamp/common/util/TestSystemPropsAndEnvs.java
index b182a6f..cb8acb1 100644
--- a/src/junit/com/jogamp/common/util/TestSystemPropsAndEnvs.java
+++ b/src/junit/com/jogamp/common/util/TestSystemPropsAndEnvs.java
@@ -37,6 +37,10 @@ import org.junit.Test;
import com.jogamp.junit.util.JunitTracer;
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class TestSystemPropsAndEnvs extends JunitTracer {
@Test
diff --git a/src/junit/com/jogamp/common/util/TestTempJarCache.java b/src/junit/com/jogamp/common/util/TestTempJarCache.java
index 62a916a..7ddf52a 100644
--- a/src/junit/com/jogamp/common/util/TestTempJarCache.java
+++ b/src/junit/com/jogamp/common/util/TestTempJarCache.java
@@ -29,6 +29,7 @@
package com.jogamp.common.util;
import java.io.File;
+
import java.io.IOException;
import java.lang.reflect.Method;
import java.net.URI;
@@ -40,7 +41,9 @@ import java.util.jar.JarFile;
import junit.framework.Assert;
import org.junit.BeforeClass;
+import org.junit.FixMethodOrder;
import org.junit.Test;
+import org.junit.runners.MethodSorters;
import com.jogamp.common.GlueGenVersion;
import com.jogamp.common.jvm.JNILibLoaderBase;
@@ -52,6 +55,7 @@ import com.jogamp.common.util.cache.TempFileCache;
import com.jogamp.common.util.cache.TempJarCache;
import com.jogamp.junit.util.JunitTracer;
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class TestTempJarCache extends JunitTracer {
static TempFileCache fileCache;
@@ -143,7 +147,7 @@ public class TestTempJarCache extends JunitTracer {
if(AndroidVersion.isAvailable) { System.err.println("n/a on Android"); return; }
JarFile jarFile = JarUtil.getJarFile(GlueGenVersion.class.getName(), this.getClass().getClassLoader());
Assert.assertNotNull(jarFile);
- JarUtil.extract(fileCache.getTempDir(), null, jarFile, false, true, true);
+ JarUtil.extract(fileCache.getTempDir(), null, jarFile, null, false, true, true);
File f = new File(fileCache.getTempDir(), "META-INF/MANIFEST.MF");
Assert.assertTrue(f.exists());
f = new File(fileCache.getTempDir(), IOUtil.getClassFileName(GlueGenVersion.class.getName()));
@@ -199,11 +203,11 @@ public class TestTempJarCache extends JunitTracer {
final ClassLoader cl = getClass().getClassLoader();
URI jarUriRoot = JarUtil.getJarSubURI(TempJarCache.class.getName(), cl);
- jarUriRoot = IOUtil.getDirname(jarUriRoot);
+ jarUriRoot = IOUtil.getURIDirname(jarUriRoot);
URI nativeJarURI = JarUtil.getJarFileURI(jarUriRoot, nativeJarName);
- TempJarCache.addNativeLibs(TempJarCache.class, nativeJarURI);
+ TempJarCache.addNativeLibs(TempJarCache.class, nativeJarURI, null /* nativeLibraryPath */);
String libFullPath = TempJarCache.findLibrary(libBaseName);
Assert.assertNotNull(libFullPath);
Assert.assertEquals(libBaseName, NativeLibrary.isValidNativeLibraryName(libFullPath, true));
diff --git a/src/junit/com/jogamp/common/util/TestValueConversion.java b/src/junit/com/jogamp/common/util/TestValueConversion.java
index 2a437b8..b70a414 100644
--- a/src/junit/com/jogamp/common/util/TestValueConversion.java
+++ b/src/junit/com/jogamp/common/util/TestValueConversion.java
@@ -37,6 +37,10 @@ import static com.jogamp.common.util.ValueConv.*;
/**
* Testing ValueConv's value conversion of primitive types
*/
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class TestValueConversion {
@Test
diff --git a/src/junit/com/jogamp/common/util/TestVersionInfo.java b/src/junit/com/jogamp/common/util/TestVersionInfo.java
index f9c748b..46bd1d2 100644
--- a/src/junit/com/jogamp/common/util/TestVersionInfo.java
+++ b/src/junit/com/jogamp/common/util/TestVersionInfo.java
@@ -34,6 +34,10 @@ import org.junit.Test;
import com.jogamp.common.GlueGenVersion;
import com.jogamp.junit.util.JunitTracer;
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class TestVersionInfo extends JunitTracer {
@Test
diff --git a/src/junit/com/jogamp/common/util/TestVersionNumber.java b/src/junit/com/jogamp/common/util/TestVersionNumber.java
index e46213a..b3d1cfd 100644
--- a/src/junit/com/jogamp/common/util/TestVersionNumber.java
+++ b/src/junit/com/jogamp/common/util/TestVersionNumber.java
@@ -35,6 +35,10 @@ import org.junit.Test;
import com.jogamp.junit.util.JunitTracer;
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class TestVersionNumber extends JunitTracer {
@Test
diff --git a/src/junit/com/jogamp/common/util/locks/TestRecursiveLock01.java b/src/junit/com/jogamp/common/util/locks/TestRecursiveLock01.java
index 45df7b2..df5f3ba 100644
--- a/src/junit/com/jogamp/common/util/locks/TestRecursiveLock01.java
+++ b/src/junit/com/jogamp/common/util/locks/TestRecursiveLock01.java
@@ -40,6 +40,10 @@ import org.junit.Test;
import com.jogamp.common.os.Platform;
import com.jogamp.junit.util.JunitTracer;
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class TestRecursiveLock01 extends JunitTracer {
public enum YieldMode {
diff --git a/src/junit/com/jogamp/common/util/locks/TestRecursiveThreadGroupLock01.java b/src/junit/com/jogamp/common/util/locks/TestRecursiveThreadGroupLock01.java
index 7191a74..51cc0ac 100644
--- a/src/junit/com/jogamp/common/util/locks/TestRecursiveThreadGroupLock01.java
+++ b/src/junit/com/jogamp/common/util/locks/TestRecursiveThreadGroupLock01.java
@@ -36,6 +36,10 @@ import org.junit.Test;
import com.jogamp.common.os.Platform;
import com.jogamp.junit.util.JunitTracer;
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class TestRecursiveThreadGroupLock01 extends JunitTracer {
public enum YieldMode {
diff --git a/src/junit/com/jogamp/common/util/locks/TestSingletonServerSocket00.java b/src/junit/com/jogamp/common/util/locks/TestSingletonServerSocket00.java
index bb6a55c..2ab6d52 100644
--- a/src/junit/com/jogamp/common/util/locks/TestSingletonServerSocket00.java
+++ b/src/junit/com/jogamp/common/util/locks/TestSingletonServerSocket00.java
@@ -34,6 +34,10 @@ import junit.framework.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class TestSingletonServerSocket00 {
// public static final String SINGLE_INSTANCE_LOCK_FILE = "UITestCase.lock";
public static final int SINGLE_INSTANCE_LOCK_PORT = 59999;
diff --git a/src/junit/com/jogamp/common/util/locks/TestSingletonServerSocket01.java b/src/junit/com/jogamp/common/util/locks/TestSingletonServerSocket01.java
index 9acd7d6..6cb5d39 100644
--- a/src/junit/com/jogamp/common/util/locks/TestSingletonServerSocket01.java
+++ b/src/junit/com/jogamp/common/util/locks/TestSingletonServerSocket01.java
@@ -35,6 +35,10 @@ import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class TestSingletonServerSocket01 {
// public static final String SINGLE_INSTANCE_LOCK_FILE = "UITestCase.lock";
public static final int SINGLE_INSTANCE_LOCK_PORT = 59999;
diff --git a/src/junit/com/jogamp/common/util/locks/TestSingletonServerSocket02.java b/src/junit/com/jogamp/common/util/locks/TestSingletonServerSocket02.java
index 69128d1..32a1c00 100644
--- a/src/junit/com/jogamp/common/util/locks/TestSingletonServerSocket02.java
+++ b/src/junit/com/jogamp/common/util/locks/TestSingletonServerSocket02.java
@@ -35,6 +35,10 @@ import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class TestSingletonServerSocket02 {
// public static final String SINGLE_INSTANCE_LOCK_FILE = "UITestCase.lock";
public static final int SINGLE_INSTANCE_LOCK_PORT = 59999;
diff --git a/src/junit/com/jogamp/gluegen/test/junit/generation/PCPPTest.java b/src/junit/com/jogamp/gluegen/test/junit/generation/PCPPTest.java
index 4c47a78..eceef19 100644
--- a/src/junit/com/jogamp/gluegen/test/junit/generation/PCPPTest.java
+++ b/src/junit/com/jogamp/gluegen/test/junit/generation/PCPPTest.java
@@ -47,6 +47,10 @@ import static org.junit.Assert.*;
* serves mainly as entry point for debugging purposes.
* @author Sven Gothel, Michael Bien
*/
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class PCPPTest extends JunitTracer {
@BeforeClass
diff --git a/src/junit/com/jogamp/gluegen/test/junit/generation/Test1p1JavaEmitter.java b/src/junit/com/jogamp/gluegen/test/junit/generation/Test1p1JavaEmitter.java
index 60159be..bbf0398 100644
--- a/src/junit/com/jogamp/gluegen/test/junit/generation/Test1p1JavaEmitter.java
+++ b/src/junit/com/jogamp/gluegen/test/junit/generation/Test1p1JavaEmitter.java
@@ -40,6 +40,10 @@ import org.junit.Test;
* @author Michael Bien
* @author Sven Gothel
*/
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class Test1p1JavaEmitter extends BaseClass {
/**
diff --git a/src/junit/com/jogamp/gluegen/test/junit/generation/Test1p2ProcAddressEmitter.java b/src/junit/com/jogamp/gluegen/test/junit/generation/Test1p2ProcAddressEmitter.java
index 64f17a5..a11489c 100644
--- a/src/junit/com/jogamp/gluegen/test/junit/generation/Test1p2ProcAddressEmitter.java
+++ b/src/junit/com/jogamp/gluegen/test/junit/generation/Test1p2ProcAddressEmitter.java
@@ -43,6 +43,10 @@ import org.junit.Test;
* @author Michael Bien
* @author Sven Gothel
*/
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class Test1p2ProcAddressEmitter extends BaseClass {
static NativeLibrary dynamicLookupHelper;
diff --git a/src/junit/com/jogamp/gluegen/test/junit/structgen/TestStructGen01.java b/src/junit/com/jogamp/gluegen/test/junit/structgen/TestStructGen01.java
index 444593d..23b1624 100644
--- a/src/junit/com/jogamp/gluegen/test/junit/structgen/TestStructGen01.java
+++ b/src/junit/com/jogamp/gluegen/test/junit/structgen/TestStructGen01.java
@@ -6,6 +6,10 @@ import com.jogamp.junit.util.JunitTracer;
import org.junit.Assert;
import org.junit.Test;
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class TestStructGen01 extends JunitTracer {
// APT is only triggered for fields,
diff --git a/src/junit/com/jogamp/junit/sec/TestSecIOUtil01.java b/src/junit/com/jogamp/junit/sec/TestSecIOUtil01.java
index 306e8d8..cc734ec 100644
--- a/src/junit/com/jogamp/junit/sec/TestSecIOUtil01.java
+++ b/src/junit/com/jogamp/junit/sec/TestSecIOUtil01.java
@@ -45,6 +45,10 @@ import com.jogamp.common.util.IOUtil;
import com.jogamp.common.util.JarUtil;
import com.jogamp.junit.util.JunitTracer;
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class TestSecIOUtil01 extends JunitTracer {
static final String java_io_tmpdir_propkey = "java.io.tmpdir";
static final String java_home_propkey = "java.home";
diff --git a/src/junit/com/jogamp/junit/util/JunitTracer.java b/src/junit/com/jogamp/junit/util/JunitTracer.java
index befc2ad..555f27f 100644
--- a/src/junit/com/jogamp/junit/util/JunitTracer.java
+++ b/src/junit/com/jogamp/junit/util/JunitTracer.java
@@ -33,10 +33,13 @@ import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.After;
import org.junit.AfterClass;
+import org.junit.FixMethodOrder;
import org.junit.Rule;
import org.junit.rules.TestName;
+import org.junit.runners.MethodSorters;
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public abstract class JunitTracer {
@Rule public TestName _unitTestName = new TestName();
diff --git a/test/TestEclipse_JarInJar/lala02.orig.jar b/test/TestEclipse_JarInJar/lala02.orig.jar
new file mode 100644
index 0000000..39d52e5
--- /dev/null
+++ b/test/TestEclipse_JarInJar/lala02.orig.jar
Binary files differ
diff --git a/test/TestEclipse_JarInJar/make-jarinjar.sh b/test/TestEclipse_JarInJar/make-jarinjar.sh
new file mode 100644
index 0000000..53239a4
--- /dev/null
+++ b/test/TestEclipse_JarInJar/make-jarinjar.sh
@@ -0,0 +1,21 @@
+THISDIR=`pwd`
+GLUEGEN=$THISDIR/../../../gluegen
+JOGL=$THISDIR/../../../jogl
+
+bdir=build-x86_64
+
+rm -rf tmp
+mkdir tmp
+
+cd tmp
+unzip $THISDIR/lala02.orig.jar
+
+cp -av $GLUEGEN/$bdir/gluegen-rt.jar .
+cp -av $GLUEGEN/$bdir/gluegen-rt-natives-linux-amd64.jar .
+cp -av $JOGL/$bdir/jar/jogl-all.jar .
+cp -av $JOGL/$bdir/jar/jogl-all-natives-linux-amd64.jar .
+
+jar cmf META-INF/MANIFEST.MF ../lala02.jar *jar *class org
+cd ..
+
+rm -rf tmp
diff --git a/test/TestEclipse_JarInJar/run-jarinjar.sh b/test/TestEclipse_JarInJar/run-jarinjar.sh
new file mode 100644
index 0000000..404a301
--- /dev/null
+++ b/test/TestEclipse_JarInJar/run-jarinjar.sh
@@ -0,0 +1,8 @@
+
+THIS_DIR=`pwd`
+
+D_ARGS="-Djogamp.debug.JNILibLoader -Djogamp.debug.JarUtil -Djogamp.debug.TempJarCache"
+#D_ARGS="-Djogamp.debug.ProcAddressHelper -Djogamp.debug.NativeLibrary -Djogamp.debug.NativeLibrary.Lookup"
+#D_ARGS="-Djogamp.debug.JNILibLoader -Djogamp.debug.TempFileCache -Djogamp.debug.JarUtil -Djogamp.debug.TempJarCache -Djogamp.debug.NativeLibrary -Djogamp.debug.NativeLibrary.Lookup -Djogl.debug=all"
+
+java $D_ARGS -jar lala02.jar 2>&1 | tee run-jarinjar.log
diff --git a/test/TestMultiAndFatJar/make-fat_and_multi.sh b/test/TestMultiAndFatJar/make-fat_and_multi.sh
new file mode 100644
index 0000000..945d29b
--- /dev/null
+++ b/test/TestMultiAndFatJar/make-fat_and_multi.sh
@@ -0,0 +1,45 @@
+THISDIR=`pwd`
+GLUEGEN=$THISDIR/../../../gluegen
+JOGL=$THISDIR/../../../jogl
+
+bdir=build-x86_64
+
+rm -rf temp
+
+#
+# make fat
+#
+rm -f jogl-fat.jar
+mkdir temp
+cd temp
+unzip -o $GLUEGEN/$bdir/gluegen-rt.jar
+unzip -o $GLUEGEN/$bdir/gluegen-rt-natives-linux-amd64.jar
+unzip -o $JOGL/$bdir/jar/jogl-all.jar
+unzip -o $JOGL/$bdir/jar/jogl-all-natives-linux-amd64.jar
+mkdir -p natives/linux-amd64
+mv lib*.so natives/linux-amd64/
+rm -rf META-INF
+jar cf ../jogl-fat.jar *
+cd ..
+rm -rf temp
+
+#
+# make multi
+#
+rm -f jogl-multi.jar jogl-multi-natives-linux-amd64.jar
+mkdir temp
+cd temp
+unzip -o $GLUEGEN/$bdir/gluegen-rt.jar
+unzip -o $JOGL/$bdir/jar/jogl-all.jar
+rm -rf META-INF
+jar cf ../jogl-multi.jar *
+rm -rf *
+unzip -o $GLUEGEN/$bdir/gluegen-rt-natives-linux-amd64.jar
+unzip -o $JOGL/$bdir/jar/jogl-all-natives-linux-amd64.jar
+mkdir -p natives/linux-amd64
+mv lib*.so natives/linux-amd64/
+rm -rf META-INF
+jar cf ../jogl-multi-natives-linux-amd64.jar *
+cd ..
+rm -rf temp
+
diff --git a/test/TestMultiAndFatJar/run-fat.sh b/test/TestMultiAndFatJar/run-fat.sh
new file mode 100644
index 0000000..2108446
--- /dev/null
+++ b/test/TestMultiAndFatJar/run-fat.sh
@@ -0,0 +1,9 @@
+
+D_ARGS="-Djogamp.debug.JNILibLoader -Djogamp.debug.TempFileCache -Djogamp.debug.JarUtil -Djogamp.debug.TempJarCache -Djogamp.debug.IOUtil"
+#D_ARGS="-Djogamp.debug.ProcAddressHelper -Djogamp.debug.NativeLibrary -Djogamp.debug.NativeLibrary.Lookup"
+#D_ARGS="-Djogamp.debug.JNILibLoader -Djogamp.debug.TempFileCache -Djogamp.debug.JarUtil -Djogamp.debug.TempJarCache -Djogamp.debug.NativeLibrary -Djogamp.debug.NativeLibrary.Lookup -Djogl.debug=all"
+
+#T_CLASS="com.jogamp.opengl.JoglVersion"
+T_CLASS="com.jogamp.newt.opengl.GLWindow"
+
+java -cp jogl-fat.jar $D_ARGS $T_CLASS 2>&1 | tee run-fat.log
diff --git a/test/TestMultiAndFatJar/run-multi.sh b/test/TestMultiAndFatJar/run-multi.sh
new file mode 100644
index 0000000..86206a4
--- /dev/null
+++ b/test/TestMultiAndFatJar/run-multi.sh
@@ -0,0 +1,9 @@
+
+D_ARGS="-Djogamp.debug.JNILibLoader -Djogamp.debug.TempFileCache -Djogamp.debug.JarUtil -Djogamp.debug.TempJarCache -Djogamp.debug.IOUtil"
+#D_ARGS="-Djogamp.debug.ProcAddressHelper -Djogamp.debug.NativeLibrary -Djogamp.debug.NativeLibrary.Lookup"
+#D_ARGS="-Djogamp.debug.JNILibLoader -Djogamp.debug.TempFileCache -Djogamp.debug.JarUtil -Djogamp.debug.TempJarCache -Djogamp.debug.NativeLibrary -Djogamp.debug.IOUtil"
+
+#T_CLASS="com.jogamp.opengl.JoglVersion"
+T_CLASS="com.jogamp.newt.opengl.GLWindow"
+
+java -cp jogl-multi.jar $D_ARGS $T_CLASS 2>&1 | tee run-multi.log
diff --git a/test/TestOneJar_InJar/jogamp01/build.xml b/test/TestOneJar_InJar/jogamp01/build.xml
new file mode 100644
index 0000000..e1a4b24
--- /dev/null
+++ b/test/TestOneJar_InJar/jogamp01/build.xml
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="jogamp01" basedir="." default="build">
+
+ <!-- Hook into One-Jar project -->
+ <available property="one-jar.dir" file="../one-jar/build.onejar.xml" value="../one-jar"/>
+ <!-- Will be ignored if available above -->
+ <property name="one-jar.dir" location="one-jar" />
+ <import file="${one-jar.dir}/build.onejar.xml"/>
+
+ <property name="eclipse.jar-in-jar.dir" value="build-lib/eclipse"/>
+ <property name="temp.dir" value="temp" />
+ <path id="libraries">
+ <fileset dir="lib" includes="*.jar"/>
+ </path>
+
+ <target name="mkdirs">
+ <mkdir dir="${test.results.dir}" />
+ <mkdir dir="${test.reports.dir}"/>
+ <mkdir dir="classes/src"/>
+ <mkdir dir="classes/test"/>
+ <mkdir dir="classes/junit"/>
+ <mkdir dir="build"/>
+ </target>
+
+ <target name="build" depends="clean, mkdirs, compile, build.jogamp01" />
+
+ <target name="clean">
+ <delete dir="classes" />
+ </target>
+
+ <target name="distclean" depends="clean" description="clean distribution">
+ <delete dir="build"/>
+ <delete dir="test-reports"/>
+ <delete dir="test-results"/>
+ </target>
+
+ <target name="compile" depends="mkdirs">
+ <javac destdir="classes/src" includes="**/*.java" debug="true">
+ <src path="src" />
+ <classpath refid="libraries" />
+ <classpath refid="one-jar.libraries"/>
+ <classpath path="${one-jar.ant.jar}"/>
+ </javac>
+ <javac destdir="classes/test" includes="**/*.java" debug="true">
+ <src path="test" />
+ <classpath refid="libraries" />
+ <classpath refid="one-jar.libraries"/>
+ <classpath path="${one-jar.ant.jar}"/>
+ </javac>
+ <javac destdir="classes/junit" includes="**/*.java" debug="true">
+ <src path="junit" />
+ <classpath refid="libraries" />
+ <classpath refid="one-jar.libraries"/>
+ <!-- Uses Invoker to set up a JUnit test bridge -->
+ <classpath path="classes/test"/>
+ </javac>
+ </target>
+
+ <!-- Build the One-Jar -->
+ <target name="build.jogamp01">
+ <mkdir dir="build"/>
+ <one-jar destfile="build/jogamp01.jar">
+ <manifest>
+ <attribute name="Main-Class" value="jogamp.Boot"/>
+ <attribute name="One-Jar-Main-Class" value="com.jogamp.newt.opengl.GLWindow"/>
+ </manifest>
+ <main>
+ <fileset dir="classes/src"/>
+ </main>
+ <lib>
+ <fileset dir="lib" includes="*.jar" />
+ </lib>
+ </one-jar>
+ <one-jar destfile="build/test-jogamp01.jar">
+ <manifest>
+ <attribute name="Main-Class" value="jogamp.Boot"/>
+ <attribute name="One-Jar-Main-Class" value="jogamp.test.Test"/>
+ </manifest>
+ <zipfileset src="${one-jar.ant.jar}" includes="**/Testable.class"/>
+ <main>
+ <fileset dir="classes/test"/>
+ </main>
+ <lib>
+ <fileset dir="lib" includes="*.jar" />
+ </lib>
+ </one-jar>
+ <delete dir="${temp.dir}" />
+ </target>
+
+ <property name="formatter" value="xml" />
+
+ <!-- Test the distribution -->
+ <target name="junit.report.jogamp01" depends="build" description="JUnit test of jogamp01">
+ <antcall target="junit.jogamp01" />
+ <antcall target="junit.report"/>
+ </target>
+
+ <target name="junit.jogamp01" depends="build">
+ <echo>********** junit-jogamp01.jar</echo>
+ <junit fork="yes" showoutput="no" printsummary="yes">
+ <jvmarg value="-Done-jar.verbose=true" />
+ <jvmarg value="-Done-jar.jarname=${basedir}/build/test-jogamp01.jar" />
+ <classpath>
+ <fileset file="${basedir}/build/test-jogamp01.jar" />
+ <path refid="one-jar.libraries"/>
+ <path location="classes/junit" />
+ </classpath>
+
+ <!-- Uses Invoker to set up a JUnit test bridge -->
+ <test name="jogamp.test.Jogamp01Suite" todir="${test.results.dir}" outfile="Jogamp01Suite" />
+ <formatter type="${formatter}" usefile="yes" />
+ </junit>
+ </target>
+
+ <target name="run.jogamp01" depends="build" description="Run a One-Jar jogamp01">
+ <java fork="true" jar="build/jogamp01.jar"/>
+ </target>
+
+ <target name="test.jogamp01" depends="build" description="Stand-alone test a One-Jar jogamp01">
+ <java fork="true" jar="build/test-jogamp01.jar"/>
+ </target>
+
+</project>
diff --git a/test/TestOneJar_InJar/jogamp01/ide/eclipse/jogamp01-suite.launch b/test/TestOneJar_InJar/jogamp01/ide/eclipse/jogamp01-suite.launch
new file mode 100644
index 0000000..b3e5c70
--- /dev/null
+++ b/test/TestOneJar_InJar/jogamp01/ide/eclipse/jogamp01-suite.launch
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/one-jar-jogamp01"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="4"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.debug.core.source_locator_id" value="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"/>
+<stringAttribute key="org.eclipse.debug.core.source_locator_memento" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;sourceLookupDirector&gt;&#13;&#10;&lt;sourceContainers duplicates=&quot;false&quot;&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;one-jar-jogamp01project$&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;one-jar&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;packageFragmentRoot handle=&amp;quot;=one-jar/lib\/junit-3.8.1.jar&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.packageFragmentRoot&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;default/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.debug.core.containerType.default&quot;/&gt;&#13;&#10;&lt;/sourceContainers&gt;&#13;&#10;&lt;/sourceLookupDirector&gt;&#13;&#10;"/>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
+<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry containerPath=&quot;org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6&quot; javaProject=&quot;one-jar-jogamp01&quot; path=&quot;1&quot; type=&quot;4&quot;/&gt;&#13;&#10;"/>
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry containerPath=&quot;org.eclipse.jdt.junit.JUNIT_CONTAINER/3&quot; path=&quot;3&quot; type=&quot;4&quot;/&gt;&#13;&#10;"/>
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/one-jar/build/eclipse/test&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/one-jar-jogamp01/build/test-one-jar-jogamp01.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/one-jar-Jogamp01/classes/test&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
+</listAttribute>
+<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="jogamp.test.Jogamp01Suite"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="one-jar-jogamp01"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Done-jar.verbose=false&#13;&#10;-Done-jar.jar.path=${project_loc:one-jar-jogamp01}/build/test-one-jar-jogamp01.jar"/>
+</launchConfiguration>
diff --git a/test/TestOneJar_InJar/jogamp01/ide/eclipse/test-jogamp01 (JarLaunch build).launch b/test/TestOneJar_InJar/jogamp01/ide/eclipse/test-jogamp01 (JarLaunch build).launch
new file mode 100644
index 0000000..e532dd3
--- /dev/null
+++ b/test/TestOneJar_InJar/jogamp01/ide/eclipse/test-jogamp01 (JarLaunch build).launch
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/one-jar-jogamp01"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="4"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="-jar"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="C:/eclipse/projects/com.simontuffs/one-jar-jogamp01/build/test-jogamp01.jar"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="one-jar-jogamp01"/>
+</launchConfiguration>
diff --git a/test/TestOneJar_InJar/jogamp01/junit/jogamp/test/Jogamp01Suite.java b/test/TestOneJar_InJar/jogamp01/junit/jogamp/test/Jogamp01Suite.java
new file mode 100644
index 0000000..85ac9c0
--- /dev/null
+++ b/test/TestOneJar_InJar/jogamp01/junit/jogamp/test/Jogamp01Suite.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2004-2010, P. Simon Tuffs ([email protected])
+ * All rights reserved.
+ *
+ * See the full license at http://one-jar.sourceforge.net/one-jar-license.html
+ * This license is also included in the distributions of this software
+ * under doc/one-jar-license.txt
+ */
+package jogamp.test;
+
+import java.lang.reflect.Method;
+
+import junit.framework.AssertionFailedError;
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestResult;
+import junit.framework.TestSuite;
+
+import com.simontuffs.onejar.Boot;
+import com.simontuffs.onejar.JarClassLoader;
+import com.simontuffs.onejar.test.Invoker;
+
+public class Jogamp01Suite {
+
+ protected static Object test;
+ protected static int failures = 0;
+
+ public static final String MAIN_CLASS = "jogamp.test.Test";
+
+ public static void main(String args[]) {
+ new TestSuite(Jogamp01Suite.class).run(new TestResult());
+ }
+
+ public static Test suite() throws Exception {
+ if (test == null) {
+ // Load Test object from the jar.
+ JarClassLoader loader = new JarClassLoader("");
+ Boot.setClassLoader(loader);
+ // loader.setVerbose(true);
+ loader.load(null);
+ test = loader.loadClass(MAIN_CLASS).newInstance();
+ }
+ TestSuite top = new TestSuite();
+ TestSuite suite = new TestSuite(MAIN_CLASS);
+ top.addTest(suite);
+ Method methods[] = test.getClass().getMethods();
+ for (final Method method: methods) {
+ if (method.getName().startsWith("test")) {
+ System.out.println("" + method);
+ suite.addTest(new TestCase() {
+ {
+ setName(method.getName());
+ }
+ @Override
+ public void run(TestResult result) {
+ // TODO Auto-generated method stub
+ result.startTest(this);
+ try {
+ Invoker.invoke(test, method.getName());
+ } catch (Exception x) {
+ x.printStackTrace();
+ result.addFailure(this, new AssertionFailedError(x.toString()));
+ }
+ result.endTest(this);
+ }
+ });
+ }
+ }
+
+ return suite;
+ }
+
+}
diff --git a/test/TestOneJar_InJar/jogamp01/lib/README.txt b/test/TestOneJar_InJar/jogamp01/lib/README.txt
new file mode 100644
index 0000000..3c862b9
--- /dev/null
+++ b/test/TestOneJar_InJar/jogamp01/lib/README.txt
@@ -0,0 +1 @@
+Place your libraries to be included in the One-Jar archive here.
diff --git a/test/TestOneJar_InJar/jogamp01/one-jar/build.onejar.xml b/test/TestOneJar_InJar/jogamp01/one-jar/build.onejar.xml
new file mode 100644
index 0000000..8c41ade
--- /dev/null
+++ b/test/TestOneJar_InJar/jogamp01/one-jar/build.onejar.xml
@@ -0,0 +1,54 @@
+<project>
+ <!-- Capture essential paths for use by other projects -->
+ <property name="one-jar.version" value="0.97" />
+ <pathconvert targetos="unix" property="basedir.unix">
+ <path location="${basedir}"/>
+ </pathconvert>
+
+ <property name="one-jar.dir" value="${basedir}/../one-jar"/>
+ <property name="one-jar.dist.dir" value="${one-jar.dir}/dist" />
+ <property name="one-jar.build.ant" location="${one-jar.dir}/build/ant"/>
+
+ <!-- Commonly used relative paths. -->
+ <property name="classes" value="classes" />
+ <property name="lib" value="lib" />
+ <property name="src" value="src" />
+ <property name="test" value="test" />
+
+ <!-- Defaults: expected to be overridden as part of overall test suite for aggregation. -->
+ <property name="test.reports.dir" value="${basedir.unix}/test-reports"/>
+ <property name="test.results.dir" value="${basedir.unix}/test-results"/>
+
+ <import file="${one-jar.dist.dir}/one-jar-ant-task.xml" optional="true" />
+
+ <path id="one-jar.libraries">
+ <pathelement location="${one-jar.dir}/lib/junit-3.8.1.jar"/>
+ <pathelement location="${one-jar.dir}/dist/one-jar-boot-${one-jar.version}.jar"/>
+ <pathelement location="${one-jar.ant.jar}"/>
+ </path>
+
+ <path id="one-jar.test.libraries">
+ <pathelement location="${one-jar.dir}/lib/junit-3.8.1.jar"/>
+ <pathelement location="${classes.dir}/test" />
+ </path>
+
+ <target name="build.init">
+ <mkdir dir="build"/>
+ <mkdir dir="${test.reports.dir}"/>
+ <mkdir dir="${test.results.dir}"/>
+ </target>
+
+ <target name="junit.report">
+ <mkdir dir="${test.reports.dir}" />
+ <junitreport todir="${test.reports.dir}">
+ <fileset dir="${test.results.dir}" includes="*SelfTest*.xml,*Suite.xml" />
+ <report format="noframes" todir="${test.reports.dir}" />
+ </junitreport>
+ <echo>***********************************************</echo>
+ <echo>* Report is in ${test.reports.dir}/junit_noframes.html</echo>
+ <echo>***********************************************</echo>
+ </target>
+
+
+
+</project>
diff --git a/test/TestOneJar_InJar/jogamp01/one-jar/dist/one-jar-ant-task-0.97.jar b/test/TestOneJar_InJar/jogamp01/one-jar/dist/one-jar-ant-task-0.97.jar
new file mode 100644
index 0000000..15dbbb2
--- /dev/null
+++ b/test/TestOneJar_InJar/jogamp01/one-jar/dist/one-jar-ant-task-0.97.jar
Binary files differ
diff --git a/test/TestOneJar_InJar/jogamp01/one-jar/dist/one-jar-ant-task.xml b/test/TestOneJar_InJar/jogamp01/one-jar/dist/one-jar-ant-task.xml
new file mode 100644
index 0000000..007b5ad
--- /dev/null
+++ b/test/TestOneJar_InJar/jogamp01/one-jar/dist/one-jar-ant-task.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<project>
+ <!-- The following property is expected to be overridden by caller -->
+ <property name="one-jar.dist.dir" value="./dist"/>
+ <property name="one-jar.version" value="0.97"/>
+ <property name="one-jar.ant.jar" value="${one-jar.dist.dir}/one-jar-ant-task-${one-jar.version}.jar"/>
+ <taskdef name="one-jar" classname="com.simontuffs.onejar.ant.OneJarTask"
+ classpath="${one-jar.ant.jar}" onerror="report"/>
+
+</project>
diff --git a/test/TestOneJar_InJar/jogamp01/one-jar/dist/one-jar-boot-0.97.jar b/test/TestOneJar_InJar/jogamp01/one-jar/dist/one-jar-boot-0.97.jar
new file mode 100644
index 0000000..26e0ec6
--- /dev/null
+++ b/test/TestOneJar_InJar/jogamp01/one-jar/dist/one-jar-boot-0.97.jar
Binary files differ
diff --git a/test/TestOneJar_InJar/jogamp01/one-jar/lib/junit-3.8.1.jar b/test/TestOneJar_InJar/jogamp01/one-jar/lib/junit-3.8.1.jar
new file mode 100644
index 0000000..674d71e
--- /dev/null
+++ b/test/TestOneJar_InJar/jogamp01/one-jar/lib/junit-3.8.1.jar
Binary files differ
diff --git a/test/TestOneJar_InJar/jogamp01/src/jogamp/main/Jogamp01Main.java b/test/TestOneJar_InJar/jogamp01/src/jogamp/main/Jogamp01Main.java
new file mode 100644
index 0000000..b8ee4e1
--- /dev/null
+++ b/test/TestOneJar_InJar/jogamp01/src/jogamp/main/Jogamp01Main.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2004-2010, P. Simon Tuffs ([email protected])
+ * All rights reserved.
+ *
+ * See the full license at http://one-jar.sourceforge.net/one-jar-license.html
+ * This license is also included in the distributions of this software
+ * under doc/one-jar-license.txt
+ */
+package jogamp.main;
+
+import java.util.Arrays;
+
+public class Jogamp01Main {
+
+ public static void main(String args[]) {
+ if (args == null)
+ args = new String[0];
+ System.out.println("jogamp01 main entry point, args=" + Arrays.asList(args));
+ new Jogamp01Main().run();
+ }
+
+ // Bring up the application: only expected to exit when user interaction
+ // indicates so.
+ public void run() {
+ System.out.println("jogamp01 main is running");
+ // Implement the functionality of the application.
+ System.out.println("jogamp01 OK.");
+ }
+
+
+}
diff --git a/test/TestOneJar_InJar/jogamp01/test/jogamp/test/Test.java b/test/TestOneJar_InJar/jogamp01/test/jogamp/test/Test.java
new file mode 100644
index 0000000..87e987f
--- /dev/null
+++ b/test/TestOneJar_InJar/jogamp01/test/jogamp/test/Test.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2004-2010, P. Simon Tuffs ([email protected])
+ * All rights reserved.
+ *
+ * See the full license at http://one-jar.sourceforge.net/one-jar-license.html
+ * This license is also included in the distributions of this software
+ * under doc/one-jar-license.txt
+ */
+package jogamp.test;
+
+import com.simontuffs.onejar.test.Testable;
+
+public class Test extends Testable {
+
+ public static void main(String args[]) throws Exception {
+ Test test = new Test();
+ test.runTests();
+ }
+
+ // Test other aspects of the application at unit level (e.g. library
+ // methods).
+ public void testJogamp011() {
+ System.out.println("testJogamp011: OK");
+ }
+ public void testJogamp012() {
+ System.out.println("testJogamp012: OK");
+ }
+ public void testJogamp013() {
+ System.out.println("testJogamp013: OK");
+ }
+
+}
diff --git a/test/TestOneJar_InJar/make-one_jar.sh b/test/TestOneJar_InJar/make-one_jar.sh
new file mode 100644
index 0000000..7ba3a83
--- /dev/null
+++ b/test/TestOneJar_InJar/make-one_jar.sh
@@ -0,0 +1,18 @@
+THISDIR=`pwd`
+GLUEGEN=$THISDIR/../../../gluegen
+JOGL=$THISDIR/../../../jogl
+
+DEST=jogamp01/lib/
+
+bdir=build-x86_64
+
+cp -av $GLUEGEN/$bdir/gluegen-rt.jar $DEST
+cp -av $GLUEGEN/$bdir/gluegen-rt-natives-linux-amd64.jar $DEST
+cp -av $JOGL/$bdir/jar/jogl-all.jar $DEST
+cp -av $JOGL/$bdir/jar/jogl-all-natives-linux-amd64.jar $DEST
+
+rm -f jogamp01/build/*
+
+cd jogamp01
+ant
+cd ..
diff --git a/test/TestOneJar_InJar/one-jar-license.txt b/test/TestOneJar_InJar/one-jar-license.txt
new file mode 100644
index 0000000..8336075
--- /dev/null
+++ b/test/TestOneJar_InJar/one-jar-license.txt
@@ -0,0 +1,33 @@
+/*
+ * One-JAR(TM) (http://www.simontuffs.com/one-jar). Copyright (c) 2004-2010,
+ * P. Simon Tuffs ([email protected]). All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * Neither the name of P. Simon Tuffs, nor the names of any contributors,
+ * nor the name One-JAR may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Including this file inside the built One-JAR file conforms with these terms.
+ */
+
diff --git a/test/TestOneJar_InJar/run-one.sh b/test/TestOneJar_InJar/run-one.sh
new file mode 100644
index 0000000..b1d6542
--- /dev/null
+++ b/test/TestOneJar_InJar/run-one.sh
@@ -0,0 +1,9 @@
+
+THIS_DIR=`pwd`
+
+D_ARGS="-Djogamp.debug.JNILibLoader -Djogamp.debug.TempFileCache -Djogamp.debug.JarUtil -Djogamp.debug.TempJarCache -Djogamp.debug.IOUtil"
+#D_ARGS="-Djogamp.debug.ProcAddressHelper -Djogamp.debug.NativeLibrary -Djogamp.debug.NativeLibrary.Lookup"
+#D_ARGS="-Djogamp.debug.JNILibLoader -Djogamp.debug.TempFileCache -Djogamp.debug.JarUtil -Djogamp.debug.TempJarCache -Djogamp.debug.NativeLibrary -Djogamp.debug.NativeLibrary.Lookup -Djogl.debug=all"
+
+#java $D_ARGS -jar jogamp01/build/jogamp01.jar 2>&1 | tee run-one.log
+java $D_ARGS -jar $THIS_DIR/jogamp01/build/jogamp01.jar 2>&1 | tee run-one.log