Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.5.2
-
Fix Version/s: JRuby 1.6RC1
-
Component/s: Compiler
-
Labels:None
-
Environment:Windows XP SP3, 1.5.0_17, JRuby 1.5.2
-
Patch Submitted:Yes
-
Number of attachments :
Description
Yesterday I built the mirah(http://www.mirah.org/) .
I thought it was an easy task.
However, I was encountered the following error message.
D:\opt\mirah\mirah>jruby -S rake jar (in D:/opt/mirah/mirah) mkdir -p dist mkdir -p build Compiling Ruby sources Generating Java class MirahCommand to build/org/mirah/MirahCommand.java javac -J-Duser.language=en -d build -cp D:\opt\jruby\jruby-1.5.2/lib/jruby.jar:. build/org/mirah/MirahCommand.java build/org/mirah/MirahCommand.java:3: package org.jruby does not exist import org.jruby.Ruby; (snip) 29 errors Compiling Mirah sources org/mirah/ant/compile.duby:4: Class 'org.mirah.MirahCommand' not found. import org.mirah.MirahCommand ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I looked for the cause of this error, and found it.
--- lib\ruby\site_ruby\shared\jruby\compiler\java_class.rb.orig 2010-08-20 14:37:58.000000000 +0900
+++ lib\ruby\site_ruby\shared\jruby\compiler\java_class.rb 2010-08-31 12:25:25.438906800 +0900
@@ -15,8 +15,9 @@
jruby_jar, = ['jruby.jar', 'jruby-complete.jar'].select do |jar|
File.exist? "#{ENV_JAVA['jruby.home']}/lib/#{jar}"
end
- classpath_string = options[:classpath].size > 0 ? options[:classpath].join(":") : "."
- compile_string = "javac #{options[:javac_options].join(' ')} -d #{options[:target]} -cp #{ENV_JAVA['jruby.home']}/lib/#{jruby_jar}:#{classpath_string} #{files_string}"
+ ps = ENV_JAVA['path.separator']
+ classpath_string = options[:classpath].size > 0 ? options[:classpath].join(ps) : "."
+ compile_string = "javac #{options[:javac_options].join(' ')} -d #{options[:target]} -cp #{ENV_JAVA['jruby.home']}/lib/#{jruby_jar}#{ps}#{classpath_string} #{files_string}"
compile_string
end
JRuby::Compiler / JavaGenerator / generate_javac always was used colon character for path separator,
But the path separator of Windows platform is semi colon.
I made above patch file, and patched to java_class.rb .
this patch is works fine.
Please fix this problem.
Hi, could you attach a git patch, please?