
usr/lib/jvm/java-8-openjdk.x86_64/bin/java: ELF 64-bit LSB executable.

You can re-affirm the location running file command on the symbolic path: $ file /usr/lib/jvm/java-8-openjdk.x86_64/bin/java There you go… You’ve now located JAVA config file location which we will use in below steps to set JAVA environment variable etc/alternatives/java: symbolic link to `/usr/lib/jvm/java-8-openjdk.x86_64/bin/java'

Run the file command on that location /etc/alternatives/java. Published on OctoJava Ubuntu 20.04 By Brian Hogan JavaJVMJava Tomcat Jetty Glassfish Cassandra Jenkins apt Java Runtime Environment (JRE) Java Developer Kit (JDK)Ubuntu 18. In the previous step, we located /etc/alternatives/java file this file will get us to the actual location where JAVA config files are. The above output shows that JAVA is pointing to a /etc/alternatives/java file but that is not the actual location of JAVA hence you will need to dig in more to fetch its actual path. usr/bin/java: symbolic link to `/etc/alternatives/java' Step 2: Find out where JAVA is!įor Linux systems, you can recursively run the command file followed by which command to find the JAVA installation location as shown in the image below. Note: It is advisable to remove the previous version so that it doesn’t switch back. Select an option as shown in the image below: Note: If above command doesn’t give any JAVA version option then try once again after running sudo yum update -y command. If you already have JAVA installed you can change/check the JAVA version using below command. Sudo yum install java-1.8.0-openjdk.x86_64 You can select the desired version from the output list and install it You can list all the available OpenJDK versions using : sudo yum list | grep openjdk
