Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.7.0
-
Fix Version/s: JRuby 1.7.3
-
Labels:None
-
Environment:jruby 1.7.0 (1.9.3p203) 2012-10-22 ff1ebbe on Java HotSpot(TM) Client VM 1.7.0_09-b05 [Windows Vista-x86]
-
Number of attachments :
Description
JRuby cannot find Java through JAVA_HOME when option -w is used and JAVA_HOME points to a JRE.
If JAVA_HOME points to a JDK the problems disappears.
The following example shows how JAVA_HOME first pointing to the JDK, then to the JRE:
D:\>set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_09 D:\>jruby -v jruby 1.7.0 (1.9.3p203) 2012-10-22 ff1ebbe on Java HotSpot(TM) Client VM 1.7.0_0 9-b05 [Windows Vista-x86] D:\>jruby -e "puts 'a'" a D:\>jruby -w -e "puts 'a'" a D:\>set JAVA_HOME=C:\Program Files\Java\jre7 D:\>jruby -v jruby 1.7.0 (1.9.3p203) 2012-10-22 ff1ebbe on Java HotSpot(TM) Client VM 1.7.0_0 9-b05 [Windows Vista-x86] D:\>jruby -e "puts 'a'" a D:\>jruby -w -e "puts 'a'" Cannot locate Java installation, specified by JAVA_HOME:
I just tried the same thing on a Windows XP computer and cannot reproduce the error, so it might be specific to Windows Vista.