History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: JRUBY-2301
Type: Improvement Improvement
Status: Open Open
Priority: Minor Minor
Assignee: Thomas E Enebo
Reporter: Rod Hilton
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
JRuby

JRuby script would work when java is installed but JAVA_HOME not set

Created: 20/Mar/08 11:35 AM   Updated: 20/Mar/08 11:59 AM
Component/s: None
Affects Version/s: JRuby 1.1RC2, JRuby 1.1RC3
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments: 1. File jruby_vars.diff (0.7 kb)

Environment: Windows


 Description  « Hide
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.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Rod Hilton - 20/Mar/08 11:55 AM
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.


Rod Hilton - 20/Mar/08 11:59 AM
It's worth mentioning that this patch does NOT solve the related defect noted here:

http://jira.codehaus.org/browse/JRUBY-2302