Posted by
kaisevoj on
Jul 02, 2018; 1:47pm
URL: https://forum.jogamp.org/JOGL-Java-10-modularization-tp4038983.html
Hello,
I have been trying to get out project base working on Java 10 with jigsaw modules, but JOGL keeps failing on me, and I cannot find any help online.
Note whole project compiles and works fine with no
module-info.java file, and I managed to get working module link between two different projects (not EVERYTHING is broken).
JOGL project (A) has following module-info.java and maven dependencies. Then there is another project (B) using JOGL project, but having no access to any JOGL types (they are not exported anyway). Project B runs stuff from project A. Project B is not modular (yet).
Module info file:
module com.foo.bar {
...
requires jogl.all.main;
requires gluegen.rt.main;
}
Maven dependencies:
<dependency>
<groupId>org.jogamp.gluegen</groupId>
<artifactId>gluegen-rt-main</artifactId>
<version>2.3.2</version>
</dependency>
<dependency>
<groupId>org.jogamp.jogl</groupId>
<artifactId>jogl-all-main</artifactId>
<version>2.3.2</version>
</dependency>
Eclipse reports on any jogl import:
import com.jogamp.opengl.GL4;
-> The import com.jogamp.opengl cannot be resolved
What is strange, maven happily builds the project A/B with no errors, and when I run the project B from command line as jar, everything works with no additional runtime errors.
This leads me to believe maven build is fine with the transition (does it even know about modules?), and only one confused here is eclipse.
Eclipse Libraries in Java Build Path:

Using:
Eclipse Photon 4.8.0 (20180619-1200),
Maven 3.5.3 (3.7.0 compiler plugin),
Java JDK-10.0.1
Regards,
Vojtěch