Yes, you can make it private, but your JRE (runtime) calls YourJar.main() which isn't available and will fail (its like what happens when you try to invoke a private method) I think it should have exact same error message (because main is called on runtime, compiler doesn't complain, because no one is calling that method, yet)
I'm not sure if I follow,
basically your java vm will simply call your class.main method, and when it finds that it's private or doesn't even exist, then it'll throw up
Yes, you can make it private, but your JRE (runtime) calls YourJar.main() which isn't available and will fail (its like what happens when you try to invoke a private method) I think it should have exact same error message (because main is called on runtime, compiler doesn't complain, because no one is calling that method, yet)
Ol, wb the class containing
main
inside it?I'm not sure if I follow,
basically your java vm will simply call your class.main method, and when it finds that it's private or doesn't even exist, then it'll throw up
Ok. Thanks.