-
Notifications
You must be signed in to change notification settings - Fork 30
Description
Hello,
With the official Java 8 release, I try today to setup jRubyFX, and to run the samples.
#1) My configuration:
a) OS: CentOS 6.5 64 bit (2.6.32-431.5.1.el6.x86_64)
b) last java8 available (64 bit):
$ java -version
java version "1.8.0_20-ea"
Java(TM) SE Runtime Environment (build 1.8.0_20-ea-b05)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b05, mixed mode)
c) jruby (last available):
$ jruby -v
jruby 1.7.11 (1.9.3p392) 2014-02-24 86339bb on Java HotSpot(TM) 64-Bit Server VM 1.8.0_20-ea-b05 +indy [linux-amd64]
#2) installation:
gem install jrubyfx
Fetching: jrubyfx-fxmlloader-0.3-java.gem (100%)
Successfully installed jrubyfx-fxmlloader-0.3-java
Fetching: jrubyfx-1.1.0-java.gem (100%)
Successfully installed jrubyfx-1.1.0-java
2 gems installed
==> sounds good for the moment...
I dowload the zip (jrubyfx-master.zip), and try to to run the samples:
jruby -I lib samples/test_all_the_samples.rb
'''================================================================================
/work/development/jRubyFxDEV/jrubyfx-master/samples/fxml/Demo.rb
'''================================================================================
Please run `rake reflect` to generate the imports
...
'''================================================================================
Please run `rake reflect` to generate the imports
'''================================================================================
Errno::ENOENT: No such file or directory - No such directory: contrib/collections_demo.rb
initialize at org/jruby/RubyDir.java:149
foreach at org/jruby/RubyDir.java:432
(root) at samples/test_all_the_samples.rb:37
foreach at org/jruby/RubyDir.java:432
(root) at samples/test_all_the_samples.rb:36
chdir at org/jruby/RubyDir.java:370
(root) at samples/test_all_the_samples.rb:30
==> So I launch the following command:
rake reflect
touch lib/jrubyfx/core_ext/precompiled.rb
touch lib/jrubyfx/dsl_map.rb
touch lib/jrubyfx/imports.rb
JavaFX runtime not found. Please install Java 7u6 or newer or set environment variable JFX_DIR to the folder that contains jfxrt.jar
If you have Java 7u6 or later, this is a bug. Please report to the issue tracker on github. Include your OS version, 32/64bit, and architecture (x86, ARM, PPC, etc)
==> The message is clear, I have Java8, so I don't have to setup the JFX_DIR
#3) Additional steps:
Forcing the JFX_DIR ('jfxrt.jar' is prsent)
export JFX_DIR=${JAVA_HOME}/jre/lib/ext
==> re-launch the "rake reflect", and new messages.
rake reflect
touch lib/jrubyfx/core_ext/precompiled.rb
touch lib/jrubyfx/dsl_map.rb
touch lib/jrubyfx/imports.rb
rake aborted!
cannot initialize Java class javafx.stage.Screen
org/jruby/javasupport/JavaClass.java:1250:in `for_name'
org/jruby/javasupport/JavaUtilities.java:34:in `get_proxy_class'
file:/work/development/bin_tools/jruby-1.7.11/lib/jruby.jar!/jruby/java/core_ext/object.rb:26:in `java_import'
org/jruby/RubyArray.java:2409:in `map'
file:/work/development/bin_tools/jruby-1.7.11/lib/jruby.jar!/jruby/java/core_ext/object.rb:22:in `java_import'
/work/development/jRubyFxDEV/jrubyfx-master/Rakefile:119:in `(root)'
org/jruby/RubyArray.java:2409:in `map'
/work/development/jRubyFxDEV/jrubyfx-master/Rakefile:115:in `(root)'
org/jruby/RubyIO.java:1182:in `open'
/work/development/jRubyFxDEV/jrubyfx-master/Rakefile:79:in `(root)'
org/jruby/RubyProc.java:271:in `call'
org/jruby/RubyArray.java:1613:in `each'
org/jruby/RubyArray.java:1613:in `each'
org/jruby/RubyKernel.java:1101:in `load'
Tasks: TOP => reflect
(See full trace by running task with --trace)
#4) Another try: With Java 7u40
$ java -version
java version "1.7.0_40"
Java(TM) SE Runtime Environment (build 1.7.0_40-b43)
Java HotSpot(TM) 64-Bit Server VM (build 24.0-b56, mixed mode)
When I change the JDK to java7, I have to perform a "rake reflect" to regenerate some files, but I can launch the samples.
(jruby -I lib samples/test_all_the_samples.rb
)
After that, when I tried to launch again the samples with a java8, some demos work, but not all...
Hope this help!
Regards,
AD