This week's book giveaway is in the Flex forum.
We're giving away four copies of Flex 4 in Action and have Tariq Ahmed, Dan Orlando, John C. Bland II & Joel Hooks on-line!
See this thread for details.
[Logo] JavaRanch » JavaRanch Saloon
  Search | FAQ | Recent Topics | Hot Topics
Register / Login


Win a copy of Flex 4 in Action this week in the Flex forum!
Reply Bookmark it! Watch this topic JavaRanch » Forums » Mobile » Android
 
RSS feed
 
New topic
Author

State of the Java support?

Ulf Dittmer
Sheriff

Joined: Mar 22, 2005
Messages: 26765

Reading about someone's experience on how to get the Rhino library working in Android, i noticed this statement:
java.beans.PropertyChangeListener is not available on Android.


Does that mean that the Java version running on Android is not quite conformant to the public Java API? Or does it implement some Java ME profile that doesn't have this class? (I noticed that the class is part of both the CDC Personal Basis Profile and Personal Profile, though.)

Java web chartsImageJ PluginsSpecification URLsJava FAQs
Mark L. Murphy
Author
Ranch Hand

Joined: Feb 11, 2009
Messages: 131

Does that mean that the Java version running on Android is not quite conformant to the public Java API?


Android's class library does not necessarily line up with any existing Java API from Sun. It is closest to JavaSE.

Many of the java.* and javax.* implementations are brought over from Apache Harmony, so if there is something in particular you are missing, you might search there for something you can use. For example, the whole java.beans package is missing, but you may be able to add it to your own project.

The core Android team was aiming for an API richer than JavaME yet still svelte enough to fit in a modest amount of flashable ROM alongside everything else needed to run a phone. The more ROM you need, the more expensive the device gets, on average.

Mark Murphy (a Commons Guy)
Author of The Busy Coder's Guide to Android Development http://commonsware.com/Android/
Ulf Dittmer
Sheriff

Joined: Mar 22, 2005
Messages: 26765

Thanks Mark, that makes it clearer.

Java web chartsImageJ PluginsSpecification URLsJava FAQs
Ulf Dittmer
Sheriff

Joined: Mar 22, 2005
Messages: 26765

By now, the newer Android API versions have some of the java.beans classes, and PropertyChangeListener in particular. But most of that package is still missing; compare http://developer.android.com/reference/java/beans/package-summary.html to http://java.sun.com/javase/6/docs/api/java/beans/package-summary.html

Java web chartsImageJ PluginsSpecification URLsJava FAQs
 
 
 
Reply Bookmark it! Watch this topic JavaRanch » Forums » Mobile » Android
 
RSS feed
 
New topic
IntelliJ open source