Jump to content

  1. 0
  2. 0
  3. 0/5

Rate this Topic

- - - - -

[HOWTO] Install Java 7 on Ubuntu 12.04

  • Please log in to reply

OP orkillakilla

orkillakilla

WTF YOU LOOKIN AT!

Posted 13 April 2012 - 12:00 PM #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:

sudo add-apt-repository ppa:eugenesan/java
sudo apt-get update
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.co...ad-1501626.html

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

Third:

sudo gedit /var/lib/dpkg/info/oracle-java7-installer.postinst

Now scroll down and find the following:

		
		echo "Downloading..."
		rm -f $FILENAME
		WGETRC=wgetrc wget $PARTNER_URL 
			|| fp_exit_with_error "download failed"
		rm -f wgetrc
		echo "Download done."

Now put a # next to each line between "Downloading..." and "Downloading done."

               
		echo "Downloading..."
		#rm -f $FILENAME
		#WGETRC=wgetrc wget $PARTNER_URL 
			#|| fp_exit_with_error "download failed"
		#rm -f wgetrc
		echo "Download done."

Save, and go back to your terminal.

Finally, do:

sudo apt-get install oracle-java7-installer

Java should now install properly.

Source:

http://www.ubuntugee...untu-12-04.html (most helpful info is in the comments)


Sent from my ADR6400L using RootzWiki
  • 1 Likes
If I've helped you in some way, hit the "Thanks" button!
Follows me on Twitter: @orkillakilla

KillaSense for the ThunderBolt

Maverick39

Maverick39

Android Apprentice

Posted 28 April 2012 - 06:38 PM #2

I can't get the download to move to /var/cache/oracle-java7-installer/ a little help please and thank you

Edited by Maverick39, 28 April 2012 - 06:39 PM.

  • 0 Likes

OP orkillakilla

orkillakilla

WTF YOU LOOKIN AT!

Posted 28 April 2012 - 09:05 PM #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
  • 0 Likes
If I've helped you in some way, hit the "Thanks" button!
Follows me on Twitter: @orkillakilla

KillaSense for the ThunderBolt

Maverick39

Maverick39

Android Apprentice

Posted 28 April 2012 - 10:12 PM #4

Be sure you do sudo before the move command.

Sent from my ADR6400L using RootzWiki





thanks for the help
  • 0 Likes

nocoast

nocoast

Android Guru

Posted 29 April 2012 - 06:23 AM #5

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?
  • 0 Likes

marty331

marty331

Android Beginner

Posted 01 May 2012 - 09:22 AM #6

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>
  • 0 Likes

nmyeti

nmyeti

Android Beginner

  • 78 posts

Posted 01 May 2012 - 10:06 AM #7

nevermind

Edited by nmyeti, 01 May 2012 - 10:06 AM.

  • 0 Likes

USSENTERNCC1701E

USSENTERNCC1701E

Average Android

Posted 01 May 2012 - 11:11 AM #8

Could you actually build with Java 7? The AOSP page says you need JDK6 for Gingerbread and JDK5 for <Froyo.
  • 0 Likes

raptastics

raptastics

Member

Posted 01 May 2012 - 01:24 PM #9

Just came to ask the same thing. I think JDK6 is the limit for Android application development as well.

  • 0 Likes
Know of a sweet app, trick, mod, or hack for your Android device? Send us a tip! tips@rootzwiki.com

OP orkillakilla

orkillakilla

WTF YOU LOOKIN AT!

Posted 01 May 2012 - 01:26 PM #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
  • 0 Likes
If I've helped you in some way, hit the "Thanks" button!
Follows me on Twitter: @orkillakilla

KillaSense for the ThunderBolt