简体   繁体   中英

Eclipse class does not compiled in a particular workspace

蚀错误

在此处输入图片说明

I have the code above running in eclipse. It is a simple piece of code which should print "hello". When I run the code, I get the error code "error: Could not find or load main class testing.hello". Is that anything wrong with my eclipse? Is it I have to reinstall the software to use it? I can run the same piece of code in other laptop.

It seems your class is not compiled and hence eclipse is not able to find the class. You can try to do this thing:

  1. Go to Project tab in Menu and click on 'Build Automatically'
  2. Now edit your hello class. Editing will initiate the class to get compiled automatically.
  3. Now try to Run the program

Hope it works!

您的班级似乎没有编译,请转到项目菜单“自动打勾”复选框,然后编辑您的hello类并保存,然后尝试以Java应用程序的形式运行

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM