Bug 1404

Summary: Support Java 11+ Features (Module Encapsulation, jlink, ..)
Product: [JogAmp] General Reporter: Sven Gothel <sgothel>
Component: genericAssignee: Sven Gothel <sgothel>
Status: CONFIRMED ---    
Severity: enhancement CC: gouessej, stacktracer, wwalker3
Priority: P4    
Version: tbd   
Hardware: All   
OS: all   
Type: FEATURE SCM Refs:
Workaround: ---
Bug Depends on: 1374, 1425, 1363    
Bug Blocks:    

Description Sven Gothel 2019-11-30 18:39:08 CET
This bug entry acts as a parent node for all bugs related 
to support certain Java 11+ features on top of Bug 1636

I leave references for this issue:

Related Reading / Overview
- https://blog.joda.org/2018/09/from-java-8-to-java-11.html
- https://blog.joda.org/search/label/modules

Related JEPs
- http://openjdk.java.net/jeps/220 Modular JRE
- http://openjdk.java.net/jeps/260 Encapsulation
- http://openjdk.java.net/jeps/238 Multi-Release JAR Files
- http://openjdk.java.net/jeps/282 jlink (the Java linker)
- http://openjdk.java.net/jeps/261 Module System

++++

Please note that:
- Both, Java-8 and Java-11 have LTS (long time support)

- We will not test against Java-9 nor Java-10: Already outdated

- Oracle's Java build's are no more licensed for commercial use beyond Java-8

- We will only test & use OpenJDK builds starting with Java-11
Comment 1 Sven Gothel 2019-11-30 18:41:41 CET
.. on top of Bug 1363
Comment 2 Mike Hogye 2020-02-14 20:28:43 CET
Will the eventual 2.4.0 release jars include "Automatic-Module-Name" entries in their manifests? (This is described by one of your Related Reading links: https://blog.joda.org/search/label/modules.)

The 2.4.0-rc-20200202 jars (not the fat jar, but the gluegen-rt and jogl-all jars) currently don't work when they are put on the modulepath, where they are treated as automatic modules. Java makes up module names based on the jar filenames ... and Java's heuristic gives the same module name for both "jogl-all-2.4.0-rc-20200202.jar" and "jogl-all-2.4.0-rc-20200202-natives-linux-amd64.jar". (The heuristic scans until it finds the first hyphen-then-digit, and assumes the rest of the filename is a version -- the automatic module name for both jars is "jogl.all".)

This could be addressed by putting "Automatic-Module-Name" entries in the jar manifests.
Comment 3 Sven Gothel 2020-02-17 14:00:35 CET
(In reply to Mike Hogye from comment #2)
Re "Automatic-Module-Name", thank you Mike!

Can you create a new bug entry and make it a child of this parent entry.

We certainly can change things for the manifest,
if they are backward compatible to Java8 .. (should be).

While I don't see jar files such as "jogl-all-2.4.0-rc-20200202-natives-linux-amd64.jar", i.e. added version tag '2.4.0-rc-date' but this hints to the native lib loading via this auto-module feature?
Hence it is not so much relevant to the 'fat jar'?

Please open the new bug entry, elaborate and link to these two comments.
If it is helping .. why not?
You may also propose a tested git patch ...
Thank you.
Comment 4 Mike Hogye 2020-02-17 18:36:28 CET
(In reply to Sven Gothel from comment #3)

Added Bug 1425, which clarifies what I meant about the jar filenames.