Problems with the installation of Java on your computer may lead to the following error message when you try to run STAR-CCM+:
Unable to start starccm+. Could not locate the Java VM.
If the correct version of Java is installed, it should be found by STAR-CCM+. It looks in the Windows registry to determine what versions of Java are installed, and where they are. There may be incorrect or out-of-date information in the Windows registry that is confusing STAR-CCM+.
STAR-CCM+ currently requires Sun Java Software Developer Kit 1_5_0_XXX to be installed.
If a supported version of Java was installed but you still see the problem, you can run STAR-CCM+ with the -v option from a command prompt, for example in Windows:
C:\>"c:\Program Files\CD-adapco\STAR-CCM+ 2.04.004 \starccm+.exe" -v
This will yield diagnostic output such as the following:
jvm addOption '-Dstar.platformDir=c:\Program Files\CD-adapco\STAR-CCM+ 2.04.004\java\platform'
jvm addOption '-Dstar.helpCmd=wwhelp.exe'
jvm addOption '-Dstar.serverCmd=starccm+ -server '
jvm addOption '-Djdk.home=C:\j2sdk1.4.2_10'
...
There will be more lines like the ones above, but look for the line including -Djdk.home=, then verify that the named directory actually exists and contains a subdirectory jre\bin\client or jre\bin\server with the file jvm.dll in it (usually both versions will exist). If the jvm.dll file does not exist, the jdk was not completely installed.
If the directory named in the -Djdk.home line of the diagnostics does not exist, that means the registry is incorrect (for example, a version of the jvm was moved or deleted without using the Add/Remove Programs dialog), and the registry should be cleaned up. You can force STAR-CCM+ to use a particular version of Java by setting the environment variable STAR_JAVA_HOME to the directory where the jdk is installed, for example on Windows:
C:\>set STAR_JAVA_HOME=C:\j2sdk1.4.2_10
C:\>"c:\Program Files\CD-adapco\STAR-CCM+ 2.04.004\st arccm+.exe" -v
You will get the following kind of output:
jvm addOption '-Dstar.platformDir=c:\Program Files\CD-adapco\STAR-CCM+ 2.04.004\java\platform'
jvm addOption '-Dstar.helpCmd=wwhelp.exe'
jvm addOption '-Dstar.serverCmd=starccm+ -server '
jvm addOption '-Djdk.home=C:\j2sdk1.4.2_10'
...
If you set the environment variable in the Advanced tab of the System Properties dialog, you will need to log out and back in for it to take effect.