Which JDK for Android Development on Ubuntu 10.04 64-bit?
Asked Answered
B

3

2

Ubuntu 10.04 64-bit looks promising as a development environment for Android. I now have it up and running but I am stuck at the following decision point:

  1. Synaptic Package Manager has 'default-jdk' ("Standard Java or Java compatible Development Kit").

sun.com has two "Java SE Development Kit 6u23 for Linux x64, Multi-language":

  1. Java SE Development Kit 6u23: jdk-6u23-linux-x64-rpm.bin
  2. Java SE Development Kit 6u23: jdk-6u23-linux-x64.bin

Which one is the right one for Android development using eclipse-SDK-3.6.1-linux-gtk-x86_64.tar.gz?

Bun answered 2/1, 2011 at 2:26 Comment(0)
E
2

The one for synaptic will work just fine.

Java SE Development Kit 6u23: jdk-6u23-linux-x64-rpm.bin

RPM == Redhat Package Manager... so, don't use it since you are using Ubuntu.

Java SE Development Kit 6u23: jdk-6u23-linux-x64.bin

With that bundle it will work just fine. You will need to configure manually the path and things like that.

Extremely answered 2/1, 2011 at 2:30 Comment(4)
thanks and +1. Could you please clarify which, among the two that "will work just fine", is preferred? Are they essentially the same?Bun
OK, I think I found the answer, thanks to coderanch.com/t/111114/Linux-UNIX/JDK-Ubuntu which suggests that it's better to have the synaptic JDK first and only install SUN's one if needed.Bun
That's probably not specific to android.Bouillon
your statement "The one for synaptic will work just fine." turned out to be correct. :)Bun
B
1

Install sun's java JDK. You can follow this guide.

http://beeznest.wordpress.com/2010/04/23/howto-install-suns-java-on-ubuntu-lucid-lynx-10-04/

Edit Link edited. That was for the java plugin

Another Edit

I'm not sure about ia32-libs or whatever. I've never had to do it. What did you install when you first brought the system up? I've always done:

sudo apt-get install ubuntu-restricted-extras build-essential linux-headers-`uname -r`

And that pretty much installs everything I need. I think on maverick that installs sun-java as well, but not entirely sure.

Bouillon answered 2/1, 2011 at 3:30 Comment(6)
Thanks @Falmarri. I am still confused however. Android's website mentions the requirement to install ia32-libs, which is not mentioned in the link you brought. Which one is correct?Bun
@Falmarri, it sounds like you are suggesting a 4th way. Which version of Ubuntu are you using? Is it 64-bit? Is your Eclipse 64-bit? Are you developing for Android on your Ubuntu?Bun
I run Kubuntu maverick 64. Though I've also done this on 10.04, 9.10 and 9.04. All kubuntu, all 64 bit. Yes I extensively develop for android and I use 64 bit eclipse and 64 bit JVMBouillon
@Falmarri, thanks. Now things are clearer. I will report back what I did and how it works.Bun
+1 for outlining what worked for you. It turns out that support for Android development under Linux is changing often and documentation becomes outdated quickly. I will post what worked for me.Bun
@Android Eve: It's definitely true that it's changing a lot. Linux (especially the *buntus) are progressing very quickly and there's lots of changes. But also android is progressing at the same pace. There's lots of fundamental changes that google is making. The problem is that a lot of this comes down to personal preference.Bouillon
B
0

Then again, http://developer.android.com/sdk/installing.html seems to suggest a different approach:

  1. apt-get install ia32-libs
  2. apt-get install sun-java6-jdk

Update: It turns out that without the ia32-libs, adb will refuse to run. So, the requirement for both ia32-libs (on 64-bit Ubuntu) and the JDK as outlined on the android website is still valid.

The HelloAndroid basic application runs just fine from within Eclipse, when only the 'default-jdk' from Synaptic is installed. So, it seems that 'sun-java6-jdk' is not mandatory and @Cristian was right, so I will shortly mark his answer as accepted.

Bun answered 2/1, 2011 at 3:4 Comment(2)
Synaptic is just a GUI for apt-get, so you will be installing the Synaptic's package.Extremely
OK, but I am still confused: (1) Is Android's web page stating that ia32-libs are required still relevant? (2) If so, why is referring to Eclipse 3.3 when we are now at 3.6? Does this mean it's outdated?Bun

© 2022 - 2024 — McMap. All rights reserved.