![]() It outputs the version correctly.Ĭould you please tell what is missing to have my own java version on the central point for all programs. The program ‘java’ can be found in the following packages:īut if I go to my home directory, where java is uncompressed and execute like >./java -version. If I run from console the command >java -version Now added the path to “PATH” variable in the /etc/environment file like below: Downloaded the jdk from following site and uncompressed to my home directory. I have unintalled the java from the system using above commands. I could not run my own installed java version. Let’s check that all OpenJDK packages have been removed. Edit the list of packages below if you have additional or different OpenJDK packages installed. Next, let’s uninstall OpenJDK related packages. sudo vi /etc/environmentĭelete the line with JAVA_HOME Uninstall OpenJDK (if installed)įirst we’ll check which OpenJDK packages are installed. Update-alternatives: error: no alternatives for javaws. Update-alternatives: error: no alternatives for javac. Update-alternatives: error: no alternatives for java. cd /usr/lib/jvm sudo rm -rf jdk1.7.0_04 sudo update-alternatives -config java If you do this wrong, you could delete important system files, including those that are required by Ubuntu. You must type the next 2 commands perfectly to avoid permanently destroying your system. You should no longer see 1.7.0 u04 for the version of any of the above commands. java -version javac -version which javaws Let’s quickly verify that the commands above remove the symlinks. "/usr/lib/jvm/jdk1.7.0_04/bin/javac" sudo update-alternatives -remove "javaws" \ "/usr/lib/jvm/jdk1.7.0_04/bin/java" sudo update-alternatives -remove "javac" \ sudo update-alternatives -remove "java" \ ![]() However, you can remove the \ and then type each command on one line in the terminal. If you want to remove Openjdk only, execute the following command on terminal: sudo apt-get remove openjdk. I have split the following commands onto multiple lines to ensure that they display correctly on this page. Next, we’ll remove each symlink to a Java binary from the Debian alternatives system. Slave java.1.gz: /usr/lib/jvm/java-7-openjdk-amd64/jre/man/man1/java.1.gzĬurrent 'best' version is '/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java'. usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java - priority 1051 Slave java.1.gz: /usr/lib/jvm/j2sdk1.6-oracle/man/man1/java.1.gz usr/lib/jvm/j2sdk1.6-oracle/jre/bin/java - priority 315 You can get the terminal by using these keys, ctrl + shift + enter. usr/lib/jdk1.7.0_04/bin/java - priority 1 To uninstall OpenJDK, you need to run these commands in your terminal. Link currently points to /usr/lib/jdk1.7.0_04/bin/java The output from the command will be something like: Let’s check the current setup before we uninstall Java. I have also included instructions for removing the OpenJDK at the bottom of this post. ![]() If you are using a different version of the JDK, then change the version numbers listed below. These instructions are for the Oracle JDK 1.7.0 Update 4 on Ubuntu 12.04 LTS. How to identify the Java version on Linux (Ubuntu):īefore uninstalling java from your PC, it is essential to know which version of java you have got.Hopefully you won’t need these instructions due to a botched install, but there may come a time where you need to uninstall a version of the JDK/JVM. Oracle Java is much better when it comes to performance and stability. The difference between “Open JDK” and “Oracle Java” is that the former is open-source, whereas the latter is license-based. If you have installed java just to run the java applications, it would most probably “Java Runtime Environment (JRE).” Or, if you have installed java for development purpose, then you may have one of the following: How to check the type of Java on Linux (Ubuntu):īefore erasing java from your device, the first check is to identify what type of java you have on your PC. In this guide, we will learn how many versions of java are there, what distinguishes them, and how to erase them from your computer completely. Installing Java on Ubuntu is pretty straightforward, but uninstalling it is a hard nut to crack for many folks. In many cases, you may need to remove java from your computer, such as installing the latest version of java or freeing up space from your machine. Why do we need Java on our computers? There are tons of applications developed using the java environment, so we need to install java on our computers to make the java-based application run with no difficulty.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |