Verify yourself to prove that you are not a ROBOT! After verification the page will apear. Thanks for understanding.
I am currently developing my Jruby application which is contained inside a .jar file.
Within the jar, my file structure looks like this:
Where 'class1.class' and 'class2.class' are compiled using jrubyc class1.rb and jrubyc class2.rb
I want to access these methods within 'class1.class' and 'class2.class' inside 'launch.rb'.
$CLASSPATH << "com"
But, I am currently running into this issue :
NameError: cannot load Java class 'class1'
Is there another way to import and access these methods within class1 and class?
com sounds like the package name, what you want is add lib to CP :
$CLASSPATH << File.expand_path('lib')
# now import the class with the full name (including package) :
# ... or simply just :
but assuming its a (compiled) .rb script, maybe you just want to load it:
$LOAD_PATH << 'lib'