I have created a java project following these steps:
1.File->java project
2. Created the package.
3. Created the main class.
Wrote the simple program to print hello world
package misc;
public class MyMainClass {
public static void main(String[] args) {
System.out.println("Hello World");
}
}
but I get the error when I run the program
Launch configuration GrammaticalStructure.1 references non-existing project begins.
Could you please let me know what can be the reason for it?
Please try to run it by right-clicking on your source file and select: "Run As -> Java Application".
You can right-click on your project and select "Run As"->Run Configurations.you can edit the "Main class"
Right-click on "src" folder of your project then "Run As"->"Run Configurations" then change the "Main class" option with the name same as your driving code name. This happens because there may exist more than one main classes in the same project may be due to some testing requirement or by mistake.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With