0

I'm trying to open "knowage.sh" with terminal on Mac, but I have this problem:

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

I have installed idk 1.8 and I set up JAVA_HOME. How can I fix?

Joachim Sauer
  • 302,674
  • 57
  • 556
  • 614
  • 1
    Looks like it's asking you to define INSTALL4J_JAVA_HOME to point the JVM, not JAVA_HOME. I'd be wary of any system that was still stuck on JDK 8, which has reached the end of its support life, and using JAVA_HOME environment variables to find the JVM. – duffymo Apr 28 '22 at 13:32
  • As suggested in previous comment , set INSTALL4J_JAVA_HOME to Java home path. Alternatively edit knowage.sh and set the path for INSTALL4J_JAVA_HOME – kus Apr 28 '22 at 14:09

1 Answers1

0

Set INSTALL4J_JAVA_HOME on MAC like JAVA_HOME in .zshrc libe below

$  sudo ln -sfn /opt/homebrew/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk

$  echo 'export PATH="/opt/homebrew/opt/openjdk/bin:$PATH"' >> ~/.zshrc

$  echo 'export PATH="/opt/homebrew/opt/openjdk/libexec/openjdk.jdk/Contents/Home/bin:$PATH"' >> ~/.zshrc

$  echo 'export JAVA_HOME=$(/usr/libexec/java_home)' >> ~/.zshrc

$  echo 'export INSTALL4J_JAVA_HOME=$(/usr/libexec/java_home)' >> ~/.zshrc

$  source ~/.zshrc
My IT GURU
  • 144
  • 1
  • 7