I am trying to run some java files in a new PRoject.So I make the project,put the files in it and I try to RUN the main file so my error problems happened!!!
Thanks for the stack overflow.
the Answer: Right click on the folder where you put your main class then click onBuild Path--> Use as Source Folder.
It worked!!!
OR-->
right click on the package->properties->Java Build Path->Add folder(select the folder your code reside in)
Do work either!!!
好累啊!!!
错误:找不到或无法加载主类。
解决办法:右键工程文件夹-->Build Path-->Use as Source Folder 就解决了。
完美运行!
新闻热点
疑难解答