In Eclipse, when you create a new class, you can choose the option “What stub methods you would like to create:” and you can choose “ public static void main (String args []) ”.
I created a class with the main method, but I did not check this option, and I get this error: " selection does not contain the main type in eclipse ". How can I show Eclipse that I have the main method in the class without deleting / re-creating the class file?
Later Edit: :) Guilty: My main method is as follows: public static void main (String args) , and because of this I got an error.
source
share