To understand which Java you have
- Open Terminal.
- First confirm you have JDK by typing “which java”. It should show something like /usr/bin/java.
- Check you have the needed version of Java, by typing “java -version”.
- If you do not have Java JDK, install it. Please the Java Development Kit. Not the Java Runtime Environment (JRE). To get use either the adoptJDK site or the Zulu site. For the present GEOframe system, the JDK 8 is necessary (Geotools do not work with Java 9 or more). Reasons why Oracle sites are not preferable are well documented here.
- JAVA_HOME is essentially the full path of the directory that contains a sub-directory named bin which in turn contains the java.
- For knowing where it is, at the terminal prompt issue the command: %/usr/libexec/java_home -V
- If you installed the adoptJDK, your directory should be something — /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
- Set JAVA_HOME using this command in Terminal: export JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
- Finally issue: echo $JAVA_HOME on Terminal to confirm the path
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.