As far as I know, the command line has to do with java main method being public, The central issue and maybe most troublesome as well. I made a decent attempt to locate a valid justification for this inquiry in all great learning material in my compass, yet nothing demonstrated enough.
Along these lines, my examination says (in the same way as other others): the main method is public with the goal that it very well may be open all over and to each protest, which may want to utilize it for dispatching the application.
Here, I am not saying that JDK/JRE had comparable reasons on the grounds that java.exe or javaw.exe (for windows) utilize Java Native Interface (JNI) calls to conjure technique, so they can have summoned it whichever way regardless of any entrance modifier.
Note; on the off chance that you don't ensure the main method public, there is no aggregation mistake.