-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building a jar doesn't include .fxml files #8
Comments
Ok, if I unzip the jar, add in the fxml file by hand, re-zip it and rename it to .jar, it works just right so that does indeed appear to be the problem. |
I'm going to rewrite jarification soon but this is a user error (though I don't blame you. Jaring needs better documentation) You need to set src also, which is a pattern to match all files in your project. Main_script marks which file to load first in the jar and in the rare circumstance that it is NOT in the jar it copies it in also. You can also manually rename your main file to jar-bootstrap.rb and only use src |
ok cool. Got it to work. Thanks for the explanation. One question. If I use:
Pointing directly to the file it works, if instead, I have src point at the containing directory, like:
Then I get:
I'm assuming this is because you can't list directories and must list each file by hand? Or am I doing something else wrong? For the record, I also tried it without the quotes, but this received the same error. |
One last question, if you do need to list the file paths out by hand, how should you seperate those? with : 's like when constructing PATH variables? |
Src is a PATTERN
|
ah! you totally said that. sorry. I'll put in a pull-request with an update to the README making this stuff clear. |
Don't. I'm updating jarification so it will change |
Ok, fair enough. |
I got the "rake jar" task to run by cd'ing into my clone of the jrubyfx repo, and running it like:
jruby -S rake jar main_script=~/projects/jrubyfx_projects/Hello/src/hello2.rb
This properly built the jar for me, except it doesn't seem to include my fxml file. My hello2.rb file looks like:
And trying to run the jar gives this error:
And as far as I can tell, from opening up the jar, this is because the fxml file didn't seem to get included in it.
The text was updated successfully, but these errors were encountered: