hi, can jogl 2.3.2 run with jdk9 or jdk10.0.2 ?

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

hi, can jogl 2.3.2 run with jdk9 or jdk10.0.2 ?

george2008
Reply | Threaded
Open this post in threaded view
|

Re: hi, can jogl 2.3.2 run with jdk9 or jdk10.0.2 ?

gouessej
Administrator
Hello

Yes it can run with Java 1.9 but you have to use this:
--add-exports=java.base/java.lang=ALL-UNNAMED --add-exports=java.desktop/sun.awt=ALL-UNNAMED --add-exports=java.desktop/sun.java2d=ALL-UNNAMED
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: hi, can jogl 2.3.2 run with jdk9 or jdk10.0.2 ?

george2008
How to add below options ?

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


my script run.sh like below:
---------run.sh----------
java -Xms2g -Xmx8g  -Dfile.encoding=UTF-8 com.xxx.uiapp.AppMain
--------------------------


these options must be also needed in jdk10.0.2 ?
Reply | Threaded
Open this post in threaded view
|

Re: hi, can jogl 2.3.2 run with jdk9 or jdk10.0.2 ?

george2008
My start application script 'run.sh' (more details) :

#!/bin/bash

PROJ_HOME=.
THIRDPARTY_HOME=$PROJ_HOME/3rdParty
export JRE_HOME=$THIRDPARTY_HOME/java/jdk/jre
export PATH=.:$JRE_HOME/bin:$PATH
export CLASSPATH=.:$JRE_HOME/lib/rt.jar:\
$JRE_HOME/lib:\
$JRE_HOME/lib/ext:\
$PROJ_HOME:\
$PROJ_HOME/classes:\
$THIRDPARTY_HOME/jogamp-all-platforms/jar/gluegen-rt.jar:\
$THIRDPARTY_HOME/jogamp-all-platforms/jar/gluegen-rt-natives-linux-amd64.jar:\
$THIRDPARTY_HOME/jogamp-all-platforms/jar/jogl-all.jar:\
$THIRDPARTY_HOME/jogamp-all-platforms/jar/jogl-all-natives-linux-amd64.jar:\
...

echo java -version ......
java -version
echo CLASSPATH is .....
echo $CLASSPATH

java -Xms2g -Xmx8g  -Dfile.encoding=UTF-8 com.xxx.uiapp.AppMain
Reply | Threaded
Open this post in threaded view
|

Re: hi, can jogl 2.3.2 run with jdk9 or jdk10.0.2 ?

gouessej
Administrator
You can use those "options" in the "java" command.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: hi, can jogl 2.3.2 run with jdk9 or jdk10.0.2 ?

george2008

You means like below ?

java --add-exports=java.base/java.lang=ALL-UNNAMED --add-exports=java.desktop/sun.awt=ALL-UNNAMED --add-exports=java.desktop/sun.java2d=ALL-UNNAMED  -Xms2g -Xmx8g  -Dfile.encoding=UTF-8 com.xxx.uiapp.AppMain



If don't use this 'options',  any bad effects on jdk10 ?
Reply | Threaded
Open this post in threaded view
|

Re: hi, can jogl 2.3.2 run with jdk9 or jdk10.0.2 ?

gouessej
Administrator
Yes.

I advise you to use these options with Java >= 1.9 until we add those exports into JOGL itself. Some things might not work without them.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: hi, can jogl 2.3.2 run with jdk9 or jdk10.0.2 ?

george2008
Question1:   which one is right?  A or B ?

A.

java --add-exports=java.base/java.lang=ALL-UNNAMED --add-exports=java.desktop/sun.awt=ALL-UNNAMED --add-exports=java.desktop/sun.java2d=ALL-UNNAMED  -Xms2g -Xmx8g  -Dfile.encoding=UTF-8 com.xxx.uiapp.AppMain


B.

java --add-exports java.base/java.lang=ALL-UNNAMED --add-exports java.desktop/sun.awt=ALL-UNNAMED --add-exports java.desktop/sun.java2d=ALL-UNNAMED  -Xms2g -Xmx8g  -Dfile.encoding=UTF-8 com.xxx.uiapp.AppMain


Question2:  

Need these options when compiling *.java files to *.class files using javac command?
Reply | Threaded
Open this post in threaded view
|

Re: hi, can jogl 2.3.2 run with jdk9 or jdk10.0.2 ?

gouessej
Administrator
The solution A worked in the past, the solution B should work now. I'm sorry, the syntax of exports addition has changed at least three times since I started using it (the first one was -XaddExports:). You must use those VM arguments with the "java" command and you might need to use them with javac too.
Julien Gouesse | Personal blog | Website