Eclipse 更改项目的 JRE

发布于 2024-08-23 12:37:20 字数 262 浏览 3 评论 0原文

我在 eclipse 中更改了一个项目的 JRE(从 Sun 更改为 JRockit)。但是,当我尝试使用 main 方法运行类时,我收到弹出错误消息 “无法找到主类。程序将退出”“线程“主线程”java 中出现异常.lang.NoClassDefFoundError: Jrockit1/5" 在控制台中。我可以看到该项目已重建(类文件的时间戳)。我还需要改变什么?所有这些都是针对 JRE 1.5

I changed the JRE for a project in eclipse (Sun to JRockit). But when I try to run a class with main method I get a pop-up error message "Could not find main class. Program will exit" and "Exception in thread "Main Thread" java.lang.NoClassDefFoundError: Jrockit1/5" in the console. I can see that the project got rebuilt (timestamp of class files). What else do I need to change? All of this is for JRE 1.5

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

心凉怎暖 2024-08-30 12:37:20

当您查看运行配置时,它使用的是 Sun 还是 JRockit JVM。如果您之前创建了项目,它可能已设置为 Sun JVM;它可能找不到一些 JRockit 特定的类。

When you look at the Run configuration, does it use Sun or JRockit JVM. If you created your project before, it could have been set to the Sun JVM; which maybe cannot find some JRockit-specific classes.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文