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

Jarified app breaks with uri:classloader:BY\ on Windows with 9.1.10.0 #4630

Closed
stergiom opened this issue May 27, 2017 · 3 comments · Fixed by #4647
Closed

Jarified app breaks with uri:classloader:BY\ on Windows with 9.1.10.0 #4630

stergiom opened this issue May 27, 2017 · 3 comments · Fixed by #4647
Assignees

Comments

@stergiom
Copy link

Expected Behavior

A working Jar

Actual Behavior

The app breaks (seemingly only on Windows) at the first line require "jrubyfx" with what seems to be an error related to the :BY\ in its path..

>java -jar main.jar
Errno::ENOENT: No such file or directory - uri:classloader:BY\jrubyfx.rb
          realpath at org/jruby/RubyFile.java:864
  require_relative at uri:classloader:/jruby/kernel/kernel.rb:11
            <main> at uri:classloader:/jrubyfx.rb:34
           require at org/jruby/RubyKernel.java:961
            (root) at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1
            <main> at classpath:/jar-bootstrap.rb:1
@headius
Copy link
Member

headius commented May 28, 2017

Can you provide an example build for us to reproduce this?

@stergiom
Copy link
Author

stergiom commented Jun 1, 2017

-> Example build

uri:classloader:BY\ has come up with #4612, this seems specific to expandPathInternal, it might be related to the last two letters of this statement..

String fakePrefix = "/THIS_IS_A_FAKE_PATH_FOR_JRUBY";

@mkristian
Copy link
Member

looks like on windows "/THIS_IS_A_FAKE_PATH_FOR_JRUBY" is not treated as absolute path and handled differently somewhere else. a c:\THIS_IS_A_FAKE_PATH_FOR_JRUBY might work for windows platforms. @stergiom fancy to patch and try it out ?

kares added a commit to kares/jruby that referenced this issue Jun 5, 2017
has been attempted at cbf9a7d
... using a fake root path, however on Windows /SMT expands as C:\SMT

added '__' at the end so its more obvious if this is slightly off again

closes jruby#4630 (also jruby#4645)
@kares kares self-assigned this Jun 5, 2017
@kares kares added this to the JRuby 9.1.11.0 milestone Jun 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants