Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.1RC2, JRuby 1.1RC3
-
Fix Version/s: JRuby 1.1.6
-
Component/s: None
-
Labels:None
-
Environment:Windows
-
Number of attachments :
Description
If you have java in your PATH, but did not set JAVA_HOME (a surprisingly common way of installing java) in windows, an attempt to run the Jruby script results in an error that JAVA_HOME as not set, then the script exits.
Since many people 'install' java simply by making it so that running 'java' from commandline works, it would be nice if this script were able to fall through and just use whatever is on the path if JAVA_HOME is not set.
Here is a patch for the problem.
Essentially all it does is, right before the normal point of giving up and bailing, it searches the %PATH% variable for java.exe and, if found, sets JAVA_HOME, then proceeds as normal.