this example will show you how, i got this code from the net, and i hope someone will support this, i just like to share this tricky way on how to execure something WITHOUT A MAIN method
public class NoMain { static { System.out.println("No Main!"); System.exit(0); } }
i tried to run this in my IDE, but the JVM complies that the class dont have any methods
try to run it in a command - line.. you will see that it will execute normally like any other class with main