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 ?
posted 3 years ago
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.