File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java SE and Android

 
Peter Sorotokin
Ranch Hand
Posts: 36
1
Java Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In a book about Android is said :
From the mobile application developer’s perspective, Android is a Java environment, but the runtime isn’t strictly a Java VM. This accounts for the incompatibilities between Android and proper Java environments and libraries . If you have a code library that you want to reuse, your best bet is to assume that your code is nearly source compatible, attemp to compile it into an Android project , and then determine how close you are to having usable code.

I heard some packages like Swing and AWT does not work with Android . But in this book is said that every Java SE source code could be compiled under Android and that will work . What is the true thing about relation between Java SE and Android ? Are Swing and AWT source codes compiled and run under Android ?
Thanks
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Swing and AWT do not exist in Android, so while you can compile an Android app that uses them (because you're using a regular JDK for that), any attempt to run that code will end in tears

The Android libraries are most of Java 5 (except parts such as AWT and Swing and ImageIO), plus some extra stuff from Java 6, plus Apache Commons HttpClient and JSON.org, plus the android.* packages.

http://developer.android.com/reference/packages.html has all the available packages.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic