|
From: <caw...@us...> - 2007-07-26 20:26:49
|
Revision: 2895
http://rubyeclipse.svn.sourceforge.net/rubyeclipse/?rev=2895&view=rev
Author: cawilliams
Date: 2007-07-26 13:26:48 -0700 (Thu, 26 Jul 2007)
Log Message:
-----------
add some hacks in to support JRuby (if we pass along a command, try it and the prepend "j" and try that (so when we pass "ruby", if that executable doesn't exists, try "jruby")
Modified Paths:
--------------
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/StandardVMRunner.java
Modified: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/StandardVMRunner.java
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/StandardVMRunner.java 2007-07-26 20:13:39 UTC (rev 2894)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/StandardVMRunner.java 2007-07-26 20:26:48 UTC (rev 2895)
@@ -147,7 +147,7 @@
return string;
}
- // Build the path to the ruby executable. First try 'bin'
+ // Build the path to the ruby executable.
String installLocation = fVMInstance.getInstallLocation().getAbsolutePath() + File.separatorChar;
File exe = new File(installLocation + "bin" + File.separatorChar + command); //$NON-NLS-1$
if (fileExists(exe)){
@@ -159,6 +159,18 @@
string.add(exe.getAbsolutePath());
return string;
}
+ // HACK FIXME This is just to allow for jruby!
+ String path = installLocation + "bin" + File.separatorChar + "j" + command; //$NON-NLS-1$ //$NON-NLS-2$
+ exe = new File(path + ".bat"); //$NON-NLS-1$
+ if (fileExists(exe)){
+ string.add(exe.getAbsolutePath());
+ return string;
+ }
+ exe = new File(path);
+ if (fileExists(exe)){
+ string.add(exe.getAbsolutePath());
+ return string;
+ }
// not found
abort(MessageFormat.format(LaunchingMessages.StandardVMRunner_Specified_executable__0__does_not_exist_for__1__4, command, fVMInstance.getName()), null, IRubyLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|