Java ME中是否提供所有Java SE类? [英] Are all Java SE classes available in Java ME?

查看:81
本文介绍了Java ME中是否提供所有Java SE类?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Java新手.想知道Java ME中是否所有可用的Java SE类.如果不是,为什么呢?

I'm a Java newbie. Wanted to know if all Java SE classes are available in Java ME. If not why is it so?

推荐答案

否,只有一个子集可用,请参见 http://java.sun.com/javame/technology/index.jsp 进行介绍.

No, only a subset is available, see http://java.sun.com/javame/technology/index.jsp for an introduction.

此Wikipedia文章:

值得注意的局限性

Java SE 环境相比,完全没有几个API,有些是进行了更改,以使代码需要进行显式更改才能支持CLDC.特别是,某些更改不仅是缺少类或接口,而且实际上是在基类库中更改现有类的签名.例如,缺少Serializable接口,由于对反射用法的限制,该接口未出现在基类库中.因此,通常实现Serializable的所有java.lang.*类均不实现此标记接口.

Noteworthy limitations

Compared to the Java SE environment, several APIs are absent entirely, and some APIs are altered such that code requires explicit changes to support CLDC. In particular, certain changes aren't just the absence of classes or interfaces, but actually change the signatures of existing classes in the base class library. An example of this is the absence of the Serializable interface, which does not appear in the base class library due to restrictions on reflection usage. All java.lang.* classes which normally implement Serializable do not, therefore, implement this tagging interface.

其他限制示例取决于所使用的版本,因为CLDC 1.1版重新引入了某些功能.

Other examples of limitations depend on the version being used, as some features were re-introduced with version 1.1 of CLDC.

  • 不支持Serializable接口.
  • Java标准版的部分反射功能:
    • java.lang.reflect软件包及其任何类均不受支持.
    • java.lang.Class上的方法,用于获取构造方法或方法或字段.
    • The Serializable interface is not supported.
    • Parts of the reflection capabilities of the Java standard edition:
      • The java.lang.reflect package and any of its classes not supported.
      • Methods on java.lang.Class which obtain Constructors or Methods or Fields.

      这篇关于Java ME中是否提供所有Java SE类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆