![]() Set the JAVA_HOME environment variable with the value of binary path from the previous command. So, to avoid any errors it is suggested to set the JAVA_HOME variable.įirst, find the java binary path with the following command: sudo update-alternatives -list javaĪfter that, to set the variable edit the /etc/environment file in any text editor: sudo nano /etc/environment Many Java-based applications use the JAVA_HOME environment variable to get the location of Java saved on your PC. If you also have JDK installed, do the same for “javac”: sudo update-alternatives -config javacĮnter a number to set the required version as default. You have successfully updated the default JRE version. You can choose the Java version which is associated with a number, type number, and press Enter. You will get a list of installed Java versions on your system where each version is associated with a number, and any version can be set as the default Java environment of your system. You can have multiple versions of Java on your system, they can easily be managed by using the command: sudo update-alternatives -config java ![]() Step 2 – Switching Between Multiple Java Versions Install Docker, either using a native package (Linux) or wrapped in a virtual machine (Windows. Once the download and installation is done, you can check the version: java -version 13 OpenJDK Runtime Environment (build 11. You can also have installed both versions on your system.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |