.sh executable asking for definition for INSTALL4J_JAVA_HOME path to jvm

I want to run a .sh executable to install software but when I try to execute the file using ./<fileName> in my terminal, following error message appears:

No suitable Java Virtual Machine could be found on your system. The version of the JVM must be 1.8. Please define INSTALL4J_JAVA_HOME to point to a suitable JVM.

  1. How does one check the JVM version on the device?
  2. If the JVM isn't version 1.8, how can one install JVM 1.8?
  3. How does one define INSTALL4J_JAVA_HOME to point to the JVM?

1 Answer

  1. java --version
  2. sudo apt-get install openjdk-8-jre
  3. export INSTALL4J_JAVA_HOME=pathToJVM

update-java-alternatives --list to manage installed java versions

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like