![]() |
|
|
Issue Type:
|
Bug
|
Affects Versions:
|
JRuby 1.7.2 |
Assignee:
|
Thomas E Enebo
|
Components:
|
Launcher |
Created:
|
13/Feb/13 3:41 PM
|
Description:
|
Running
jruby -S rake
randomly fails to start Java, with the error message:
Cannot find Java 1.5 or higher.
The problem seems to be caused by the launcher using a char* to point into a stack-based std::string object that is no longer in scope.
The problem occurs at line 223 of platformlauncher.cpp:
const char *javaHome = trimTrailingBackslashes(origJavaHome).c_str();
Replacing that with:
string javaHome(trimTrailingBackslashes(origJavaHome));
(plus some changes to the following lines to use string instead of char*) solves the problem.
Note: to workaround this issue on Windows7 64-bit, you must use the -Xjdkhome parameter to jruby, or use the JAVACMD env. var. The jruby launcher is 32 bit and thus will not find 64 bit Java in the registry because of registry redirection (see http://msdn.microsoft.com/en-us/library/aa384232(VS.85).aspx).
|
Environment:
|
Windows7 64-bit
|
Project:
|
JRuby
|
Priority:
|
Major
|
Reporter:
|
Tim Hayman
|
|
|
|
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email