2

I'm setting up Android Development Environment on my Macbook Air running OS X 10.8 Mountain Lion.

I have installed JDK for mac by downloading from oracle website. Then I run java -version which shows java version "1.7.0_13"

Then I downloaded ADT bundle for MAC from http://developer.android.com/sdk/index.html

Then I ran eclipse and it shows a install dialog to install java. it says

To open “Eclipse,” you need a Java SE 6 runtime. Would you like to install one now?

Why is it asking for java, when I already installed java?

And Java is included in my path too. What went wrong?

lightsaber
  • 1,481
  • 18
  • 37
  • 1
    FYI you will need Java 6 (the JDK) at some point, I don't believe Android apps can build with 1.7 alone. (http://stackoverflow.com/questions/8578441/can-the-android-sdk-work-with-jdk-1-7) – Kristopher Micinski Feb 05 '13 at 15:02
  • I read readme with eclipse and it says that eclipse is tested on JRE 10.6. I guess, It'll cause me problem if I use 10.7. So I Uninstalled 10.7 and installed 10.6. Now Eclipse works. @Kristopher Thanks!! – lightsaber Feb 05 '13 at 15:40
  • Yeah, unfortunately the Android (and Eclipse, apparently..) world hasn't really made the jump to 1.7 yet :-) – Kristopher Micinski Feb 05 '13 at 15:45
  • I have 1.7 SE JRE for running eclipse, and 1.6 JDK for building android. Works fine. Android builder can't build application using JDK >= 1.7 – neworld Feb 05 '13 at 16:08

2 Answers2

0
  • JDK - Java Development Kit
  • JRE - Java Runtime Environment
  • Java SE - Java Standard Edition

SE defines a set of capabilities and functionalities; there are more complex editions (Enterprise Edition - EE) and simpler ones (Mobile Edition - ME - for mobile environments).

The JDK includes the compiler and other tools needed to develop Java applications; JRE does not. So, to run a Java application someone else provides, you need JRE; to develop a Java application, you need JDK.

So its not a reinstall.

Marckaraujo
  • 7,422
  • 11
  • 59
  • 97
  • Please read question again: _To open “Eclipse,” you need a Java SE 6 runtime. Would you like to install one now?_ and he has JRE 1.7 already: _Then I run java -version which shows java version "1.7.0_13"_ – neworld Feb 05 '13 at 14:38
  • 1
    Its not the same Java content, so Yes he needs to install, just do it, what he wants more? Install this and start to work. – Marckaraujo Feb 05 '13 at 15:54
  • @Marckaraujo running `java -version` gave following output ➜ ~ java -version java version "1.7.0_13" Java(TM) SE Runtime Environment (build 1.7.0_13-... Which clearly shows that I had JRE. btw, I resolved the issue by using JDK 1.6. Eclipse readme says that it has been tested to work upto jdk 1.6 on MAC. Readme says that it's tested for Oracle Java 7 Update 2 for windows. I'm using MAC. So Opting for 1.6 is probably right for me and I did that. on my Mac, Eclipse now works with **java version "1.6.0_37"** :) – lightsaber Feb 05 '13 at 17:01
  • @StarWars, Welcome to the club that uses MAC to develop Android content, just dont forget to make this answer the correct one, may the force be with you! – Marckaraujo Feb 05 '13 at 17:09
0

I believe Eclipse for Mac is broken. I ran into the same problem even though I had just installed Java7. I've used Eclipse ADT with Java7 on my PC before.

Chloe
  • 25,162
  • 40
  • 190
  • 357