gpt4 book ai didi

java - Eclipse IDE 中的 AccessController.doPrivileged() 问题

转载 作者:太空宇宙 更新时间:2023-11-04 14:33:37 25 4
gpt4 key购买 nike

我是java新手。我想在 Eclipse IDE 中运行一个简单的 hello world 应用程序。

public class Hello
{
public static void main( String[] args ) {
System.out.println("hello");
}
}

我在控制台中收到错误:

at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
Could not find the main class: com.tutorialspoint.demo.hr.model.Hello. Program will exit.

最佳答案

您发布的错误包含一行

"Could not find the main class: com.tutorialspoint.demo.hr.model.Hello"

运行程序时,请确保您的类文件(即 Hello.class)位于此位置“com.tutorialspoint.demo.hr.model.Hello”

关于java - Eclipse IDE 中的 AccessController.doPrivileged() 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25843319/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com