Skip to content
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

various issues launching script from runnable jar #2948

mkristian opened this issue May 15, 2015 · 0 comments

various issues launching script from runnable jar #2948

mkristian opened this issue May 15, 2015 · 0 comments


Copy link

the following works:

$ java -jar runnable.jar classpath:bla.rb

these do not work:

$ java -jar runnable.jar classpath:/bla.rb
SyntaxError: Problem reading source: Stream closed

or with the uri:classloader:// pseudo protocol

$ java -jar runnable.jar uri:classloader://bla.rb `createNoUnicodeConversion': java.lang.IllegalArgumentException: Neither current working directory (uri:classloader://) nor pathname (uri:classloader://bla.rb) led to an absolute path
    from `create'
    from `getScriptSource'
    from `internalRun'
    from `run'
    from `run'
    from `main'
    from `main'

or just

$ java -jar runnable.jar bla.rb
Error opening script file: uri:classloader:/bla.rb (No such file or directory)

even though the uri:classloader:/bla.rb is valid resource.

the runnable.jar is the same as from:
just add a 'bla.rb' file to the runnable.jar from there.

@mkristian mkristian self-assigned this May 15, 2015
@mkristian mkristian added this to the JRuby milestone Jun 2, 2015
mkristian added a commit that referenced this issue Jun 5, 2015
delegate script source argument to the new load service FileResource
factory and allow all uri like paths which the regular JRuby code
uses as well.

fixes #2948

Sponsored by Lookout Inc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

2 participants