LaunchAnywhere ERROR: "Could not find a valid Java virtual machine to load" XCOM for Windows
search cancel

LaunchAnywhere ERROR: "Could not find a valid Java virtual machine to load" XCOM for Windows

book

Article ID: 207911

calendar_today

Updated On:

Products

XCOM Data Transport - Windows

Issue/Introduction

Trying to install the latest patch for XCOM for Windows 11.6 SP03 and receive LaunchAnywhere error:

"Could not find a valid Java virtual machine to load.
You may need to reinstall a supported Java virtual machine."


Environment

XCOM™ Data Transport® for Windows 11.6 SP03

Resolution

XCOM for Windows 11.6 SP03 and patches no longer distribute Oracle Java with the installer and Java needs to be installed by the user.
The installer searches for the file java.exe using first the directories contained the PATH environment variable and then the Windows Registry.
Below are a few usual registry locations provided by Java vendors. This works well for Oracle/IBM provided Java but not reliable for Open Java installations:
 HKLM\SOFTWARE\JavaSoft\Java Development Kit 
 HKLM\SOFTWARE\JavaSoft\Java Runtime Environment
 HKLM\SOFTWARE\IBM\Java2 Runtime Environment 
 HKLM\SOFTWARE\IBM\Java Development Kit  
Hence, it is recommended to set the Java install directory in the PATH variable. The installer may also fail to access the windows registry unless launched with elevated privileges. 

If Java is installed and it still cannot be found then the installer can be run with the LAX_VM parameter to force the java.exe to be found i.e.
XCPCNT_XCOMPATCH_SP03_r116nnnnn_64.exe LAX_VM "FULL_PATH_TO_JAVA_BIN_DIRECTORY\java.exe"
Similarly for the initial XCOM install:
XCOM.exe LAX_VM "FULL_PATH_TO_JAVA_BIN_DIRECTORY\java.exe"

Additional Information