So I just installed JRE, JDK and Eclipse and I was trying to run this famous HelloWorld code, but it shows this message as in attached images. What's the ant build?
Thanks!
dont run it as ant, right click on your file in eclipse select run as then choose java application
It looks like you don't have your file in your buildpath (what eclipse uses to figure out what files it should compile). Right click on the folder and select Buildpath -> Use as Source folder. Now when you hit run it should hopefully work.
Best way is to Delete all eclipse files in your pc and again download eclipse and install it. Definitely works
Click Run As > Java.
If Java is not available there, click Run Configurations > JRE.
Choose "Execution environment" , click Environments and choose the Java version you want to use. Click Apply, Run.
That should do it.
Try to create a Java class file with suitable name and method.This error usually occurs when compiler doesn't understand which file to execute.
main
method.
Simply click the javadoc next to your console and run it
Run Configuration
?