How compatible is the Java implementation on Android?

Is there any definition that states which standard class libraries are supported on Android?

Suppose we build a jar library and compile it using JavaSE. This library may be used by the JavaSE server application and / or on the JSP server.

Are there any ways to know in advance if dex androids can compile this library into Dalvik bytecode? Other means besides Trial & Error i mean :).

+6
java android
source share
2 answers

ZDNet has a comparison , but this is with the RC days of Android 1.0 (early 2008). Comparison of ZDNet is โ€œnot supportedโ€ with the current Android and Java SE docs, there are several changes:

  • java.applet: unsupported
  • java.awt: partial (several classes in java.awt.font)
  • java.beans: partial
  • java.lang.management: unsupported
  • java.rmi: unsupported
  • javax.accessibility: unsupported
  • javax.activity: unsupported
  • javax.imageio: unsupported
  • javax.management: unsupported
  • javax.naming: unsupported
  • javax.print: unsupported
  • javax.rmi: unsupported
  • javax.security.auth.kerberos: unsupported
  • javax.security.auth.spi: unsupported
  • javax.security.sasl: unsupported
  • javax.swing: unsupported
  • javax.transaction: unsupported
  • javax.xml (except for javax.xml.parsers): partially (no binding, crypto, soap, stream, transform.stax, ws)
  • org.ietf. *: unsupported
  • org.omg. *: unsupported
  • org.w3c.dom. * (subpackages): partial (missing bootstrap, events, some classes in ls)

Also note that Android integrates some Java Java APIs (jUnit, HttpClient, JSON, etc.).

+4
source share

You can look at the Android class library and make sure that you only use the classes and methods that are listed there.

However, there is no way to replace it.

+6
source share

All Articles