I have been trying to get Java for the past day now. I followed several tutorials but I keep getting the same error. After I put in tar -xvf jre-7u4-linux-i586.tar.gz
it says Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
I have a 64 bit system so I doubt that's the problem. The JDK installed perfectly, but I'm lost as to why the JRE wont work...
If OpenJDK isn't preferred, you can install the Oracle version from a ppa (which is a lot easier than manual installation, and you should also receive updates automatically). Adding via ppa also ensures that you are using the correct architecture (32 vs 64 bit).
Source: http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html
The simplest way to get Java installed with Ubuntu 12.04 is to run
Do not mess with downloading any files - just use the package manager.
This set of instructions is for 64bit Java installation
Download Java to the Downloads folder
1 - Open Terminal, copy & paste the following commands
Press Enter
Press Enter
Press Enter
Press Enter
Press Enter
Press Enter
Now remove the IcedTea plugin, if it has been installed. If it's not there to begin with, you'll see a notification of that.
Press Enter
Remove a former version of the Java plugin (may or may not be present, run the command just to make sure). If it's not there to begin with, you'll see a notification of that.
Press Enter
Press Enter
These instructions were copied verbatim from the Easy Linux Tips Project
I have used these instructions myself and can verify that they do work.
Easy Linux Tips - Installing Oracle Java
Open Software Center and type
jre
there.I had the same problem with a friends machine, all i did was to install the openjdk, this can be done using the below command
The above command work in 12.04, but to previous version you either add some ppa, or just run the below command
It worked for me and my friend.
Hope that helped.
This guy and myself need Sun JAVA specifically as many things do not run on openJDK thus people will ask about Sun Java, openJDK is not useless just it is behind Sun Java as Sun Java will always be a little ahead as it has more support.
So for the people that need SUN JAVA (Oracle) here is what I did: I found these commands got me up and running.
I feel sorry for the people that just want the solution but its really getting bad that people give a solution without reading or knowing what they are talking about.
I had the same problem and found that 3 sites fixed my issue and I hope this helps.
I installed ubuntu 12.04 Server 64bit. Hardware specs
Intel Xeon E5-2620 on Intel S2600CP2
Host OS Vmware ESXI 5.0
Guest ubuntu 12.04 Server 64bit
And I logged in. I typed the following commands to get Java 7 64bit installed.
sudo apt-get install python-software-properties << i believe this installs the apt-get-repository scripts.
sudo apt-get update
<<< updates the software listsudo apt-get upgrade
<<< updates and installs software from list.sudo apt-get dist-upgrade
<<< upgrades version of ubuntu server example 11.05 to 12.01sudo reboot
<<< reboot is a must.sudo add-apt-repository ppa:webupd8team/java
<<< adds repository for Oracle Javasudo apt-get update
<<< refresh listsudo apt-get install oracle-java7-installer
<< install Javajava -version
<<< checks java version installed.You should get JAVA(TM) 64bit version
I hope this helps.
For 64 bit i've tested and woked on before.
Those are the steps i did before:
Download the sun jre 7 tar file from here
Extract the tar file:
Move extracted folder to this location:
Install new java source in system:
Choose default java:
java version test:
Verify the symlinks all point to the new java location:
For 32bit architecture see this link
OpenJDK Java is a wise option, better though. But if you still insist on Oracle Java, then please download jre-7u4-linux-x64.tar.gz file from their site and do the same operations . It will do the job.