My project in eclipse was working all fine until I rebooted my system. On reopening the eclipse IDE, I started getting “Error: Could not find or load main class ...”. In the process to "fix" things, I deleted the .project file as well. (How very naive of me!) Now everything seems to be messed up. I cannot see my files being listed in the "Package Explorer". On opening the project it errors out saying: The project description file (.project) is missing. I still have all the source files and the compiled .class files in the respective directories.
Please help me out. Appreciate your suggestions.
Thank you!
I followed one of the suggestions (that of copying the .project file and modifying the project name). This brought back me to the stage where I could see all my files in the project explorer. But now on running the project from Eclipse, it is not able to find the Main method in the the java file (which actually contains the main()), and errors out as: Error: Main method not found in class , please define the main method as: public static void main(String[] args)
The main() method as I said is there. Its baffling how a project which I have been working on since 5 months with all things were working fine has suddenly become unusable. Could someone provide any insight on the latest error.
Thanks!
Click File > Open. Click Computer, and then on the right, choose a recent folder or click Browse. Click the project you want, and then click Open.
File created by Eclipse when creating a new project; saved in an XML format and contains the project name, build specifications, and dependencies; used for saving and loading projects into the Eclipse IDE; uses the filename .
The most important type of output file is the project file. A project file contains all of the data you have imported, all of the parameters associated with each data file, the content of the journal, and several other collections of important data. All of this gets saved in a single, easily transportable file.
< name > PROJECT_NAME < / name >
Perhaps you could just create another one with something along the lines of this (saving it as .project in the project's directory):
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Project Name</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
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