显示“用于Java/util/Comparator的NoClassDefinationFound";虽然添加了jre来构建路径 [英] Shows "NoClassDefinationFound for java/util/Comparator" though added jre to build path

查看:88
本文介绍了显示“用于Java/util/Comparator的NoClassDefinationFound";虽然添加了jre来构建路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在win7上使用j2me + S60 symbian SDK,最初我已经安装了jdk6和IDE(Eclipse),然后安装了SDK S60. 但正如您所知,j2me仅支持项目的1.3遵从级别,因此,我下载了jdk1.3.1_28并将其添加到 首选项-> Java-> installJRE.

I am using j2me + S60 symbian SDK on win7, initially i've installed with jdk6 and IDE(Eclipse) then i install SDK S60. But as you know that j2me supports only 1.3 compliance level for projects so, i downloaded jdk1.3.1_28 and install it added it to preference -> Java -> installJREs.

所以现在它将添加到新项目的构建路径中,但是如果我使用Comparator(java.util.Comparator)类,它并没有要求我添加1.3 jre来构建路径,则不会发生.

So now it will added to build path of new project, but it's not happening if i use Comparator (java.util.Comparator) class it ask me to add 1.3 jre to build path.

我做到了,但仍然显示"NoClassDefinationFound for java/util/Comparator"的错误.

I did it but still showing error that " NoClassDefinationFound for java/util/Comparator ".

如果我删除了添加的参考库(jre1.3.1),然后在类(例如,我使用的Hashmap,Comparator,StringTokenizer)上显示错误,请提供创建类的建议或要求添加jre1.3.1来构建路径项目.

If i remove that added reference library(jre1.3.1) then shows error on classes such as (Hashmap, Comparator, StringTokenizer which i've used), give suggestions to create class or ask to add jre1.3.1 to build path of project.

我不明白为什么会这样..请帮助....

I don't understand why its happening .. please help....

推荐答案

您尝试使用的某些类不是Java ME的一部分.您必须注意CLDC和MIDP版本以及它们带来的类.

如果要使用Eclipse开发Java ME应用程序,则应使用Pulsar http://www.eclipse .org/pulsar/

Some classes you are trying to use are not part of Java ME. You must pay attention to CLDC and MIDP versions and which classes they bring.

If you want to develop a Java ME app using Eclipse, you should use Pulsar http://www.eclipse.org/pulsar/

这篇关于显示“用于Java/util/Comparator的NoClassDefinationFound";虽然添加了jre来构建路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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