1

I'm playing around trying to add lwjgl as a dependency to the graphics module.

I already modified the graphics module-info:

module javafx.graphics {
    requires java.desktop;
    requires java.xml;
    requires jdk.unsupported;
    requires org.lwjgl;
    requires org.lwjgl.opengl;

Added a custom repo and declared the required libs into dependencies, always within graphics

Then I fixed step-by-step all the dependencies for graphics here, here and here

However now I'm struggling to fix the next error:

> Task :media:compileJava FAILED
Task ':media:compileJava' is not up-to-date because:
Task has failed previously.
All input files are considered out-of-date for incremental task ':media:compileJava'.
Compiling with Java command line compiler 'C:\Program Files\Java\jdk-11.0.1\bin\javac.exe'.
Starting process 'command 'C:\Program Files\Java\jdk-11.0.1\bin\javac.exe''. Working directory: C:\Users\elect\openjdk-jfx\modules\javafx.media Command: C:\Program Files\Java\jdk- 11.0.1\bin\javac.exe @C:\Users\elect\openjdk-jfx\modules\javafx.media\build\tmp\compileJava\java-compiler-args.txt
Successfully started process 'command 'C:\Program Files\Java\jdk-11.0.1\bin\javac.exe''
C:\Users\elect\openjdk-jfx\modules\javafx.graphics\src\main\java\module-info.java:40: error: module not found: org.lwjgl requires org.lwjgl;
^
C:\Users\elect\openjdk-jfx\modules\javafx.graphics\src\main\java\module-info.java:41: error: module not found: org.lwjgl.opengl requires org.lwjgl.opengl;
^

I guess I shall add lwjgl into the module path of project media, but I run out of options..

I tried to modify the media module-info, the compileJava task, nothing.. I couldnt make it work

How may I solve it?

Naman
  • 27,789
  • 26
  • 218
  • 353
elect
  • 6,765
  • 10
  • 53
  • 119
  • What are your dependencies for `org.lwjgl.opengl` and `org.lwjgl`? Are you sure they are there on modulepath? Why is your module named `javafx.graphics`? If its at application startup, [can you check the modules resolved](https://stackoverflow.com/questions/48339598/list-the-modules-resolved-during-the-application-startup)? – Naman Nov 21 '18 at 13:23
  • I got the answer to why the name (you're working on a forked repo). Another thing, did you look at [Building OpenJFX prerequisites](https://wiki.openjdk.java.net/display/OpenJFX/Building+OpenJFX) – Naman Nov 21 '18 at 14:13
  • Did you try a clean? – EM-Creations Nov 21 '18 at 14:39
  • @nullpointer, I guess you mean [these](https://github.com/elect86/openjdk-jfx/blob/develop/build.gradle#L1920-L1935)? No, I'm not sure. If I look at the `graphics` `java-compiler-args.txt` it looks [fine](https://gist.github.com/elect86/7f4894d34b93c749428cf0ef351061b5). And [this](https://gist.github.com/elect86/98f8e337418c8347eb14f49dfd32a892) is the one of `media`. – elect Nov 21 '18 at 17:36
  • @EM-Creations, `gradle clean`? Just tried, nothing changed.. – elect Nov 21 '18 at 17:39
  • If you only changed `graphics`, why would `media` complain? – user1803551 Nov 22 '18 at 06:39
  • @user1803551, that's a good question.. my best guess is because `media` depends on `graphics`, which in turn depends on `lwjgl`.. – elect Nov 22 '18 at 08:46
  • Try `requires transitive` in `module-info.java`. – user1803551 Nov 22 '18 at 20:24
  • for `media` or `graphics`? – elect Nov 23 '18 at 07:17

0 Answers0