aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmake/jogamp-env.xml4
-rwxr-xr-xmake/scripts/make.gluegen.all.linux-x86_64.sh3
-rw-r--r--make/scripts/setenv-build-jogamp-x86.sh10
-rw-r--r--make/scripts/setenv-build-jogamp-x86_64.sh10
-rw-r--r--src/java/com/jogamp/common/util/VersionUtil.java14
-rw-r--r--src/java/jogamp/common/os/PlatformPropsImpl.java85
6 files changed, 91 insertions, 35 deletions
diff --git a/make/jogamp-env.xml b/make/jogamp-env.xml
index b49d1f4..2f036fa 100755
--- a/make/jogamp-env.xml
+++ b/make/jogamp-env.xml
@@ -91,6 +91,8 @@
<equals arg1="${ant.java.version}" arg2="17"/>
<equals arg1="${ant.java.version}" arg2="18"/>
<equals arg1="${ant.java.version}" arg2="19"/>
+ <equals arg1="${ant.java.version}" arg2="20"/>
+ <equals arg1="${ant.java.version}" arg2="21"/>
</or>
</not>
</condition>
@@ -119,6 +121,8 @@
<equals arg1="${ant.java.version}" arg2="17"/>
<equals arg1="${ant.java.version}" arg2="18"/>
<equals arg1="${ant.java.version}" arg2="19"/>
+ <equals arg1="${ant.java.version}" arg2="20"/>
+ <equals arg1="${ant.java.version}" arg2="21"/>
</or>
</condition>
<echo message="javadoc.xarg1 ${javadoc.xarg1}"/>
diff --git a/make/scripts/make.gluegen.all.linux-x86_64.sh b/make/scripts/make.gluegen.all.linux-x86_64.sh
index b0bbed7..aaac667 100755
--- a/make/scripts/make.gluegen.all.linux-x86_64.sh
+++ b/make/scripts/make.gluegen.all.linux-x86_64.sh
@@ -2,6 +2,9 @@
SDIR=`dirname $0`
+# export J2RE_HOME=/usr/lib/jvm/java-11-openjdk-amd64
+# export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
+
if [ -e $SDIR/setenv-build-jogamp-x86_64.sh ] ; then
. $SDIR/setenv-build-jogamp-x86_64.sh
fi
diff --git a/make/scripts/setenv-build-jogamp-x86.sh b/make/scripts/setenv-build-jogamp-x86.sh
index 5c7ba06..c25474c 100644
--- a/make/scripts/setenv-build-jogamp-x86.sh
+++ b/make/scripts/setenv-build-jogamp-x86.sh
@@ -28,6 +28,16 @@ if [ ! -z "$J2RE_HOME" -a ! -z "$JAVA_HOME" ] ; then
fi
if [ -z "$FOUND_JAVA" ] ; then
+ if [ -e /usr/lib/jvm/java-17-openjdk-i386 ] ; then
+ J2RE_HOME=/usr/lib/jvm/java-17-openjdk-i386
+ JAVA_HOME=/usr/lib/jvm/java-17-openjdk-i386
+ PATH=$JAVA_HOME/bin:$PATH
+ export J2RE_HOME JAVA_HOME
+ FOUND_JAVA=1
+ fi
+fi
+
+if [ -z "$FOUND_JAVA" ] ; then
if [ -e /usr/lib/jvm/java-11-openjdk-i386 ] ; then
J2RE_HOME=/usr/lib/jvm/java-11-openjdk-i386
JAVA_HOME=/usr/lib/jvm/java-11-openjdk-i386
diff --git a/make/scripts/setenv-build-jogamp-x86_64.sh b/make/scripts/setenv-build-jogamp-x86_64.sh
index e9bf313..26dc5d0 100644
--- a/make/scripts/setenv-build-jogamp-x86_64.sh
+++ b/make/scripts/setenv-build-jogamp-x86_64.sh
@@ -28,6 +28,16 @@ if [ ! -z "$J2RE_HOME" -a ! -z "$JAVA_HOME" ] ; then
fi
if [ -z "$FOUND_JAVA" ] ; then
+ if [ -e /usr/lib/jvm/java-17-openjdk-amd64 ] ; then
+ J2RE_HOME=/usr/lib/jvm/java-17-openjdk-amd64
+ JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
+ PATH=$JAVA_HOME/bin:$PATH
+ export J2RE_HOME JAVA_HOME
+ FOUND_JAVA=1
+ fi
+fi
+
+if [ -z "$FOUND_JAVA" ] ; then
if [ -e /usr/lib/jvm/java-11-openjdk-amd64 ] ; then
J2RE_HOME=/usr/lib/jvm/java-11-openjdk-amd64
JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
diff --git a/src/java/com/jogamp/common/util/VersionUtil.java b/src/java/com/jogamp/common/util/VersionUtil.java
index 1e09034..eee3c4e 100644
--- a/src/java/com/jogamp/common/util/VersionUtil.java
+++ b/src/java/com/jogamp/common/util/VersionUtil.java
@@ -73,9 +73,17 @@ public class VersionUtil {
sb.append("Platform: Java Version: ").append(Platform.getJavaVersion()).append(" (").append(Platform.getJavaVersionNumber()).append("u").append(PlatformPropsImpl.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(PlatformPropsImpl.JAVA_SE);
- sb.append(", Java9: ").append(PlatformPropsImpl.JAVA_9);
- sb.append(", Java6: ").append(PlatformPropsImpl.JAVA_6);
+ if( PlatformPropsImpl.JAVA_21 ) {
+ sb.append(", Java21");
+ } else if( PlatformPropsImpl.JAVA_17 ) {
+ sb.append(", Java17");
+ } else if( PlatformPropsImpl.JAVA_9 ) {
+ sb.append(", Java9");
+ } else if( PlatformPropsImpl.JAVA_6 ) {
+ sb.append(", Java6");
+ } else if( PlatformPropsImpl.JAVA_SE ) {
+ sb.append(", JavaSE");
+ }
sb.append(", dynamicLib: ").append(PlatformPropsImpl.useDynamicLibraries);
sb.append(", AWT enabled: ").append(Platform.AWT_AVAILABLE);
sb.append(Platform.getNewline()).append(SEPERATOR);
diff --git a/src/java/jogamp/common/os/PlatformPropsImpl.java b/src/java/jogamp/common/os/PlatformPropsImpl.java
index b6cea66..aedf288 100644
--- a/src/java/jogamp/common/os/PlatformPropsImpl.java
+++ b/src/java/jogamp/common/os/PlatformPropsImpl.java
@@ -38,20 +38,6 @@ import com.jogamp.common.util.VersionNumber;
public abstract class PlatformPropsImpl {
static final boolean DEBUG = Debug.debug("Platform");
- /** Selected {@link Platform.OSType#MACOS} or {@link Platform.OSType#IOS} {@link VersionNumber}s. */
- public static class OSXVersion {
- /** OSX Tiger, i.e. 10.4.0 */
- public static final VersionNumber Tiger = new VersionNumber(10,4,0);
- /** OSX Lion, i.e. 10.7.0 */
- public static final VersionNumber Lion = new VersionNumber(10,7,0);
- /** OSX Mavericks, i.e. 10.9.0 */
- public static final VersionNumber Mavericks = new VersionNumber(10,9,0);
- /** OSX Mojave, i.e. 10.14.0 */
- public static final VersionNumber Mojave = new VersionNumber(10,14,0);
- /** OSX Big Sur, i.e. 11.00.0 */
- public static final VersionNumber BigSur = new VersionNumber(11,0,0);
- }
-
/**
* Returns {@code true} if the given {@link CPUType}s and {@link ABIType}s are compatible.
*/
@@ -63,15 +49,6 @@ public abstract class PlatformPropsImpl {
// static initialization order:
//
- /** Version 1.6. As a JVM version, it enables certain JVM 1.6 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;
- /** Version 1.8. As a JVM version, it enables certain JVM 1.8 features. */
- public static final VersionNumber Version18;
- /** Version 1.9. As a JVM version, it enables certain JVM 1.9 features. Note the skipped first version number due to JEP 223. */
- public static final VersionNumber Version9;
-
public static final String OS;
public static final String OS_lower;
public static final String OS_VERSION;
@@ -97,10 +74,11 @@ public abstract class PlatformPropsImpl {
* </p>
*/
public static final boolean JAVA_6;
+
/**
* True only if being compatible w/ language level 9, e.g. JRE 9.
* <p>
- * Implies {@link #isJavaSE()} and {@link #JAVA_6}.
+ * Implies {@link #JAVA_6} and {@link #isJavaSE()}
* </p>
* <p>
* Since JRE 9, the version string has dropped the major release number,
@@ -109,6 +87,22 @@ public abstract class PlatformPropsImpl {
*/
public static final boolean JAVA_9;
+ /**
+ * True only if being compatible w/ language level 17, e.g. JRE 17 (LTS).
+ * <p>
+ * Implies {@link #JAVA_9}, {@link #JAVA_6} and {@link #isJavaSE()}
+ * </p>
+ */
+ public static final boolean JAVA_17;
+
+ /**
+ * True only if being compatible w/ language level 21, e.g. JRE 21 (LTS).
+ * <p>
+ * Implies {@link #JAVA_17}, {@link #JAVA_9}, {@link #JAVA_6} and {@link #isJavaSE()}
+ * </p>
+ */
+ public static final boolean JAVA_21;
+
public static final String NEWLINE;
public static final boolean LITTLE_ENDIAN;
@@ -126,11 +120,6 @@ public abstract class PlatformPropsImpl {
public static final boolean useDynamicLibraries;
static {
- Version16 = new VersionNumber(1, 6, 0);
- Version17 = new VersionNumber(1, 7, 0);
- Version18 = new VersionNumber(1, 8, 0);
- Version9 = new VersionNumber(9, 0, 0);
-
// We don't seem to need an AccessController.doPrivileged() block
// here as these system properties are visible even to unsigned Applets.
final boolean isAndroid = AndroidVersion.isAvailable; // also triggers it's static initialization
@@ -158,9 +147,41 @@ public abstract class PlatformPropsImpl {
JAVA_VM_NAME = System.getProperty("java.vm.name");
JAVA_RUNTIME_NAME = getJavaRuntimeNameImpl();
JAVA_SE = initIsJavaSE();
- JAVA_9 = JAVA_SE && JAVA_VERSION_NUMBER.compareTo(Version9) >= 0;
- JAVA_6 = JAVA_SE && ( isAndroid || JAVA_9 || JAVA_VERSION_NUMBER.compareTo(Version16) >= 0 ) ;
-
+ if( JAVA_SE ) {
+ if( JAVA_VERSION_NUMBER.compareTo(new VersionNumber(21, 0, 0)) >= 0 ) {
+ JAVA_21 = true;
+ JAVA_17 = true;
+ JAVA_9 = true;
+ JAVA_6 = true;
+ } else if( JAVA_VERSION_NUMBER.compareTo(new VersionNumber(17, 0, 0)) >= 0 ) {
+ JAVA_21 = false;
+ JAVA_17 = true;
+ JAVA_9 = true;
+ JAVA_6 = true;
+ } else if( JAVA_VERSION_NUMBER.compareTo(new VersionNumber(9, 0, 0)) >= 0 ) {
+ JAVA_21 = false;
+ JAVA_17 = false;
+ JAVA_9 = true;
+ JAVA_6 = true;
+ } else if( isAndroid || JAVA_VERSION_NUMBER.compareTo(new VersionNumber(1, 6, 0)) >= 0 ) {
+ JAVA_21 = false;
+ JAVA_17 = false;
+ JAVA_9 = false;
+ JAVA_6 = true;
+ } else {
+ // we probably don't support anything below 1.6
+ JAVA_21 = false;
+ JAVA_17 = false;
+ JAVA_9 = false;
+ JAVA_6 = false;
+ }
+ } else {
+ // we probably don't support anything below 1.6 or non JavaSE
+ JAVA_21 = false;
+ JAVA_17 = false;
+ JAVA_9 = false;
+ JAVA_6 = false;
+ }
NEWLINE = System.getProperty("line.separator");
OS = System.getProperty("os.name");