Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Could not find main(Irritating problem)
Could not find main [message #524902] Sat, 03 April 2010 16:41 Go to next message
Eclipse UserFriend
I have suffered time and time again from eclipse being unable to find my main class. It has wasted hours of my time on several occasions as I have been unable to find a suitable solution online. This however, for some people, may fix the problem. When declaring main eclipse requires (to find it) that you use argv. Change your "public static void main()" which DOES NOT WORK to "public static void main(String[] argv)" and this incessant little error will finally go away. Hopefully this little notice will save another.
Re: Could not find main [message #524904 is a reply to message #524902] Sat, 03 April 2010 18:07 Go to previous message
Eclipse UserFriend
public static void main() is not a valid entry point for a Java program. This isn't an Eclipse requirement it is a Java requirement. You can't run the no argument main method from the command line either.

Previous Topic:Minimalist Look and Feel
Next Topic:APT: Adjust classpath for an annotation processor
Goto Forum:
  


Current Time: Wed Mar 26 05:00:03 EDT 2025

Powered by FUDForum. Page generated in 0.06682 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top