Editor does not contain a main type error message. How to solve it?

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 on Build 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!!!

So tired!!!

Error: cannot find or load main class.

Solution: right click the project folder -- > build path -- > use as source folder.

Perfect operation!

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>