Created
May 4, 2012 17:24
-
-
Save nicksieger/2596356 to your computer and use it in GitHub Desktop.
JRuby launcher does not handle -cp properly
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- command1.txt 2012-05-04 12:21:09.000000000 -0500 | |
+++ command2.txt 2012-05-04 12:21:25.000000000 -0500 | |
@@ -11,9 +11,9 @@ | |
-Djruby.memory.max=500m | |
-Djruby.stack.max=2048k | |
-Dsun.java.command=org.jruby.Main | |
--Djava.class.path=/usr/share/java/ant-1.8.2/lib/*: | |
+-cp /usr/share/java/ant-1.8.2/lib/*: | |
-Xbootclasspath/a:/Users/nicksieger/.rvm/rubies/jruby-1.6.7/lib/jruby.jar | |
org/jruby/Main | |
-rjava | |
-e | |
"puts org.apache.tools.ant.Project" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/bin/java | |
-d32 | |
-Dfile.encoding=UTF-8 | |
-Djdk.home= | |
-Djruby.home=/Users/nicksieger/.rvm/rubies/jruby-1.6.7 | |
-Djruby.script=jruby | |
-Djruby.shell=/bin/sh | |
-Djffi.boot.library.path=/Users/nicksieger/.rvm/rubies/jruby-1.6.7/lib/native/Darwin | |
-Xmx500m | |
-Xss2048k | |
-Djruby.memory.max=500m | |
-Djruby.stack.max=2048k | |
-Dsun.java.command=org.jruby.Main | |
-Djava.class.path=/usr/share/java/ant-1.8.2/lib/*: | |
-Xbootclasspath/a:/Users/nicksieger/.rvm/rubies/jruby-1.6.7/lib/jruby.jar | |
org/jruby/Main | |
-rjava | |
-e | |
puts org.apache.tools.ant.Project |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/bin/java | |
-d32 | |
-Dfile.encoding=UTF-8 | |
-Djdk.home= | |
-Djruby.home=/Users/nicksieger/.rvm/rubies/jruby-1.6.7 | |
-Djruby.script=jruby | |
-Djruby.shell=/bin/sh | |
-Djffi.boot.library.path=/Users/nicksieger/.rvm/rubies/jruby-1.6.7/lib/native/Darwin | |
-Xmx500m | |
-Xss2048k | |
-Djruby.memory.max=500m | |
-Djruby.stack.max=2048k | |
-Dsun.java.command=org.jruby.Main | |
-cp /usr/share/java/ant-1.8.2/lib/*: | |
-Xbootclasspath/a:/Users/nicksieger/.rvm/rubies/jruby-1.6.7/lib/jruby.jar | |
org/jruby/Main | |
-rjava | |
-e | |
"puts org.apache.tools.ant.Project" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ jruby -J-cp '/usr/share/java/ant-1.8.2/lib/*' -rjava -e 'puts org.apache.tools.ant.Project' | |
NameError: cannot load Java class org.apache.tools.ant.Project | |
get_proxy_or_package_under_package at org/jruby/javasupport/JavaUtilities.java:54 | |
method_missing at /Users/nicksieger/.rvm/rubies/jruby-1.6.7/lib/ruby/site_ruby/shared/builtin/javasupport/java.rb:51 | |
(root) at -e:1 | |
[exited with 1] | |
[12:20:40][~/Projects/ruby/jruby (master) {jruby-1.6.7}] | |
$ jruby -Xcommand -J-cp '/usr/share/java/ant-1.8.2/lib/*' -rjava -e 'puts org.apache.tools.ant.Project' | sed -e 's/^puts \(.*\)$/"puts \1"/' > command1.txt | |
[12:21:09][~/Projects/ruby/jruby (master) {jruby-1.6.7}] | |
$ jruby -Xcommand -J-cp '/usr/share/java/ant-1.8.2/lib/*' -rjava -e 'puts org.apache.tools.ant.Project' | sed -e 's/-Djava.class.path=/-cp /' -e 's/^puts \(.*\)$/"puts \1"/' > command2.txt | |
[12:21:25][~/Projects/ruby/jruby (master) {jruby-1.6.7}] | |
$ eval $(jruby -Xcommand -J-cp '/usr/share/java/ant-1.8.2/lib/*' -rjava -e 'puts org.apache.tools.ant.Project' | sed -e 's/-Djava.class.path=/-cp /' -e 's/^puts \(.*\)$/"puts \1"/') | |
Java::OrgApacheToolsAnt::Project |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment