![]() I've tested this solution on both ubuntu 12.04 and Debian wheezy and it works in both of them. Java HotSpot(TM) Server VM (build 25.5-b02, mixed mode)Īlso note that you might need root permission or be in sudoers group to be able to do this. Java(TM) SE Runtime Environment (build 1.8.0_05-b13) ![]() ![]() If you get something like the following, you are good to go: java version "1.8.0_05" Pay attention to the asterisk before the numbers on the left and if the correct one is not set choose the correct one by typing the number of it and pressing enter. Press enter to keep the current choice, or type selection number: You get something like this: There are 2 choices for the alternative java (providing /usr/bin/java). Run the following commands as a user with sudo privileges or root to update the packages index and install the OpenJDK 11 JDK package: sudo apt update sudo apt install openjdk-11-jdk. Set JAVAHOME Path on Ubuntu Locate Java’s installation directory: ls -l /usr/lib/jvm Check Java Install Directory in Ubuntu Temporarily Set JAVAHOME in Ubuntu To temporarily set the JAVAHOME path in Ubuntu. Make sure the Oracle's java is set as default java by: $ update-alternatives -config java It is also the default Java development and runtime in Ubuntu 20.04. $ sudo update-alternatives -install /usr/bin/java java $/bin/javac 20000 Now to set your JAVA_HOME environment variable: $ JAVA_HOME=/usr/java/jdk1.8.0_05/ To set Oracle's Java SE Development Kit as the system default Java just download the latest Java SE Development Kit from here then create a directory somewhere you like in your file system for example /usr/java now extract the files you just downloaded in that directory: $ sudo tar xvzf -C /usr/java
0 Comments
Leave a Reply. |