Android OS Forum banner
1 - 16 of 16 Posts

·
WTF YOU LOOKIN AT!
Joined
·
287 Posts
Discussion Starter · #1 ·
When I upgraded to Ubuntu 12.04, all the sudden I couldn't install Java (sha256sum mismatch jdk-7u3-linux-x64.tar.gz), which means I can't do much deving. Well I searched through the interweb and finally found a solution.

First:

Code:
sudo add-apt-repository ppa:eugenesan/java<br />
sudo apt-get update<br />
sudo apt-get install oracle-java7-installer
By now, you have probably gotten an error and the terminal has stated that Java was not installed. No problem.

Second:

Download Java directly from Oracle: http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u3-download-1501626.html

Now, move what you just downloaded to /var/cache/oracle-java7-installer/

Third:

Code:
sudo gedit /var/lib/dpkg/info/oracle-java7-installer.postinst
Now scroll down and find the following:

Code:
<br />
		<br />
		echo "Downloading..."<br />
		rm -f $FILENAME<br />
		WGETRC=wgetrc wget $PARTNER_URL <br />
			|| fp_exit_with_error "download failed"<br />
		rm -f wgetrc<br />
		echo "Download done."
Now put a # next to each line between "Downloading..." and "Downloading done."

Code:
     <br />
               <br />
		echo "Downloading..."<br />
		#rm -f $FILENAME<br />
		#WGETRC=wgetrc wget $PARTNER_URL <br />
			#|| fp_exit_with_error "download failed"<br />
		#rm -f wgetrc<br />
		echo "Download done."
Save, and go back to your terminal.

Finally, do:

Code:
sudo apt-get install oracle-java7-installer
Java should now install properly.

Source:

http://www.ubuntugeek.com/how-to-install-oracle-java-7-in-ubuntu-12-04.html (most helpful info is in the comments)

Sent from my ADR6400L using RootzWiki
 

·
WTF YOU LOOKIN AT&#33;
Joined
·
287 Posts
Discussion Starter · #3 ·
I can't get the download to move to /var/cache/oracle-java7-installer/ a little help please and thank you
Be sure you do sudo before the move command.

Sent from my ADR6400L using RootzWiki
 

·
Premium Member
Joined
·
1,662 Posts
May I ask how well a full AOSP rom compiles with all of the libs in 12.04? Have you tried yet/is it pain to tame? Also what kinda HW cfg do you have?
 

·
Android Beginner
Joined
·
8 Posts
I run the script fine, but when I try to see my java version I get the following:

java -version
The program 'java' can be found in the following packages:
* default-jre
* gcj-4.6-jre-headless
* openjdk-6-jre-headless
* gcj-4.5-jre-headless
* openjdk-7-jre-headless
Try: sudo apt-get install <selected package>
 

·
WTF YOU LOOKIN AT&#33;
Joined
·
287 Posts
Discussion Starter · #10 ·
Just came to ask the same thing. I think JDK6 is the limit for Android application development as well.
Well I don't build aosp, but I did get java6 to install so ill update the op for that as well.

Sent from my ADR6400L using RootzWiki
 

·
DoseOfAndroid
Joined
·
40 Posts
they actually did this in 11.10, it sucked to install Java I had to set a PPA, which I really don't like doing if its just some guy hosting packages, but that's the best I really found. I know it sounds silly and naive but I feel like I'd trust someone over here more than a random site. Thanks for this guide though! Unfortunately I will have to be doing this, because my upgrade from 11.10 somehow was corrupted, I think in the download, and did not work properly. So right now I'm sitting here waiting for it to finish installing. I've always loved that I could use the browser before it's done installing. It's so convenient and gets rid of the 'sitting impatiently waiting to do something' feeling most people get when installing a new OS. Also the new Twitter feed right into the installation box is a genius idea by Canonical. I'll be sure to point people to this guide, assuming its fairly straight-forward to do once I'm done installing. Thanks again!
 

·
Android Apprentice
Joined
·
320 Posts
what I'm I doing wrong?

sudo mv '/home/maverick/Desktop/jdk-7u3-linux-x64.tar.gz' /var/cache/oracle-java7-installer/

mv: cannot move `/home/maverick/Desktop/jdk-7u3-linux-x64.tar.gz' to `/var/cache/oracle-java7-installer/': Not a directory
 

·
WTF YOU LOOKIN AT&#33;
Joined
·
287 Posts
what I'm I doing wrong?

sudo mv '/home/maverick/Desktop/jdk-7u3-linux-x64.tar.gz' /var/cache/oracle-java7-installer/

mv: cannot move `/home/maverick/Desktop/jdk-7u3-linux-x64.tar.gz' to `/var/cache/oracle-java7-installer/': Not a directory
Should be

sudo mv /home/maverick/Desktop/jdk-7u3-linux-x64.tar.gz /var/cache/oracle-java7-installer/jdk-7u3-linux-x64.tar.gz

Sent from my ADR6400L using RootzWiki
 

·
Android Apprentice
Joined
·
320 Posts
Should be

sudo mv /home/maverick/Desktop/jdk-7u3-linux-x64.tar.gz /var/cache/oracle-java7-installer/jdk-7u3-linux-x64.tar.gz

Sent from my ADR6400L using RootzWiki
I still get this error
mv: cannot move `/home/maverick/Desktop/jdk-7u3-linux-x64.tar.gz' to `/var/cache/oracle-java7-installer/jdk7u3-Linux-x64.tar.gz': No such file or directory
 

·
WTF YOU LOOKIN AT&#33;
Joined
·
287 Posts
Discussion Starter · #15 ·
Before you tried to move the package did you do:

sudo apt-get install oracle-java7-installer

Sent from my ADR6400L using RootzWiki
 
1 - 16 of 16 Posts
Top