![]() This will return the path you just set.In this post, I will guide you to setup Java 11 on Windows operating system by downloading and installing Java Development Kit (JDK) version 11 from Oracle. You can now test whether the environment variable has been set by executing the following command: echo $JAVA_HOME. Save and exit the file, and reload it: source /etc/environment. sudo subl /etc/environmentĪt the end of this file, add the following line, making sure to replace the highlighted path with your own copied path. Many programs, such as Java servers, use the JAVA_HOME environment variable to determine the Java installation location.Ĭopy the path from your preferred installation and then open /etc/environment using Sublime Text or your favourite text editor. sudo update-alternatives -config command Setting the JAVA_HOME Environment Variable You can use the following command, filling in the command you want to customize. This can also be done for other Java commands, such as the compiler ( javac), the documentation generator ( javadoc), the JAR signing tool ( jarsigner), and more. You can now choose the number to use as a default. ![]() Press to keep the current choice, or type selection number: * 0 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 1081 auto modeġ /usr/lib/jvm/java-6-oracle/jre/bin/java 1 manual modeĢ /usr/lib/jvm/java-7-oracle/jre/bin/java 2 manual modeģ /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 1081 manual modeĤ /usr/lib/jvm/java-8-oracle/jre/bin/java 3 manual modeĥ /usr/lib/jvm/java-9-oracle/bin/java 4 manual mode ![]() There are 5 choices for the alternative java (providing /usr/bin/java). ![]() The output will look something like the following. You can configure which version is the default for use in the command line by using update-alternatives, which manages which symbolic links are used for different commands. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |