Skip to content

fxml load error in jar #110

@dangnlg2

Description

@dangnlg2

OS : OS X El Capitan
java version "1.8.0_102"
Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)
Latest version of jrubyfx 1.1.1
(I also tried running it off master as well)

I am trying to launch a jrubyfx GUI in a jar from a Java application, but I am currently running into the following issue as it is having trouble finding my fxml file :

Exception running Application: <NoMethodError: undefined method 'open_stream' for nil:NilClass>

with my fxml_root is specified as :

fxml_root File.dirname(__FILE__)

which is in the same folder as the source code. I have tried to hard code the correct path into fxml_root, I then run into the following issue :

Exception running Application: #<NoMethodError: undefined method '[]' for nil:NilClass> /Applications/MagicDraw/plugins/csrr/csrr_gemjar.jar!/gems/jrubyfx-fxmlloader-0.4.1-java/lib/jrubyfx-fxmlloader.rb:144:in 'rputs' /Applications/MagicDraw/plugins/csrr/csrr_gemjar.jar!/gems/jrubyfx-fxmlloader-0.4.1-java/lib/fxmlloader/real_elts.rb:130:in 'constructValue' /Applications/MagicDraw/plugins/csrr/csrr_gemjar.jar!/gems/jrubyfx-fxmlloader-0.4.1-java/lib/fxmlloader/value_elts.rb:62:in 'processStartElement' /Applications/MagicDraw/plugins/csrr/csrr_gemjar.jar!/gems/jrubyfx-fxmlloader-0.4.1-java/lib/jrubyfx-fxmlloader.rb:440:in 'processStartElement' /Applications/MagicDraw/plugins/csrr/csrr_gemjar.jar!/gems/jrubyfx-fxmlloader-0.4.1-java/lib/jrubyfx-fxmlloader.rb:351:in 'load' /Applications/MagicDraw/plugins/csrr/csrr_gemjar.jar!/gems/jrubyfx-1.1.1-java/lib/jrubyfx/controller.rb:126:in 'load_into' /Applications/MagicDraw/plugins/csrr/csrr_gemjar.jar!/gems/jrubyfx-1.1.1-java/lib/jrubyfx/core_ext/stage.rb:82:in 'fxml' /Applications/MagicDraw/plugins/csrr/csrr_gemjar.jar!/gems/CSRR-0.1.0/lib/CSRR/swap.rb:87:in 'start' org/jruby/RubyBasicObject.java:1594:in 'instance_eval' /Applications/MagicDraw/plugins/csrr/csrr_gemjar.jar!/gems/jrubyfx-1.1.1-java/lib/jrubyfx/module.rb:49:in 'with' /Applications/MagicDraw/plugins/csrr/csrr_gemjar.jar!/gems/CSRR-0.1.0/lib/CSRR/swap.rb:86:in 'start' /Applications/Magic

any help is greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions