Skip to content

Use modules to support OpenJFX 11+, Java 11+#63

Closed
ausbin wants to merge 1 commit into
ra4king:masterfrom
ausbin:feature/java-11-module
Closed

Use modules to support OpenJFX 11+, Java 11+#63
ausbin wants to merge 1 commit into
ra4king:masterfrom
ausbin:feature/java-11-module

Conversation

@ausbin
Copy link
Copy Markdown
Contributor

@ausbin ausbin commented Jan 12, 2020

Hi Roi,

I was having some trouble running CircuitSim on Java 11, so I started messing with this

Maybe you already knew about this, but apparently Java 9 introduced "modules", and OpenJFX after Java 9 is distributed as these "modules". I still don't understand the benefit of them but I'm probably just not Java-woke enough

If you run ./gradlew jlink, the "badass" jlink plugin will generate build/image/bin/CircuitSim, a shell script which will launch CircuitSim. ./gradlew jlinkZip will generate build/CircuitSim.zip, a zip you can decompress somewhere to "install" CircuitSim. Spicy

Seems like Java 8 will be supported for about another year, but in case it's ever time to upgrade, I hope this helps

I think this is more of a starting point, though, since ./gradlew run doesn't work properly for example. According to ./gradlew run --debug, it actually runs:

/usr/lib/jvm/java-11-openjdk-amd64/bin/java --add-modules javafx.controls --module-path [long ass path] --patch-module circuitsim=/home/austin/Documents/school/gatech/ta/CircuitSim/build/resources/main --module circuitsim/com.ra4king.circuitsim.gui.CircuitSim -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant circuitsim/com.ra4king.circuitsim.gui.CircuitSim

Those -Dx=y arguments and the classname at the end seem to be misplaced and are passed to CircuitSim as arguments (it tries to open each one as a circuit file and fails). I don't know if this is a bug in Gradle or the the plugin, or some kind of misconfiguration on my part.

@ausbin ausbin force-pushed the feature/java-11-module branch from b44d0d0 to 7135ab0 Compare January 14, 2020 06:05
ausbin added a commit to ausbin/circuitsim-grader-template that referenced this pull request Jan 14, 2020
ausbin added a commit to ausbin/circuitsim-grader-template that referenced this pull request Jan 19, 2020
ausbin added a commit to ausbin/circuitsim-grader-template that referenced this pull request Jan 19, 2020
@ausbin
Copy link
Copy Markdown
Contributor Author

ausbin commented Aug 23, 2020

Looks like 4e0a9d0 took care of this yee haw

@ausbin ausbin closed this Aug 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant