Wednesday, June 3, 2015

JVM error: Could not find Java Virtual Machine

If you are receiving the error, "Could not find a valid Java virtual machine to load. You may need to re-install a supported Java virtual Machine" most probably you haven't set the environment variables.

To set the Environment Variable and Path:
  1. Edit the file run.bat and set JAVA_OPTS. This file is located at $JBOSS_HOME\bin folder.
  2. In the Environment Variables window, go to User Variables pane and select New.
  3. Enter JAVA_HOME in the Variable Name field.
    • Enter C:\Program Files\Java\jdk1.6.x (as per the example) in the Variable Value field.
    • Click OK.
  4. Right click on Computer and select Properties. System window appears.
  5. Select Advanced System Settings link from the Control Panel Home pane. System Properties window appears.
  6. Select Environment Variables.
  7. Select Path from User Variables and click Edit.
    • Add C:\Program Files\Java\jdk1.6.x\bin(as per the example) in the Variable Value field.
    • Click OK.

No comments:

Post a Comment