You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Question: could this be combined via graalvm in theory? #6
Question: could this be combined via graalvm in theory?
i am asking because graalvm is pretty cool, and others have managed to get SWING applications to run.
My use case would be more like taking an existing python or ruby code base, commandline stuff,
and add a simple GUI around it. I don't really want to write in C though (Java is ok but Swing is
ugly, and JavaFX does not seem to be supported via Graalvm; also the graalvm team focuses
not so much on GUIs)
Yes, got it working: (Albeit quick and CLI-only, would be probably easier with Gradle/Maven)
git clone https://github.com/bailuk/java-gtk
cd java-gtk
make gen && make && make run
gradle assemble
java -agentlib:native-image-agent=config-output-dir=foo -cp ./examples/build/libs/examples.jar:./java-gtk/build/libs/java-gtk.jar:$HOME/.m2/repository/net/java/dev/jna/jna/5.12.1/jna-5.12.1.jar examples.App
# Play around a bit with every button of the image, otherwise you get (non-critical) errors at runtime of the native image
native-image -cp ./examples/build/libs/examples.jar:./java-gtk/build/libs/java-gtk.jar:$HOME/.m2/repository/net/java/dev/jna/jna/5.12.1/jna-5.12.1.jar examples.App -H:ConfigurationFileDirectories=foo
After around 90 seconds you get an executable called examples.app with around 22MB. It is not comfortable, especially the generation of the metadata for GraalVM, but it works
Repository owner locked and limited conversation to collaborators on Mar 21, 2023
Activity
JCWasmx86 commentedon Nov 29, 2022
Yes, got it working: (Albeit quick and CLI-only, would be probably easier with Gradle/Maven)
After around 90 seconds you get an executable called
examples.appwith around 22MB. It is not comfortable, especially the generation of the metadata for GraalVM, but it works