i suspect that the signature of your method is wrong. it has to be exactly:
public static void main(string)
otherwise it won't work. naming the method
main will fail, omitting the argument to the method will fail. also, i think the class needs to be public.
are you sure that you have a method of the type
public static void main(string args)
you should check if you have no typos in your code. maybe you could post an example of your main-method's head.
one shortcut that really helps me, eclipse has syntax suggestions, and if you type "main" into the terminal window and hit control + space, you can choose main method and it'll populate it complete with enclosed braces. helpful if you're not always quick to remember syntax off the top of your head!
- Eclipse: How to set the main method for a project?
- How to set Run Configuration and Debug Configuration in Eclipse to choose the class that has the main method as the start-up class?
- how to set Main class path in Eclipse Oxygen for a Maven project
- How to create the pom.xml for a Java project with Eclipse
- How to change the background color for changed files in eclipse project explorer?
- How do I modify the set method signature that Eclipse auto generates?
- How to set up the Eclipse for remote C debugging with gdbserver?
- Eclipse - how to simultaneously switch working set for project explorer, call hierarchy, and search?
- How do I set the Java Doc for google drive api for android in Eclipse
- How do you get Eclipse to auto-generate a main method for a new Java class?
- Eclipse - how to set javadoc warnings only to specific folders, not the whole project
- How to set the C++ file extension to .cc in Eclipse for files created when starting a new project?
- How to debug a plugin in Eclipse - i.e. a Java project without a Main method
- How to fix the error: test source folder 'src/test/java' in project must have an output folder that is not also used for main source"?
- How to set the proxy configuration for a headless Eclipse application on Windows
- How to set the correct URL for eclipse PHP debugging
- How to make the runnable jar file for a maven eclipse project with hibernate configuration
- How to add Gradle nature for Gradle 2.0 to the Eclipse project
- How to create a jar file for the eclipse plugin project that should be able to download and run without eclipse software?
- How to set javadoc path for a jar in a project using Eclipse
- How do I fold code for comment blocks inside method blocks in the Eclipse IDE
- How do I set the Eclipse preference for where to put the + when breaking a String up over multiple lines?
- How to setup the project & workspace for building Androlate; an Eclipse Plugin
- Creating a war file of the whole project and a jar file for a class with main method (along with the dependent classes and jar files) using maven
- How to set the target version for runnable jar in Eclipse
- get all the classes with main method in Eclipse Java project
- How can I make Maven set up (and keep up to date) the build path for my Eclipse project?
- How do I set the build path for E-P-I-C in Eclipse Galileo?
- Set up project relationships for the "Close Unrelated Projects" option in Eclipse
- How to make the VJET plugin fully working in eclipse for my node.js project
More Query from same tag
- Recommended Eclipse-friendly checkstyle configuration for java open source projects?
- How to request permissions during run time when using Gluon mobile environment?
- Java - Restart a program running in eclipse
- m2e-wtp error: <path>/target/m2e-wtp/web-resources/META-INF/MANIFEST.MF (No such file or directory)
- Why is Maven including multiple versions of the same dependency?
- Eclipse Icons license information
- Can't read ... AndroidManifest.xml - while attempting Android Notepad Tutorial - Exercise 1
- Is it possbile to use Java SE version above 8 in Eclipse or any other IDE?
- jetty upgrade 8 to 9 missing classes
- JavaMail Type mismatch: cannot convert from MimeBodyPart to BodyPart
- Is eclipse's Garbage Collector different than the default?
- How to pass value of class in other class?
- How do I uninstall Android Eclipse after installing Android Studio on Windows
- Eclipse 3.5 Cache Problem
- Eclipse - glassfish can't start because org.xml.sax.SAXParseException;
- java files containing unicode don't compile
- Eclipse, Git pull to existing repository, where are new projects
- Eclipse - Clicking in XML content deletes/rearranges it?
- TestNg installation problem even though getting link from updated testng.org
- Although I don't want the edit box to remain focused, I'd like the blue focus boarder to stay?
- Problem with Webview app
- New to Aptana, two questions on deployment
- simple jsp with connection on database
- Java error NoSuchAlgorithmException while compiling program with Eclipse
- How to apply fomatter and template settings to multiple projects in Eclipse?
- android progress bar for android browser
- Fresh install of Eclipse Mars won't run
- Eclipse + AppEngine =? autocomplete
- Multiple JavaFX application.launch() from Plugin Jobs
- eclipse ant build failed Unable to delete file lib\build