Last active
September 25, 2020 15:50
-
-
Save headius/dea319c77caeb0f367ea267c76446be3 to your computer and use it in GitHub Desktop.
Simple JavaFX app in JRuby
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java --module-path /Users/headius/Downloads/javafx-sdk-15/lib --add-modules javafx.controls \ | |
-Djruby.home=`pwd` -cp lib/jruby.jar org.jruby.Main javafx2.rb | |
jruby -e 'Dir["/Users/headius/Downloads/javafx-sdk-15/lib/*.jar"].each {|f| require f}; load "javafx2.rb"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Java version: https://twitter.com/johanvos/status/1309423474121814017 | |
javafx.application.Platform.startup do | |
stage = javafx.stage.Stage.new | |
label = javafx.scene.control.Label.new("Hi!") | |
pane = javafx.scene.layout.Pane.new(label) | |
scene = javafx.scene.Scene.new(pane) | |
stage.scene = scene | |
stage.show | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment