I want to understand what happens when I run:
java -jar some.jar
from command line.
I know that in order to launch a java program, it must contain main()
method so should I assume that the jar
file I am running has such main()
method in one of its classes and just runs it by default? In such case, what if there is more than one class that has main()
method as I don't believe there are any restrictions on how many classes can have main()
methods.