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