《jdk8u源码分析》3.InitLauncher
作者:互联网
src/windows/bin/java_md.c::InitLauncher
void
InitLauncher(boolean javaw)
{
INITCOMMONCONTROLSEX icx;
/*
* Required for javaw mode MessageBox output as well as for
* HotSpot -XX:+ShowMessageBoxOnError in java mode, an empty
* flag field is sufficient to perform the basic UI initialization.
*/
memset(&icx, 0, sizeof(INITCOMMONCONTROLSEX));
icx.dwSize = sizeof(INITCOMMONCONTROLSEX);
InitCommonControlsEx(&icx);
_isjavaw = javaw;
JLI_SetTraceLauncher();
}
src/share/bin/jli_util.h::JLDEBUG_ENV_ENTRY
#define JLDEBUG_ENV_ENTRY "_JAVA_LAUNCHER_DEBUG"
src/share/bin/jli_util.c::JLI_SetTraceLauncher
void
JLI_SetTraceLauncher()
{
if (getenv(JLDEBUG_ENV_ENTRY) != 0) {
_launcher_debug = JNI_TRUE;
//----_JAVA_LAUNCHER_DEBUG----
JLI_TraceLauncher("----%s----\n", JLDEBUG_ENV_ENTRY);
}
}
添加环境变量:_JAVA_LAUNCHER_DEBUG=1 即可通过 JLI_SetTraceLauncher() 设置 _launcher_debug = JNI_TRUE 在命令行输出JVM启动的详细信息。
标签:icx,SetTraceLauncher,JLDEBUG,源码,jdk8u,ENV,ENTRY,JLI,InitLauncher 来源: https://blog.csdn.net/weixin_37477523/article/details/88117126