无法导入内置的java类文件(javax.naming.ldap.SortControl)
我已经下载了 Openfire 源代码并开始在 Eclipse 上运行它。我收到一条错误消息,指出 javax.naming.ldap.SortControl
类不存在,如下图所示:
由于它是内置的Java类,我该怎么做才能解决这个问题。完整源代码大约有 5 条错误消息,它们的意思都相同。
I have downloaded Openfire sources and started to run it on Eclipse. I got a error saying javax.naming.ldap.SortControl
class is not there, as illustrated on the following image:
Since it is inbuilt Java class , what can i do to solve this problem. Full source has about 5 error messages, all of them are saying the same.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您的 JRE 有问题。 SortControl 应该位于 JRE 5< /a>.
There is some issue with your JRE. SortControl should be in the JRE 5.
您的 Eclipse 项目是否设置了正确的 Java 版本?正如 Thomas Jung 指出的那样,
javax .naming.ldap.SortControl
首先出现在Java 5 / 1.5中。如果项目配置为使用 Java 1.4 或更低版本,您将收到当前收到的错误。javax.naming.ldap.Control
存在于 1.3 及更高版本中,并且没有错误,因此听起来项目/JRE 版本肯定是错误的。Is your Eclipse project set up for the correct Java version? As Thomas Jung points out,
javax.naming.ldap.SortControl
first appeared in Java 5 / 1.5. If a project is configured to use Java 1.4 or below, you'll get the error you're currently getting.javax.naming.ldap.Control
is present in 1.3 and newer, and isn't erroring, so it definitely sounds like the project/JRE version is wrong.