garydgregory commented on a change in pull request #14: More startup logging. URL: https://github.com/apache/commons-daemon/pull/14#discussion_r351339530
########## File path: src/native/windows/src/javajni.c ########## @@ -276,57 +276,68 @@ static BOOL __apxLoadJvmDll(APXHANDLE hPool, LPCWSTR szJvmDllPath, LPCWSTR szJav } } - /* Add java bin path to the PATH to fix loading of awt.dll */ + /* Add Java bin path to the PATH to fix loading of awt.dll */ + apxLogWrite(APXLOG_MARK_DEBUG "Adding Java bin path to the PATH to fix loading of awt.dll: '%S'", jreBinPath); apxAddToPathW(hPool, jreBinPath); /* Set the environment using putenv, so JVM can use it */ apxSetInprocEnvironment(); - apxLogWrite(APXLOG_MARK_DEBUG "loading jvm '%S'", dllJvmPath); + apxLogWrite(APXLOG_MARK_DEBUG "Loading JVM DLL '%S'", dllJvmPath); _st_sys_jvmDllHandle = LoadLibraryExW(dllJvmPath, NULL, 0); if (IS_INVALID_HANDLE(_st_sys_jvmDllHandle) && GetFileAttributesW(dllJvmPath) != INVALID_FILE_ATTRIBUTES) { /* There is a file but cannot be loaded. * Try to load the MSVCRTxx.dll before JVM.dll */ + apxLogWrite(APXLOG_MARK_ERROR "Found '%S' but couldn't load it.", dllJvmPath); + WCHAR crtBinPath[SIZ_PATHLEN]; lstrlcpyW(jreBinPath, SIZ_PATHLEN, dllJvmPath); if(l == 2) { lstrlcpyW(crtBinPath, SIZ_PATHLEN, jreBinPath); lstrlcatW(crtBinPath, SIZ_PATHLEN, MSVCRT71_DLLNAME); if (GetFileAttributesW(crtBinPath) != INVALID_FILE_ATTRIBUTES) { + apxLogWrite(APXLOG_MARK_DEBUG "Loading '%S'.", crtBinPath); if (LoadLibraryW(crtBinPath)) { /* Found MSVCRTxx.dll */ - apxLogWrite(APXLOG_MARK_DEBUG "preloaded '%S'", - crtBinPath); - } + apxLogWrite(APXLOG_MARK_DEBUG "Preloaded '%S'", crtBinPath); + } Review comment: Dang, sorry about that. Fixed. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services