JRuby

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

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor 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 :
    1

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.

Activity

Hide
Rod Hilton added a comment -

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.

Show
Rod Hilton added a comment - 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.
Hide
Rod Hilton added a comment -

It's worth mentioning that this patch does NOT solve the related defect noted here:

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

Show
Rod Hilton added a comment - It's worth mentioning that this patch does NOT solve the related defect noted here: http://jira.codehaus.org/browse/JRUBY-2302
Hide
Thomas E Enebo added a comment -

Patch applied (by Rod Hilton) in commit 8137. Thanks for the patch...sorry it took so long to apply

Show
Thomas E Enebo added a comment - Patch applied (by Rod Hilton) in commit 8137. Thanks for the patch...sorry it took so long to apply

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: