in src/main/cpp/ide/nblauncher.cpp [175:218]
bool NbLauncher::initBaseNames() {
char path[MAX_PATH] = "";
getCurrentModulePath(path, MAX_PATH);
logMsg("Executable: %s", path);
char *bslash = strrchr(path, '\\');
if (!bslash) {
return false;
}
appName = bslash + 1;
appName.erase(appName.rfind('.'));
if (ARCHITECTURE == 64) {
appName = appName.erase(appName.length() - 2);
}
logMsg("Application name: %s", appName.c_str());
*bslash = '\0';
bslash = strrchr(path, '\\');
if (!bslash) {
return false;
}
*bslash = '\0';
/* Useful messages for debugging character set issues. On Java versions where
https://bugs.openjdk.org/browse/JDK-8272352 has been fixed, NetBeans should now run fine when
there are Unicode characters in the NetBeans installation path, the JDK path, the user/cache
directory paths, or in the java.io.tmpdir path (the latter sometimes being a problem for JNA,
which is used by FlatLAF). Since the JVM is started in-process via JNI, the Java environment
will inherit the UTF-8 code page setting that we have set in the launcher's application
manifest, without requiring the user to change regional settings in the Control Panel. (JEP 400
might eventually do something similar for the java.exe/javaw.exe executables. See
https://www.mail-archive.com/core-libs-dev@openjdk.java.net/msg80489.html .) */
logMsg("ANSI code page per GetACP() : %d", GetACP());
logMsg("ANSI code page per GetConsoleCP() : %d", GetConsoleCP());
logMsg("ANSI code page for GetThreadLocale() : %d", GetAnsiCodePageForLocale(GetThreadLocale()));
logMsg("ANSI code page for GetUserDefaultLCID() : %d", GetAnsiCodePageForLocale(GetUserDefaultLCID()));
logMsg("ANSI code page for GetSystemDefaultLCID(): %d", GetAnsiCodePageForLocale(GetSystemDefaultLCID()));
baseDir = path;
logMsg("Base dir: %s", baseDir.c_str());
return true;
}