Internal process for launching a main entrypoint of a class

Hassam Abdelillah :

I am curious about the whole process behind the public static void main(args[]) launching in a Java class.

If some one could points me to some classes involved in the JDK code source ?

I want to know about the process in details.

I don't know where to start !

jannis :

I believe here the main method is called (execution of CallJavaMainInNewThread method): src/java.base/share/native/libjli/java.c Line 2361

CallJavaMainInNewThread declaration: src/java.base/share/native/libjli/java.h Line 161

CallJavaMainInNewThread implementations for particular platforms:

OpenJDK source code repository: https://github.com/openjdk/jdk/

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=415868&siteId=1