Skip to content

Commit

Permalink
jogl2.5.0 works now with jdk17 and netbeans 21.
Browse files Browse the repository at this point in the history
* JOGL (jogamp) is no longer obtained from maven because the 2.5.0 maven
deploy is broken for getting the actual jars and native code.
Finally found a single fat jar with all of gluegen/jogl in it in
https://jogamp.org/deployment/v2.5.0/fat/

* Had to fix a few things in code to make things work with java 17
under windows; see javafx classes for Point2D that are in javafx.* source
packages (obtaining the complete unbound javafx is broken under maven
at least for me).

* It is necessary to set some cryptic flags to the VM on startup; see
NASAWorldWind/WorldWindJava#249
for " running the JVM with the following arguments should fix the problem

--add-exports java.base/java.lang=ALL-UNNAMED
--add-exports java.desktop/sun.awt=ALL-UNNAMED
--add-exports java.desktop/sun.java2d=ALL-UNNAMED
"

* Info: a jogl TextRenderer that is created outside of graphics context
breaks; change other code that does it to lazily create these inside the 
annotator if this comes up again.

* It will be necessary to fix the windows launcher and the linux/mac shell scripts
for the new jogl jar that was added and to add the correct VM switches.
  • Loading branch information
Tobi Delbruck authored and Tobi Delbruck committed Dec 20, 2023
1 parent f30f58a commit 440f024
Show file tree
Hide file tree
Showing 15 changed files with 1,011 additions and 1,055 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
/ivy
/jars unused/**
/dist/
hs_err*
7 changes: 4 additions & 3 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,12 @@

<target name="download-deps" depends="-load-ivy-tasks"
description="Download dependent libraries.">
<echo message="******** ivy.default.settings.dir=${ivy.default.settings.dir}"/>
<echo message="****** If you get dialog Artifactory Domain asking for user/pass hit Cancel button"/>
<ivy:resolve/>
<ivy:retrieve/>
<echo message="*************************************** ivy.default.settings.dir=${ivy.default.settings.dir}"/>
<echo message="If you get dialog Artifactory Domain asking for user/pass hit Cancal button"/>

<ivy:retrieve/>

<pathconvert property="ivy.classpath.computed" dirsep="/" pathsep=":">
<path>
<fileset dir="${ivy.lib}" includes="*.jar"/>
Expand Down
43 changes: 8 additions & 35 deletions ivy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,41 +30,11 @@ MA 02110-1301 USA
<!--see https://jogamp.org/wiki/index.php/Maven-->
<!--see http://search.maven.org to find libraries -->
<!--following does not work, since the latest jogl doesn't have com.jogamp.opengl-->
<!--https://repo1.maven.org/maven2/org/jogamp/gluegen/gluegen-rt/2.5.0/-->
<dependency org="org.jogamp.gluegen" name="gluegen-rt" rev="2.5.0" />
<dependency org="org.jogamp.gluegen" name="gluegen-rt-main" rev="2.5.0" />
<!-- <dependency org="org.jogamp.gluegen" name="gluegen-rt" rev="2.5.0" >
include main jar
<artifact name="gluegen-rt" type="jar" ext="jar"/>
<artifact name="gluegen-rt" type="jar" ext="jar" m:classifier="natives-linux-amd64"/>
<artifact name="gluegen-rt" type="jar" ext="jar" m:classifier="natives-linux-i586"/>
<artifact name="gluegen-rt" type="jar" ext="jar" m:classifier="natives-macosx-universal"/>
<artifact name="gluegen-rt" type="jar" ext="jar" m:classifier="natives-solaris-amd64"/>
<artifact name="gluegen-rt" type="jar" ext="jar" m:classifier="natives-solaris-i586"/>
<artifact name="gluegen-rt" type="jar" ext="jar" m:classifier="natives-windows-amd64"/>
<artifact name="gluegen-rt" type="jar" ext="jar" m:classifier="natives-windows-i586"/>
<artifact name="gluegen-rt" type="jar" ext="jar" m:classifier="natives-windows-amd64"/>
</dependency>-->
<!--https://repo1.maven.org/maven2/org/jogamp/jogl/jogl-all/2.5.0/-->
<!--<dependency org="org.jogamp.jogl" name="jogl-all" rev="2.5.0" />-->
<dependency org="org.jogamp.jogl" name="jogl-all-main" rev="2.5.0" />
<!--<dependency org="org.jogamp.jogl" name="nativewindow" rev="2.5.0" />-->
<!--<dependency org="org.jogamp.jogl" name="newt" rev="2.5.0" />-->
<!--<dependency org="org.jogamp.jogl" name="jogl-all-main" rev="2.5.0" />-->
<!-- <dependency org="org.jogamp.jogl" name="jogl-all" rev="2.5.0" >
include main jar
<artifact name="jogl-all" type="jar" ext="jar"/>
<artifact name="jogl-all" type="jar" ext="jar" m:classifier="natives-linux-amd64"/>
<artifact name="jogl-all" type="jar" ext="jar" m:classifier="natives-linux-i586"/>
<artifact name="jogl-all" type="jar" ext="jar" m:classifier="natives-macosx-universal"/>
<artifact name="jogl-all" type="jar" ext="jar" m:classifier="natives-solaris-amd64"/>
<artifact name="jogl-all" type="jar" ext="jar" m:classifier="natives-solaris-i586"/>
<artifact name="jogl-all" type="jar" ext="jar" m:classifier="natives-windows-amd64"/>
<artifact name="jogl-all" type="jar" ext="jar" m:classifier="natives-windows-i586"/>
<artifact name="jogl-all" type="jar" ext="jar" m:classifier="natives-windows-amd64"/>
</dependency>-->
<!--<dependency org="org.jogamp.gluegen" name="gluegen-rt" rev="2.5.0" />-->
<!-- <dependency org="org.jogamp.gluegen" name="gluegen-rt-main" rev="2.5.0" />
<dependency org="org.jogamp.jogl" name="jogl-all-main" rev="2.5.0" /> -->

<!-- <dependency org="javax.xml.bind" name="jaxb-api" rev="2.3.1" /> need for java 14.0-->
<dependency org="org.swinglabs" name="swing-layout" rev="1.0.3" />
<dependency org="org.jdesktop" name="beansbinding" rev="1.2.1" />

Expand All @@ -78,9 +48,12 @@ MA 02110-1301 USA
<dependency org="org.apache.directory.studio" name="org.apache.commons.io" rev="2.4" />
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-text -->
<dependency org="org.apache.commons" name="commons-text" rev="1.8"/>

<!--javafx was moved out from java 11-->
<dependency org="org.openjfx" name="javafx" rev="17.0.9"/>

<dependency org="com.google.code.gson" name="gson" rev="2.8.2" />

<dependency org="javax.mail" name="javax.mail-api" rev="1.6.0" />
<dependency org="javax.mail" name="javax.mail-api" rev="1.6.0" />

<!--jblas is a matrix library for Java which uses existing high performance BLAS and LAPACK libraries like ATLAS -->
Expand Down
Binary file added jars/jogamp-fat-java-src.zip
Binary file not shown.
Binary file added jars/jogamp-fat.jar
Binary file not shown.
Loading

0 comments on commit 440f024

Please sign in to comment.