Hi,
I’ve been pulling my hair out, trying to package the most simple
HelloWorld example into a runnable jar.
Here’s what I get
---- SNIP -----
javac -target 1.6 -cp “lib/java/jruby-complete.jar:src:lib/ruby”
-sourcepath “src:lib/ruby” -d
“/Users/xx/Downloads/HelloMonkeybars/package/classes” “src/Hello.java”
javac -target 1.6 -cp “lib/java/jruby-complete.jar:src:lib/ruby”
-sourcepath “src:lib/ruby” -d
“/Users/xx/Downloads/HelloMonkeybars/package/classes”
“src/org/rubyforge/rawr/Main.java”
java -jar lib/java/jruby-complete.jar -e “require
‘/opt/local/share/java/jruby/lib/ruby/gems/1.8/gems/rawr-1.3.8/lib/jruby_batch_compiler’;
Rawr::JRubyBatchCompiler.compile_argv” src lib/ruby
/Users/xx/Downloads/HelloMonkeybars/package/classes
files for src: 8
files for lib/ruby: 0
Compiling src/application_controller.rb to class application_controller
Compiling src/application_view.rb to class application_view
Compiling src/main.rb to class main
Compiling src/manifest.rb to class manifest
Compiling src/resolver.rb to class resolver
Compiling src/greeter/greeter_controller.rb to class
greeter/greeter_controller
Compiling src/greeter/greeter_model.rb to class greeter/greeter_model
Compiling src/greeter/greeter_view.rb to class greeter/greeter_view
Copying non-source file Hello.form to
/Users/xx/Downloads/HelloMonkeybars/package/classes/Hello.form
=== Creating jar file:
/Users/xx/Downloads/HelloMonkeybars/package/jar/ChangeMe.jar
Feb 1, 2010 6:54:00 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Manifest-Version.
Ensure that the manifest does not have duplicate entries, and
that blank lines separate individual sections in both your
manifest and in the META-INF/MANIFEST.MF entry in the jar file.
Feb 1, 2010 6:54:00 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Main-Class.
Ensure that the manifest does not have duplicate entries, and
that blank lines separate individual sections in both your
manifest and in the META-INF/MANIFEST.MF entry in the jar file.
---- SNAP -----
Now here’s the funny part: The generated jar won’t launch, because it
can’t find monkeybars:
---- SNIP -----
01.02.10 18:56:03 [0x0-0xf60f6].com.apple.JarLauncher[2868]
src/manifest.rb:13:in `require’: no such file to load – monkeybars
(LoadError)
---- SNAP -----
… although it is installed and in PATH:
---- SNIP -----
echo $PATH
/opt/local/share/java/jruby/bin/:/opt/local/bin:/opt/local/sbin:/opt/local/bin/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
jruby -S gem list
*** LOCAL GEMS ***
monkeybars (1.0.5)
rake (0.8.7)
rawr (1.3.8)
rspec (1.3.0, 1.2.9)
rubyzip (0.9.4)
sources (0.0.1)
---- SNAP -----
Any help would be really appreciated. I’ve been running against walls
for the last several days, trying to get any cross-platform GUI
toolkit to run on OS X 10.6 and JRuby/Swing/Monkeybars is really my last
resort before I have to give up Ruby for this project.
Oh, yes, and I’m running
OS X 10.6.2
ruby 1.8.7 (2008-08-11 patchlevel 72) [universal-darwin10.0]
java version “1.6.0_17”
Java™ SE Runtime Environment (build 1.6.0_17-b04-248-10M3025)
Java HotSpot™ 64-Bit Server VM (build 14.3-b01-101, mixed mode)
Thank you!
Tony