Upgrade to Jogl 1507 to fix a MacOSX bug (nswindow drag regions) requires Java 1.11

fc-8.10.2021 Not fixed yet, we want to stay a bit longer in Java 1.8

Thomas Arsouze reported a bug with Xplo on MacOSX 11.3.1 Big Sur

arsouze@S921 AMAPstudio % java -version
java version "1.8.0_301"
Java(TM) SE Runtime Environment (build 1.8.0_301-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.301-b09, mixed mode) 

(...)

Xplo 1.1-5199 with pilot jeeb.xplo.gui.Pilot: correct boot at 7 Oct 2021 10:36:26 CEST
Gui Pilot booting...
2021-10-07 10:36:29.508 java[8248:1160872] Apple AWT Internal Exception: NSWindow drag regions should only be invalidated on the Main Thread!
2021-10-07 10:36:29.509 java[8248:1160872] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSWindow drag regions should only be invalidated on the Main Thread!' 

Found the bug has been fixed in Jogamp on 5 apr 2019, planned for Jogl 2.4.0, not released yet (current is 2.3.2), AMAPstudio is in Jogl 2.2, see this page

1. Unistalled Jogl 2.2 from AMAPstudio:

2. Installed Jogl 2.4 (snapshot gluegen_938-joal_661-jogl_1507-jocl_1148) in ext:

→ jogamp-all-platforms.7z 2021-01-12 00:35 74M

3. Adapted to the move of javax.media packages to com.jogamp

Concerns javax.media.nativewindow and javax.media.opengl. Jogamp team moved them to com.jojamp.nativewindow and com.jogamp.nativewindow

See this discussion thread: https://jogamp.org/bugzilla/show_bug.cgi?id=682

In Eclipse, updated the jar list in amapstudio project build path, then selected amapstudio/ and Ctrl-Shift-O to reorganize all imports to point on the com.jogamp pakages

4. Last jogl snapshot is gluegen_938-joal_661-jogl_1507-jocl_1148, tryied it but failed at execution / compilation time: was compiled with java 11

5. Tried to find an older Jogl snapshot with the bug fixed and still in Java 8…

Same compilation error, also in Java 11.

→ correction in not possible in Java 1.8

→ Oriented Thomas Arsouze on workaround found with Francois Pimont :

Problems were reported when using Capsis or AMAPstudio under Mac OS X.

'Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSWindow drag regions should only be invalidated on the Main Thread!'', Camilo Valdes, 21.10.2020, Francois Pimont, 1.9.2020, this could be fixed by switching from Java 1.8.0_261 to Java 1.8.0_202.