How to add an external dependency to openjfx

Giuseppe Barbieri elect86 at gmail.com
Wed Nov 21 08:56:22 UTC 2018


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

I already modified the graphics module-info
<https://github.com/elect86/openjdk-jfx/blob/develop/modules/javafx.graphics/src/main/java/module-info.java#L40-L41>
:

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
<https://github.com/elect86/openjdk-jfx/blob/develop/build.gradle#L1910-L1936>

Then I fixed step-by-step all the dependencies for graphics here
<https://github.com/elect86/openjdk-jfx/blob/develop/build.gradle#L2006-L2012>,
here
<https://github.com/elect86/openjdk-jfx/blob/develop/build.gradle#L2029>
and here
<https://github.com/elect86/openjdk-jfx/blob/develop/build.gradle#L2194>

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?

Thanks in advance,

Giuseppe


More information about the openjfx-discuss mailing list