Jump to content


- - - - -

[HOWTO] Install Java 7 on Ubuntu 12.04


  • Please log in to reply

#1 orkillakilla (OP)

orkillakilla

    WTF YOU LOOKIN AT!

  • Members
  • 287 posts

Posted 13 April 2012 - 12:00 PM

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
If I've helped you in some way, hit the "Thanks" button!
Follows me on Twitter: @orkillakilla

KillaSense for the ThunderBolt

#2 Maverick39

Maverick39

    Android Apprentice

  • 319 posts

Posted 28 April 2012 - 06:38 PM

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.


#3 orkillakilla (OP)

orkillakilla

    WTF YOU LOOKIN AT!

  • Members
  • 287 posts

Posted 28 April 2012 - 09:05 PM

View PostMaverick39, on 28 April 2012 - 06:38 PM, said:

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
If I've helped you in some way, hit the "Thanks" button!
Follows me on Twitter: @orkillakilla

KillaSense for the ThunderBolt

#4 Maverick39

Maverick39

    Android Apprentice

  • 319 posts

Posted 28 April 2012 - 10:12 PM

View Postorkillakilla, on 28 April 2012 - 09:05 PM, said:

Be sure you do sudo before the move command.

Sent from my ADR6400L using RootzWiki




thanks for the help

#5 nocoast

nocoast

    Android Guru

  • 1,662 posts

Posted 29 April 2012 - 06:23 AM

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?

#6 marty331

marty331

    Android Beginner

  • Members
  • 8 posts

Posted 01 May 2012 - 09:22 AM

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>

#7 nmyeti

nmyeti

    Android Beginner

  • Members
  • 78 posts

Posted 01 May 2012 - 10:06 AM

nevermind

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


#8 USSENTERNCC1701E

USSENTERNCC1701E

    Average Android

  • 188 posts

Posted 01 May 2012 - 11:11 AM

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

#9 raptastics

raptastics

    Member

  • Members
  • 17 posts

Posted 01 May 2012 - 01:24 PM

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

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

#10 orkillakilla (OP)

orkillakilla

    WTF YOU LOOKIN AT!

  • Members
  • 287 posts

Posted 01 May 2012 - 01:26 PM

View Postraptastics, on 01 May 2012 - 01:24 PM, said:

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
If I've helped you in some way, hit the "Thanks" button!
Follows me on Twitter: @orkillakilla

KillaSense for the ThunderBolt