Tomcat 使用 JRockit 安装失败

Tomcat installation fails with JRockit

我无法在 windows 服务器 2008 上安装 Tomcat 使用 apache-tomcat-7.0.67.exe 与 JRockit jvm。我能够安装 tomcat 完美配合oracle jvm。然后我选择了 "C:\Program Files (x86)\Java\jrockit-jdk1.6.0_45-R28.2.7-4.1.0\jre\bin" jre.it 的路径显示一条消息,指出 "No Java Virtual Machine found in folder" 并且 tomcat 安装程序退出。

来自https://svn.apache.org/repos/asf/tomcat/tc8.0.x/trunk/res/tomcat.nsi

${If} $JavaHome == ""
  ${OrIfNot} ${FileExists} "$JavaHome\bin\java.exe"
    IfSilent +2
    MessageBox MB_OK|MB_ICONSTOP "No Java Virtual Machine found in folder:$\r$\n$JavaHome"
    DetailPrint "No Java Virtual Machine found in folder:$\r$\n$JavaHome"
    Quit
  ${EndIf}

  StrCpy "$JavaExe" "$JavaHome\bin\java.exe"

  ; Need path to jvm.dll to configure the service - uses $JavaHome
  Call findJVMPath
  Pop 
  ${If}  == ""
    IfSilent +2
    MessageBox MB_OK|MB_ICONSTOP "No Java Virtual Machine found in folder:$\r$\n"
    DetailPrint "No Java Virtual Machine found in folder:$\r$\n"
    Quit
  ${EndIf}

  ...

; ====================
; FindJVMPath Function
; ====================
;
; Find the full JVM path, and put the result on top of the stack
; Implicit argument: $JavaHome
; Will return an empty string if the path cannot be determined
;
Function findJVMPath

  ClearErrors

  ;Step one: Is this a JRE path (Program Files\Java\XXX)
  StrCpy  "$JavaHome"

  StrCpy  "\bin\hotspot\jvm.dll"
  IfFileExists "" FoundJvmDll
  StrCpy  "\bin\server\jvm.dll"
  IfFileExists "" FoundJvmDll
  StrCpy  "\bin\client\jvm.dll"
  IfFileExists "" FoundJvmDll
  StrCpy  "\bin\classic\jvm.dll"
  IfFileExists "" FoundJvmDll

  ;Step two: Is this a JDK path (Program Files\XXX\jre)
  StrCpy  "$JavaHome\jre"

  StrCpy  "\bin\hotspot\jvm.dll"
  IfFileExists "" FoundJvmDll
  StrCpy  "\bin\server\jvm.dll"
  IfFileExists "" FoundJvmDll
  StrCpy  "\bin\client\jvm.dll"
  IfFileExists "" FoundJvmDll
  StrCpy  "\bin\classic\jvm.dll"
  IfFileExists "" FoundJvmDll

  ClearErrors
  ;Step tree: Read defaults from registry

  ReadRegStr  HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" "CurrentVersion"
  ReadRegStr  HKLM "SOFTWARE\JavaSoft\Java Runtime Environment$1" "RuntimeLib"

  IfErrors 0 FoundJvmDll
  StrCpy  ""

  FoundJvmDll:
  ClearErrors

  ; Put the result in the stack
  Push 

FunctionEnd

我读这篇文章的方式是你需要在你的 JRE 中有一个 bin\java.exe 以及在列出的子目录之一中有一个 jvm.dll。

尝试将 "C:\Program Files (x86)\Java\jrockit-jdk1.6.0_45-R28.2.7-4.1.0\" 指定为根。