My question is that can I require a war file within JRuby? When I do a
require ‘file.war’ I get an error about not being able to load?
testJava.rb:5:in `require’: no such file to load
However, when I do a require for axis.jar (present in the same
directory, it
works fine. My question is can war files be required the same way as jar
files especially since they have the same format?
works fine. My question is can war files be required the same way as jar
files especially since they have the same format?
Typically war files are web applications which have content files as
well as a WEB-INF directory, with embedded jar files in them. The
require jar mechanism simply adds the jar file to the classpath that
JRuby sees. So this doesn’t work for the same reason that you don’t
put war files on the classpath in a java application. If there are jar
files inside the war that you want to use, you probably should just
unpack those and require them directly.