An Android device doesn't run "Java", it runs Dalvik bytecode. To simplify: you use Java to compile your ".java" source code into binary .class, which is Java bytecode for the JVM. But the android tool chain then transforms this into dalvik bytecode (aka ".dex"). You could think of Java has being a pre-compiler.
To come back to your question the Android tools will work with both Java 1.5 or Java 1.6; in either case this is just a matter of compiler choice and a few syntax details (e.g. @override on interfaces). It will not affect the classes available, which are dictated by the Android platform you selected. To finish, Java version numbers are a bit confusing but the bottom line is that 1.5 == 5.0 and 1.6 == 6.0. If you want details, check this: http://java.sun.com/j2se/1.5.0/docs/relnotes/version-5.0.html R/ On Wed, Apr 22, 2009 at 10:11 AM, Keith Wiley <[email protected]> wrote: > > Simple question, I did a cursory search on the dev guide and didn't > get any obvious hits, although maybe I missed it (there's something > about JDK versions, but they don't correlate to 1.5 or 1.6, they are > more like 5 or 6 if you get my meaning). I would like to use Java 1.6 > for some things. In particular, I provides much better Collection > interfaces. Before I go to all the trouble is switching everything > over (which I'm kinda unclear about anyway (Mac version, Mac Java > version, Eclipse version, Android SDK/JDK/JRE/ AAH!), I just want to > know if it's a fruitless endeavor. Can I use Java 1.6 on an Android > device? > > Thanks for any clarification. > > Cheers! > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

