6596475: (launcher) javaw should call InitCommonControls
Javaw does not show error window after manifest changes. Reviewed-by: darcy
This commit is contained in:
parent
5cd758db4c
commit
86d2ba8dfc
@ -107,6 +107,7 @@ endif # PLATFORM
|
||||
|
||||
ifeq ($(PLATFORM), windows)
|
||||
EXTRA_LIBS = advapi32.lib \
|
||||
comctl32.lib \
|
||||
user32.lib
|
||||
|
||||
JAVALIB =
|
||||
|
@ -43,7 +43,7 @@ include $(BUILDDIR)/common/Defs.gmk
|
||||
|
||||
# Override the default version info with our own resource file (see 5106536)
|
||||
ifeq ($(PLATFORM), windows)
|
||||
LDLIBS_COMMON += user32.lib
|
||||
LDLIBS_COMMON += user32.lib comctl32.lib
|
||||
ifdef OPENJDK
|
||||
RC_FLAGS += -i "$(PLATFORM_SRC)/resource/icons"
|
||||
else
|
||||
|
@ -46,7 +46,7 @@ STATIC_JLI = true
|
||||
include $(BUILDDIR)/common/Defs.gmk
|
||||
|
||||
OTHER_CPPFLAGS += -DJAVAW
|
||||
LDLIBS_COMMON += user32.lib
|
||||
LDLIBS_COMMON += user32.lib comctl32.lib
|
||||
|
||||
# Override the default version info with our own resource file (see 5106536)
|
||||
ifeq ($(PLATFORM), windows)
|
||||
|
@ -205,9 +205,7 @@ JLI_Launch(int argc, char ** argv, /* main argc, argc */
|
||||
_wc_enabled = cpwildcard;
|
||||
_ergo_policy = ergo;
|
||||
|
||||
if (javaw == JNI_TRUE)
|
||||
SetJavaw();
|
||||
|
||||
InitLauncher(javaw);
|
||||
DumpState();
|
||||
|
||||
/*
|
||||
|
@ -172,7 +172,6 @@ const char* GetDotVersion();
|
||||
const char* GetFullVersion();
|
||||
jboolean IsJavaArgs();
|
||||
jboolean IsJavaw();
|
||||
void SetJavaw();
|
||||
jint GetErgoPolicy();
|
||||
|
||||
jboolean ServerClassMachine();
|
||||
@ -180,5 +179,9 @@ jboolean ServerClassMachine();
|
||||
static int ContinueInNewThread(InvocationFunctions* ifn, int argc, char** argv,
|
||||
char* jarfile, char* classname, int ret);
|
||||
|
||||
/*
|
||||
* Initialize platform specific settings
|
||||
*/
|
||||
void InitLauncher(jboolean javaw);
|
||||
|
||||
#endif /* _JAVA_H_ */
|
||||
|
@ -64,8 +64,6 @@ main(int argc, char ** argv)
|
||||
margv = argv;
|
||||
#endif /* JAVAW */
|
||||
|
||||
JLI_SetTraceLauncher();
|
||||
|
||||
return JLI_Launch(margc, margv,
|
||||
sizeof(const_jargs) / sizeof(char *), const_jargs,
|
||||
sizeof(const_appclasspath) / sizeof(char *), const_appclasspath,
|
||||
|
@ -1299,12 +1299,6 @@ void SetJavaLauncherPlatformProps() {
|
||||
AddOption(pid_prop_str, NULL);
|
||||
#endif
|
||||
}
|
||||
void
|
||||
SetJavaw()
|
||||
{
|
||||
/* noop on UNIX */
|
||||
return;
|
||||
}
|
||||
|
||||
jboolean
|
||||
IsJavaw()
|
||||
@ -1312,3 +1306,9 @@ IsJavaw()
|
||||
/* noop on UNIX */
|
||||
return JNI_FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
InitLauncher(jboolean javaw)
|
||||
{
|
||||
JLI_SetTraceLauncher();
|
||||
}
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <wtypes.h>
|
||||
#include <commctrl.h>
|
||||
|
||||
#include <jni.h>
|
||||
#include "java.h"
|
||||
@ -52,11 +53,6 @@ static jboolean GetJREPath(char *path, jint pathsize);
|
||||
|
||||
static jboolean _isjavaw = JNI_FALSE;
|
||||
|
||||
void
|
||||
SetJavaw()
|
||||
{
|
||||
_isjavaw = JNI_TRUE;
|
||||
}
|
||||
|
||||
jboolean
|
||||
IsJavaw()
|
||||
@ -999,3 +995,20 @@ ContinueInNewThread0(int (JNICALL *continuation)(void *), jlong stack_size, void
|
||||
|
||||
/* Linux only, empty on windows. */
|
||||
void SetJavaLauncherPlatformProps() {}
|
||||
|
||||
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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user