If you have multiple versions of Java installed on your Windows computer or the variable value does not match the installation path, this error may occur when attempting to run the genrocket command.

Troubleshooting Steps

Complete the steps to resolve: 

  • Check the actual path of Java. The default path should be one the following for most Windows computers (unless a custom install was performed):
    • C:\Program Files (x86)\Java\*Version #*
    • C:\Program Files\Java\*Version #*

  • Next, in the Environment Variables configuration, view the JAVA_HOME variable value in the System Variables section.

  • Here is an example of an invalid path. The primary path is correct, but contains 2 directories for JRE and JDK. The correct directory needs to be displayed here. If it is a custom install, the entire path might need to be altered.

  • Correct the variable value by clicking Edit and typing or browsing to the appropriate path. 
  • Click OK to save the change and close the System Variables window.
  • Click OK to close the System Properties window.
  • Be certain to exit the command window and open a new instance before trying the genrocket command again.
  • If the JAVA_HOME variable path is correct, the command should run successfully.

Note: This error will also come up when an unsupported version of Java is used. If an unsupported version is being used, you will need to install a correct version and then check the path in this variable again to ensure it is correct.

Note: Additionally, this problem is more likely to occur when using Java Runtime Environment (JRE). Better results are typically received by using a supported version of the Java Development Kit (JDK). See Installation Overview for more information about what versions are supported.