tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1099394 - in /tomcat/trunk: res/tomcat.nsi webapps/docs/changelog.xml
Date Wed, 04 May 2011 10:14:19 GMT
Author: markt
Date: Wed May  4 10:14:19 2011
New Revision: 1099394

URL: http://svn.apache.org/viewvc?rev=1099394&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51135
Fix auto-detection of JAVA_HOME for 64-bit Windows platforms that only have a 32-bit JVM installed.

Modified:
    tomcat/trunk/res/tomcat.nsi
    tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/res/tomcat.nsi
URL: http://svn.apache.org/viewvc/tomcat/trunk/res/tomcat.nsi?rev=1099394&r1=1099393&r2=1099394&view=diff
==============================================================================
--- tomcat/trunk/res/tomcat.nsi (original)
+++ tomcat/trunk/res/tomcat.nsi Wed May  4 10:14:19 2011
@@ -635,22 +635,35 @@ Function findJavaHome
 
   ClearErrors
 
-  ; Use the 64-bit registry on 64-bit machines
+  ; Use the 64-bit registry first on 64-bit machines
   ExpandEnvStrings $0 "%PROGRAMW6432%"
   ${If} $0 != "%PROGRAMW6432%"
     SetRegView 64
+    ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" "CurrentVersion"
+    ReadRegStr $1 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment\$2" "JavaHome"
+    ReadRegStr $3 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment\$2" "RuntimeLib"
+
+    IfErrors 0 +2
+    StrCpy $1 ""
+    ClearErrors
   ${EndIf}
 
-  ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" "CurrentVersion"
-  ReadRegStr $1 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment\$2" "JavaHome"
-  ReadRegStr $3 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment\$2" "RuntimeLib"
-
-  IfErrors 0 NoErrors
-  StrCpy $1 ""
-
-NoErrors:
-
-  ClearErrors
+  ; If no 64-bit Java was found, look for 32-bit Java
+  ${If} $1 == ""
+    SetRegView 32
+    ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" "CurrentVersion"
+    ReadRegStr $1 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment\$2" "JavaHome"
+    ReadRegStr $3 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment\$2" "RuntimeLib"
+
+    IfErrors 0 +2
+    StrCpy $1 ""
+    ClearErrors
+    
+    ; If using 64-bit, go back to using 64-bit registry
+    ${If} $0 != "%PROGRAMW6432%"
+      SetRegView 64
+    ${EndIf}
+  ${EndIf}
 
   ; Put the result in the stack
   Push $1

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1099394&r1=1099393&r2=1099394&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Wed May  4 10:14:19 2011
@@ -186,6 +186,10 @@
       <update>
         Update commons pool to 1.5.6. (markt)
       </update>
+      <fix>
+        <bug>51135</bug>: Fix auto-detection of JAVA_HOME for 64-bit Windows
+        platforms that only have a 32-bit JVM installed. (markt) 
+      </fix>
     </changelog>
   </subsection>
 </section>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message