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

Comments

Projects
None yet
4 participants
@stergiom

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

This comment has been minimized.

Show comment
Hide comment
@headius

headius May 28, 2017

Member

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

Member

headius commented May 28, 2017

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

@stergiom

This comment has been minimized.

Show comment
Hide comment
@stergiom

stergiom 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";

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

This comment has been minimized.

Show comment
Hide comment
@mkristian

mkristian Jun 2, 2017

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 ?

Member

mkristian commented Jun 2, 2017

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

help classpath: canonicalization on Windows to fully resolve #4145
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 #4630 (also #4645)

@kares kares self-assigned this Jun 5, 2017

@kares kares added core windows labels Jun 5, 2017

@kares kares added this to the JRuby 9.1.11.0 milestone Jun 5, 2017

@headius headius closed this in #4647 Jun 6, 2017

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