buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vbo...@apache.org
Subject svn commit: r645720 - /incubator/buildr/trunk/lib/buildr/java/jruby.rb
Date Mon, 07 Apr 2008 22:44:05 GMT
Author: vborja
Date: Mon Apr  7 15:44:04 2008
New Revision: 645720

URL: http://svn.apache.org/viewvc?rev=645720&view=rev
Log:
Fixed jruby classpath issue on Windows. (By Tomas Carlsson)
Use File.toURI.toURL so that jruby classpath is loaded correctly on windows.

Modified:
    incubator/buildr/trunk/lib/buildr/java/jruby.rb

Modified: incubator/buildr/trunk/lib/buildr/java/jruby.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/buildr/java/jruby.rb?rev=645720&r1=645719&r2=645720&view=diff
==============================================================================
--- incubator/buildr/trunk/lib/buildr/java/jruby.rb (original)
+++ incubator/buildr/trunk/lib/buildr/java/jruby.rb Mon Apr  7 15:44:04 2008
@@ -81,7 +81,7 @@
       add_url_method = java.lang.Class.forName('java.net.URLClassLoader').
         getDeclaredMethod('addURL', [java.net.URL].to_java(java.lang.Class))
       add_url_method.setAccessible(true)
-      add_path = lambda { |path| add_url_method.invoke(sysloader, [java.io.File.new(path).toURL].to_java(java.net.URL))
}
+      add_path = lambda { |path| add_url_method.invoke(sysloader, [java.io.File.new(path).toURI.toURL].to_java(java.net.URL))
}
       # Include tools (compiler, Javadoc, etc) for all platforms except OS/X.
       unless Config::CONFIG['host_os'] =~ /darwin/i
         home = ENV['JAVA_HOME'] or fail 'Are we forgetting something? JAVA_HOME not set.'



Mime
View raw message