There may be a hyphen between the name and version number. I highly suggest using Java 7, but the updates will try to install Java 6 too. Everything I have thrown at it works as long as your video card drivers work. If your system gives a lower number such as gcc-2. User Comments There are no user comments for this question. A version of java is installed on my Linux machine.
This is often needed when a system has multiple versions of java installed, or multiple distributions of java installed, such as and. I think you can track all this by checking to where your java binaries linked to. Also, which version works best? To learn more, see our. Question: When I am trying to run a Java program on Linux, I am getting the following error. I want to use openjdk 7, so how do I uninstall openjdk 6? How helpful was this article to you? Delivery powered by Google Feedburner.
I believe you only have one option This sample shows jdk1. So, I can simplify like below: whereis: Still return found even symlink broken or non-executable. You should decide on one and use it. Not the answer you're looking for? This is what you can do Assume your system are x64 : sudo rpm -ivh jdk-8u91-linux-x64. I know about java -version.
I recommend you use type -a java to get the correct result. Example Java version number is like below. If you had to create one of the login files e. Having a backup copy of the line you are going to change is a good idea for two reasons. The following discussion will explain both approaches. Click here to return to.
You'll notice that since this is a simulation, you don't need sudo. Then it should be possible to give a more specific answer. Provide details and share your research! There are multiple packages associated with it, so you may need to remove more than one packages. All java versions first numbers is 1 and actual major version numbers change according to release which is current 8. The version number may have dots or underscores. Would you like to answer one of these instead? You also appear to be asking to find out which version of java is in a specific folder? I want to start toying around with java eventually getting to the point where I can write basic little programs for android or web , but I've managed to have java messed up on my computer from past experiments. Java Runtime Environment is used to run Java applications.
All this on 32bit Ubuntu 12. Java can be installed in different ways in linux. Support Xmodulo Did you find this tutorial helpful? Historically it has been installed in one of the directories listed below. Now my problem is i don't know where that 1. I'm not sure which version of java I have, and would like to know if there is a command to see the version of java that is installed and active. But your default should still come up as 7.
Finding out which binary is executed when you type only the name is done using which, and using readlink you can condense the process to a single line. To learn more, see our. When you are done, save the file. Don't forget to run updatedb if you are using locate for the first time. Provide details and share your research! I am suspecting that it would be the folder for the installed version of java. First, you can look back and forth between the backup copy of the line and the line you are editing, to make sure that you don't make a mistake. Note that the about installing the Java plugin for Mozilla can be a little confusing, and need to be read very carefully.
In your terminal type java -version or just javac if it returns something, then you've java installed. . How ever you installed it a Java installation needs the java executable to do any good in most cases, so you could use the locate or find commands to find the different ones. Now, use a file management program such as Konqueror to explore the files in your home directory. Sun's Java website should recognize your platform as Linux automatically, and instructions are provided there, so they will not be repeated here. The Java command below would work as a validation that the Alternatives have been setup correctly.