Skip to content

load path with jars not working anymore with 1.7.16 #2017

@mkristian

Description

@mkristian

LOAD_PATH entries with jar:file:./my.jar! do work but entries with jar:file:./my.jar!/ do not work any more with jruby-1.7.16 or jruby-1.7.15 (or jruby-1.7.14).

create a jar with two ruby scripts:
echo "puts 'hello'" > hello1.rb; cp hello1.rb hello2.rb; jar -cf my.jar hello*.rb; rm hello*.rb

execute it with jruby 1.7.13

$ java -jar /usr/local/repository/org/jruby/jruby-complete/1.7.13/jruby-complete-1.7.13.jar test.rb
1.7.13
file:/usr/local/repository/org/jruby/jruby-complete/1.7.13/jruby-complete-1.7.13.jar!/META-INF/jruby.home/lib/ruby/1.9/site_ruby
file:/usr/local/repository/org/jruby/jruby-complete/1.7.13/jruby-complete-1.7.13.jar!/META-INF/jruby.home/lib/ruby/shared
file:/usr/local/repository/org/jruby/jruby-complete/1.7.13/jruby-complete-1.7.13.jar!/META-INF/jruby.home/lib/ruby/1.9
jar:file:./my.jar!
hello
file:/usr/local/repository/org/jruby/jruby-complete/1.7.13/jruby-complete-1.7.13.jar!/META-INF/jruby.home/lib/ruby/1.9/site_ruby
file:/usr/local/repository/org/jruby/jruby-complete/1.7.13/jruby-complete-1.7.13.jar!/META-INF/jruby.home/lib/ruby/shared
file:/usr/local/repository/org/jruby/jruby-complete/1.7.13/jruby-complete-1.7.13.jar!/META-INF/jruby.home/lib/ruby/1.9
jar:file:./my.jar!/
hello

and with jruby-1.7.16

 $ java -jar /usr/local/repository/org/jruby/jruby-complete/1.7.16/jruby-complete-1.7.16.jar test.rb
1.7.16
file:/usr/local/repository/org/jruby/jruby-complete/1.7.16/jruby-complete-1.7.16.jar!/META-INF/jruby.home/lib/ruby/1.9/site_ruby
file:/usr/local/repository/org/jruby/jruby-complete/1.7.16/jruby-complete-1.7.16.jar!/META-INF/jruby.home/lib/ruby/shared
file:/usr/local/repository/org/jruby/jruby-complete/1.7.16/jruby-complete-1.7.16.jar!/META-INF/jruby.home/lib/ruby/1.9
jar:file:./my.jar!
hello
file:/usr/local/repository/org/jruby/jruby-complete/1.7.16/jruby-complete-1.7.16.jar!/META-INF/jruby.home/lib/ruby/1.9/site_ruby
file:/usr/local/repository/org/jruby/jruby-complete/1.7.16/jruby-complete-1.7.16.jar!/META-INF/jruby.home/lib/ruby/shared
file:/usr/local/repository/org/jruby/jruby-complete/1.7.16/jruby-complete-1.7.16.jar!/META-INF/jruby.home/lib/ruby/1.9
jar:file:./my.jar!/
LoadError: no such file to load -- hello2
  require at org/jruby/RubyKernel.java:1065
  require at /usr/local/repository/org/jruby/jruby-complete/1.7.16/jruby-complete-1.7.16.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55
   (root) at test.rb:10

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions