mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-15 16:44:36 +02:00
Merge
This commit is contained in:
commit
1f4aa2109f
260 changed files with 5773 additions and 10761 deletions
|
@ -204,3 +204,4 @@ fd1a5574cf68af24bfd52decc37ac6361afb278a jdk8-b78
|
||||||
907a926d3c96472f357617b48b6b968ea855c23c jdk8-b80
|
907a926d3c96472f357617b48b6b968ea855c23c jdk8-b80
|
||||||
145dbc56f931c134e837b675b9e6e7bf08902e93 jdk8-b81
|
145dbc56f931c134e837b675b9e6e7bf08902e93 jdk8-b81
|
||||||
29153d0df68f84162ffe8c2cf4f402a3f2245e85 jdk8-b82
|
29153d0df68f84162ffe8c2cf4f402a3f2245e85 jdk8-b82
|
||||||
|
466685ba01bfb7bc1e1ac61490fd8c0f3cc18763 jdk8-b83
|
||||||
|
|
|
@ -43,14 +43,24 @@ fi
|
||||||
|
|
||||||
custom_hook=$custom_script_dir/custom-hook.m4
|
custom_hook=$custom_script_dir/custom-hook.m4
|
||||||
|
|
||||||
if test "x`which autoconf 2> /dev/null`" = x; then
|
AUTOCONF=$(which autoconf 2> /dev/null);
|
||||||
|
AUTOCONF_267=$(which autoconf-2.67 2> /dev/null);
|
||||||
|
|
||||||
|
echo "Autoconf found: ${AUTOCONF}"
|
||||||
|
echo "Autoconf-2.67 found: ${AUTOCONF_267}"
|
||||||
|
|
||||||
|
if test "x${AUTOCONF}" = x; then
|
||||||
echo You need autoconf installed to be able to regenerate the configure script
|
echo You need autoconf installed to be able to regenerate the configure script
|
||||||
echo Error: Cannot find autoconf 1>&2
|
echo Error: Cannot find autoconf 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo Generating generated-configure.sh
|
if test "x${AUTOCONF_267}" != x; then
|
||||||
cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | autoconf -W all -I$script_dir - > $script_dir/generated-configure.sh
|
AUTOCONF=${AUTOCONF_267};
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo Generating generated-configure.sh with ${AUTOCONF}
|
||||||
|
cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | ${AUTOCONF} -W all -I$script_dir - > $script_dir/generated-configure.sh
|
||||||
rm -rf autom4te.cache
|
rm -rf autom4te.cache
|
||||||
|
|
||||||
if test -e $custom_hook; then
|
if test -e $custom_hook; then
|
||||||
|
@ -58,7 +68,7 @@ if test -e $custom_hook; then
|
||||||
# We have custom sources available; also generate configure script
|
# We have custom sources available; also generate configure script
|
||||||
# with custom hooks compiled in.
|
# with custom hooks compiled in.
|
||||||
cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | \
|
cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | \
|
||||||
sed -e "s|#CUSTOM_AUTOCONF_INCLUDE|m4_include([$custom_hook])|" | autoconf -W all -I$script_dir - > $custom_script_dir/generated-configure.sh
|
sed -e "s|#CUSTOM_AUTOCONF_INCLUDE|m4_include([$custom_hook])|" | ${AUTOCONF} -W all -I$script_dir - > $custom_script_dir/generated-configure.sh
|
||||||
rm -rf autom4te.cache
|
rm -rf autom4te.cache
|
||||||
else
|
else
|
||||||
echo No custom hook found: $custom_hook
|
echo No custom hook found: $custom_hook
|
||||||
|
|
|
@ -1013,6 +1013,7 @@ with_freetype
|
||||||
with_alsa
|
with_alsa
|
||||||
with_alsa_include
|
with_alsa_include
|
||||||
with_alsa_lib
|
with_alsa_lib
|
||||||
|
with_giflib
|
||||||
with_zlib
|
with_zlib
|
||||||
with_stdc__lib
|
with_stdc__lib
|
||||||
with_num_cores
|
with_num_cores
|
||||||
|
@ -1771,6 +1772,8 @@ Optional Packages:
|
||||||
headers under PATH/include)
|
headers under PATH/include)
|
||||||
--with-alsa-include specify directory for the alsa include files
|
--with-alsa-include specify directory for the alsa include files
|
||||||
--with-alsa-lib specify directory for the alsa library
|
--with-alsa-lib specify directory for the alsa library
|
||||||
|
--with-giflib use giflib from build system or OpenJDK source
|
||||||
|
(system, bundled) [bundled]
|
||||||
--with-zlib use zlib from build system or OpenJDK source
|
--with-zlib use zlib from build system or OpenJDK source
|
||||||
(system, bundled) [bundled]
|
(system, bundled) [bundled]
|
||||||
--with-stdc++lib=<static>,<dynamic>,<default>
|
--with-stdc++lib=<static>,<dynamic>,<default>
|
||||||
|
@ -3753,7 +3756,7 @@ fi
|
||||||
#CUSTOM_AUTOCONF_INCLUDE
|
#CUSTOM_AUTOCONF_INCLUDE
|
||||||
|
|
||||||
# Do not change or remove the following line, it is needed for consistency checks:
|
# Do not change or remove the following line, it is needed for consistency checks:
|
||||||
DATE_WHEN_GENERATED=1363706268
|
DATE_WHEN_GENERATED=1364922883
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
#
|
#
|
||||||
|
@ -28903,14 +28906,15 @@ $as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
|
||||||
#
|
#
|
||||||
# ZIP_DEBUGINFO_FILES
|
# ZIP_DEBUGINFO_FILES
|
||||||
#
|
#
|
||||||
# Check whether --enable-zip-debug-info was given.
|
|
||||||
if test "${enable_zip_debug_info+set}" = set; then :
|
|
||||||
enableval=$enable_zip_debug_info;
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
|
||||||
$as_echo_n "checking if we should zip debug-info files... " >&6; }
|
$as_echo_n "checking if we should zip debug-info files... " >&6; }
|
||||||
|
# Check whether --enable-zip-debug-info was given.
|
||||||
|
if test "${enable_zip_debug_info+set}" = set; then :
|
||||||
|
enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
|
||||||
|
else
|
||||||
|
enable_zip_debug_info="yes"
|
||||||
|
fi
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
|
||||||
$as_echo "${enable_zip_debug_info}" >&6; }
|
$as_echo "${enable_zip_debug_info}" >&6; }
|
||||||
|
|
||||||
|
@ -31178,10 +31182,44 @@ fi
|
||||||
# Check for the gif library
|
# Check for the gif library
|
||||||
#
|
#
|
||||||
|
|
||||||
USE_EXTERNAL_LIBJPEG=true
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgif" >&5
|
# Check whether --with-giflib was given.
|
||||||
$as_echo_n "checking for main in -lgif... " >&6; }
|
if test "${with_giflib+set}" = set; then :
|
||||||
if ${ac_cv_lib_gif_main+:} false; then :
|
withval=$with_giflib;
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
|
||||||
|
$as_echo_n "checking for which giflib to use... " >&6; }
|
||||||
|
|
||||||
|
# default is bundled
|
||||||
|
DEFAULT_GIFLIB=bundled
|
||||||
|
|
||||||
|
#
|
||||||
|
# if user didn't specify, use DEFAULT_GIFLIB
|
||||||
|
#
|
||||||
|
if test "x${with_giflib}" = "x"; then
|
||||||
|
with_giflib=${DEFAULT_GIFLIB}
|
||||||
|
fi
|
||||||
|
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
|
||||||
|
$as_echo "${with_giflib}" >&6; }
|
||||||
|
|
||||||
|
if test "x${with_giflib}" = "xbundled"; then
|
||||||
|
USE_EXTERNAL_LIBGIF=false
|
||||||
|
elif test "x${with_giflib}" = "xsystem"; then
|
||||||
|
ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
|
||||||
|
if test "x$ac_cv_header_gif_lib_h" = xyes; then :
|
||||||
|
|
||||||
|
else
|
||||||
|
as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
|
||||||
|
$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
|
||||||
|
if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
|
||||||
$as_echo_n "(cached) " >&6
|
$as_echo_n "(cached) " >&6
|
||||||
else
|
else
|
||||||
ac_check_lib_save_LIBS=$LIBS
|
ac_check_lib_save_LIBS=$LIBS
|
||||||
|
@ -31189,27 +31227,33 @@ LIBS="-lgif $LIBS"
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
|
|
||||||
|
/* Override any GCC internal prototype to avoid an error.
|
||||||
|
Use char because int might match the return type of a GCC
|
||||||
|
builtin and then its argument prototype would still apply. */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C"
|
||||||
|
#endif
|
||||||
|
char DGifGetCode ();
|
||||||
int
|
int
|
||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
return main ();
|
return DGifGetCode ();
|
||||||
;
|
;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
_ACEOF
|
_ACEOF
|
||||||
if ac_fn_cxx_try_link "$LINENO"; then :
|
if ac_fn_cxx_try_link "$LINENO"; then :
|
||||||
ac_cv_lib_gif_main=yes
|
ac_cv_lib_gif_DGifGetCode=yes
|
||||||
else
|
else
|
||||||
ac_cv_lib_gif_main=no
|
ac_cv_lib_gif_DGifGetCode=no
|
||||||
fi
|
fi
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
LIBS=$ac_check_lib_save_LIBS
|
LIBS=$ac_check_lib_save_LIBS
|
||||||
fi
|
fi
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_main" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
|
||||||
$as_echo "$ac_cv_lib_gif_main" >&6; }
|
$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
|
||||||
if test "x$ac_cv_lib_gif_main" = xyes; then :
|
if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
|
||||||
cat >>confdefs.h <<_ACEOF
|
cat >>confdefs.h <<_ACEOF
|
||||||
#define HAVE_LIBGIF 1
|
#define HAVE_LIBGIF 1
|
||||||
_ACEOF
|
_ACEOF
|
||||||
|
@ -31217,13 +31261,15 @@ _ACEOF
|
||||||
LIBS="-lgif $LIBS"
|
LIBS="-lgif $LIBS"
|
||||||
|
|
||||||
else
|
else
|
||||||
USE_EXTERNAL_LIBGIF=false
|
as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Will use gif decoder bundled with the OpenJDK source" >&5
|
|
||||||
$as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
USE_EXTERNAL_LIBGIF=true
|
||||||
|
else
|
||||||
|
as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
#
|
#
|
||||||
|
|
|
@ -519,10 +519,10 @@ AC_MSG_RESULT([$ENABLE_DEBUG_SYMBOLS])
|
||||||
#
|
#
|
||||||
# ZIP_DEBUGINFO_FILES
|
# ZIP_DEBUGINFO_FILES
|
||||||
#
|
#
|
||||||
AC_ARG_ENABLE([zip-debug-info],
|
|
||||||
[AS_HELP_STRING([--disable-zip-debug-info],[disable zipping of debug-info files @<:@enabled@:>@])])
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([if we should zip debug-info files])
|
AC_MSG_CHECKING([if we should zip debug-info files])
|
||||||
|
AC_ARG_ENABLE([zip-debug-info],
|
||||||
|
[AS_HELP_STRING([--disable-zip-debug-info],[disable zipping of debug-info files @<:@enabled@:>@])],
|
||||||
|
[enable_zip_debug_info="${enableval}"], [enable_zip_debug_info="yes"])
|
||||||
AC_MSG_RESULT([${enable_zip_debug_info}])
|
AC_MSG_RESULT([${enable_zip_debug_info}])
|
||||||
|
|
||||||
if test "x${enable_zip_debug_info}" = "xno"; then
|
if test "x${enable_zip_debug_info}" = "xno"; then
|
||||||
|
|
|
@ -499,11 +499,36 @@ AC_SUBST(USE_EXTERNAL_LIBJPEG)
|
||||||
# Check for the gif library
|
# Check for the gif library
|
||||||
#
|
#
|
||||||
|
|
||||||
USE_EXTERNAL_LIBJPEG=true
|
AC_ARG_WITH(giflib, [AS_HELP_STRING([--with-giflib],
|
||||||
AC_CHECK_LIB(gif, main, [],
|
[use giflib from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
|
||||||
[ USE_EXTERNAL_LIBGIF=false
|
|
||||||
AC_MSG_NOTICE([Will use gif decoder bundled with the OpenJDK source])
|
|
||||||
])
|
AC_MSG_CHECKING([for which giflib to use])
|
||||||
|
|
||||||
|
# default is bundled
|
||||||
|
DEFAULT_GIFLIB=bundled
|
||||||
|
|
||||||
|
#
|
||||||
|
# if user didn't specify, use DEFAULT_GIFLIB
|
||||||
|
#
|
||||||
|
if test "x${with_giflib}" = "x"; then
|
||||||
|
with_giflib=${DEFAULT_GIFLIB}
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_MSG_RESULT(${with_giflib})
|
||||||
|
|
||||||
|
if test "x${with_giflib}" = "xbundled"; then
|
||||||
|
USE_EXTERNAL_LIBGIF=false
|
||||||
|
elif test "x${with_giflib}" = "xsystem"; then
|
||||||
|
AC_CHECK_HEADER(gif_lib.h, [],
|
||||||
|
[ AC_MSG_ERROR([--with-giflib=system specified, but gif_lib.h not found!])])
|
||||||
|
AC_CHECK_LIB(gif, DGifGetCode, [],
|
||||||
|
[ AC_MSG_ERROR([--with-giflib=system specified, but no giflib found!])])
|
||||||
|
|
||||||
|
USE_EXTERNAL_LIBGIF=true
|
||||||
|
else
|
||||||
|
AC_MSG_ERROR([Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'])
|
||||||
|
fi
|
||||||
AC_SUBST(USE_EXTERNAL_LIBGIF)
|
AC_SUBST(USE_EXTERNAL_LIBGIF)
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
|
@ -51,9 +51,8 @@ decompress_paths=$(SED) -f $(SRC_ROOT)/common/makefiles/support/ListPathsSafely-
|
||||||
-e 's|X98|$(OUTPUT_ROOT)|g' -e 's|X97|$(SRC_ROOT)|g' \
|
-e 's|X98|$(OUTPUT_ROOT)|g' -e 's|X97|$(SRC_ROOT)|g' \
|
||||||
-e 's|X00|X|g' | tr '\n' '$2'
|
-e 's|X00|X|g' | tr '\n' '$2'
|
||||||
|
|
||||||
# Subst in an extra $ to prevent it from disappearing.
|
|
||||||
define ListPathsSafely_If
|
define ListPathsSafely_If
|
||||||
$(if $(word $3,$($1)),$(eval $1_LPS$3:=$(call compress_paths,$(subst $$,$$$$,$(wordlist $3,$4,$($1))))))
|
$(if $(word $3,$($1)),$(eval $1_LPS$3:=$(call compress_paths,$(wordlist $3,$4,$($1)))))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define ListPathsSafely_Printf
|
define ListPathsSafely_Printf
|
||||||
|
|
|
@ -326,3 +326,5 @@ dd6350b4abc4a6c19c89dd982cc0e4f3d119885c hs25-b22
|
||||||
0631ebcc45f05c73b09a56c2586685af1f781c1d hs25-b23
|
0631ebcc45f05c73b09a56c2586685af1f781c1d hs25-b23
|
||||||
3db4ab0e12f437fe374817de346b2b0c6b4a5b31 jdk8-b82
|
3db4ab0e12f437fe374817de346b2b0c6b4a5b31 jdk8-b82
|
||||||
e3a41fc0234895eba4f272b984f7dacff495f8eb hs25-b24
|
e3a41fc0234895eba4f272b984f7dacff495f8eb hs25-b24
|
||||||
|
1c8db54ee9f315e20d6d5d9bf0b5c10349e9d301 jdk8-b83
|
||||||
|
8d0f263a370c5f3e61791bb06054560804117288 hs25-b25
|
||||||
|
|
|
@ -135,6 +135,7 @@ SUNWprivate_1.1 {
|
||||||
JVM_GetEnclosingMethodInfo;
|
JVM_GetEnclosingMethodInfo;
|
||||||
JVM_GetFieldAnnotations;
|
JVM_GetFieldAnnotations;
|
||||||
JVM_GetFieldIxModifiers;
|
JVM_GetFieldIxModifiers;
|
||||||
|
JVM_GetFieldTypeAnnotations;
|
||||||
JVM_GetHostName;
|
JVM_GetHostName;
|
||||||
JVM_GetInheritedAccessControlContext;
|
JVM_GetInheritedAccessControlContext;
|
||||||
JVM_GetInterfaceVersion;
|
JVM_GetInterfaceVersion;
|
||||||
|
@ -156,6 +157,7 @@ SUNWprivate_1.1 {
|
||||||
JVM_GetMethodIxSignatureUTF;
|
JVM_GetMethodIxSignatureUTF;
|
||||||
JVM_GetMethodParameterAnnotations;
|
JVM_GetMethodParameterAnnotations;
|
||||||
JVM_GetMethodParameters;
|
JVM_GetMethodParameters;
|
||||||
|
JVM_GetMethodTypeAnnotations;
|
||||||
JVM_GetPrimitiveArrayElement;
|
JVM_GetPrimitiveArrayElement;
|
||||||
JVM_GetProtectionDomain;
|
JVM_GetProtectionDomain;
|
||||||
JVM_GetSockName;
|
JVM_GetSockName;
|
||||||
|
|
|
@ -135,6 +135,7 @@ SUNWprivate_1.1 {
|
||||||
JVM_GetEnclosingMethodInfo;
|
JVM_GetEnclosingMethodInfo;
|
||||||
JVM_GetFieldAnnotations;
|
JVM_GetFieldAnnotations;
|
||||||
JVM_GetFieldIxModifiers;
|
JVM_GetFieldIxModifiers;
|
||||||
|
JVM_GetFieldTypeAnnotations;
|
||||||
JVM_GetHostName;
|
JVM_GetHostName;
|
||||||
JVM_GetInheritedAccessControlContext;
|
JVM_GetInheritedAccessControlContext;
|
||||||
JVM_GetInterfaceVersion;
|
JVM_GetInterfaceVersion;
|
||||||
|
@ -156,6 +157,7 @@ SUNWprivate_1.1 {
|
||||||
JVM_GetMethodIxSignatureUTF;
|
JVM_GetMethodIxSignatureUTF;
|
||||||
JVM_GetMethodParameterAnnotations;
|
JVM_GetMethodParameterAnnotations;
|
||||||
JVM_GetMethodParameters;
|
JVM_GetMethodParameters;
|
||||||
|
JVM_GetMethodTypeAnnotations;
|
||||||
JVM_GetPrimitiveArrayElement;
|
JVM_GetPrimitiveArrayElement;
|
||||||
JVM_GetProtectionDomain;
|
JVM_GetProtectionDomain;
|
||||||
JVM_GetSockName;
|
JVM_GetSockName;
|
||||||
|
|
|
@ -28,7 +28,8 @@ ifeq ($(INCLUDE_JVMTI), false)
|
||||||
Src_Files_EXCLUDE += jvmtiGetLoadedClasses.cpp forte.cpp jvmtiThreadState.cpp jvmtiExtensions.cpp \
|
Src_Files_EXCLUDE += jvmtiGetLoadedClasses.cpp forte.cpp jvmtiThreadState.cpp jvmtiExtensions.cpp \
|
||||||
jvmtiImpl.cpp jvmtiManageCapabilities.cpp jvmtiRawMonitor.cpp jvmtiUtil.cpp jvmtiTrace.cpp \
|
jvmtiImpl.cpp jvmtiManageCapabilities.cpp jvmtiRawMonitor.cpp jvmtiUtil.cpp jvmtiTrace.cpp \
|
||||||
jvmtiCodeBlobEvents.cpp jvmtiEnv.cpp jvmtiRedefineClasses.cpp jvmtiEnvBase.cpp jvmtiEnvThreadState.cpp \
|
jvmtiCodeBlobEvents.cpp jvmtiEnv.cpp jvmtiRedefineClasses.cpp jvmtiEnvBase.cpp jvmtiEnvThreadState.cpp \
|
||||||
jvmtiTagMap.cpp jvmtiEventController.cpp evmCompat.cpp jvmtiEnter.xsl jvmtiExport.cpp
|
jvmtiTagMap.cpp jvmtiEventController.cpp evmCompat.cpp jvmtiEnter.xsl jvmtiExport.cpp \
|
||||||
|
jvmtiClassFileReconstituter.cpp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(INCLUDE_FPROF), false)
|
ifeq ($(INCLUDE_FPROF), false)
|
||||||
|
|
|
@ -35,7 +35,7 @@ HOTSPOT_VM_COPYRIGHT=Copyright 2013
|
||||||
|
|
||||||
HS_MAJOR_VER=25
|
HS_MAJOR_VER=25
|
||||||
HS_MINOR_VER=0
|
HS_MINOR_VER=0
|
||||||
HS_BUILD_NUMBER=24
|
HS_BUILD_NUMBER=25
|
||||||
|
|
||||||
JDK_MAJOR_VER=1
|
JDK_MAJOR_VER=1
|
||||||
JDK_MINOR_VER=8
|
JDK_MINOR_VER=8
|
||||||
|
|
|
@ -131,6 +131,7 @@ SUNWprivate_1.1 {
|
||||||
JVM_GetEnclosingMethodInfo;
|
JVM_GetEnclosingMethodInfo;
|
||||||
JVM_GetFieldAnnotations;
|
JVM_GetFieldAnnotations;
|
||||||
JVM_GetFieldIxModifiers;
|
JVM_GetFieldIxModifiers;
|
||||||
|
JVM_GetFieldTypeAnnotations;
|
||||||
JVM_GetHostName;
|
JVM_GetHostName;
|
||||||
JVM_GetInheritedAccessControlContext;
|
JVM_GetInheritedAccessControlContext;
|
||||||
JVM_GetInterfaceVersion;
|
JVM_GetInterfaceVersion;
|
||||||
|
@ -152,6 +153,7 @@ SUNWprivate_1.1 {
|
||||||
JVM_GetMethodIxSignatureUTF;
|
JVM_GetMethodIxSignatureUTF;
|
||||||
JVM_GetMethodParameterAnnotations;
|
JVM_GetMethodParameterAnnotations;
|
||||||
JVM_GetMethodParameters;
|
JVM_GetMethodParameters;
|
||||||
|
JVM_GetMethodTypeAnnotations;
|
||||||
JVM_GetPrimitiveArrayElement;
|
JVM_GetPrimitiveArrayElement;
|
||||||
JVM_GetProtectionDomain;
|
JVM_GetProtectionDomain;
|
||||||
JVM_GetSockName;
|
JVM_GetSockName;
|
||||||
|
|
|
@ -131,6 +131,7 @@ SUNWprivate_1.1 {
|
||||||
JVM_GetEnclosingMethodInfo;
|
JVM_GetEnclosingMethodInfo;
|
||||||
JVM_GetFieldAnnotations;
|
JVM_GetFieldAnnotations;
|
||||||
JVM_GetFieldIxModifiers;
|
JVM_GetFieldIxModifiers;
|
||||||
|
JVM_GetFieldTypeAnnotations;
|
||||||
JVM_GetHostName;
|
JVM_GetHostName;
|
||||||
JVM_GetInheritedAccessControlContext;
|
JVM_GetInheritedAccessControlContext;
|
||||||
JVM_GetInterfaceVersion;
|
JVM_GetInterfaceVersion;
|
||||||
|
@ -152,6 +153,7 @@ SUNWprivate_1.1 {
|
||||||
JVM_GetMethodIxSignatureUTF;
|
JVM_GetMethodIxSignatureUTF;
|
||||||
JVM_GetMethodParameterAnnotations;
|
JVM_GetMethodParameterAnnotations;
|
||||||
JVM_GetMethodParameters;
|
JVM_GetMethodParameters;
|
||||||
|
JVM_GetMethodTypeAnnotations;
|
||||||
JVM_GetPrimitiveArrayElement;
|
JVM_GetPrimitiveArrayElement;
|
||||||
JVM_GetProtectionDomain;
|
JVM_GetProtectionDomain;
|
||||||
JVM_GetSockName;
|
JVM_GetSockName;
|
||||||
|
|
|
@ -131,6 +131,7 @@ SUNWprivate_1.1 {
|
||||||
JVM_GetEnclosingMethodInfo;
|
JVM_GetEnclosingMethodInfo;
|
||||||
JVM_GetFieldAnnotations;
|
JVM_GetFieldAnnotations;
|
||||||
JVM_GetFieldIxModifiers;
|
JVM_GetFieldIxModifiers;
|
||||||
|
JVM_GetFieldTypeAnnotations;
|
||||||
JVM_GetHostName;
|
JVM_GetHostName;
|
||||||
JVM_GetInheritedAccessControlContext;
|
JVM_GetInheritedAccessControlContext;
|
||||||
JVM_GetInterfaceVersion;
|
JVM_GetInterfaceVersion;
|
||||||
|
@ -152,6 +153,7 @@ SUNWprivate_1.1 {
|
||||||
JVM_GetMethodIxSignatureUTF;
|
JVM_GetMethodIxSignatureUTF;
|
||||||
JVM_GetMethodParameterAnnotations;
|
JVM_GetMethodParameterAnnotations;
|
||||||
JVM_GetMethodParameters;
|
JVM_GetMethodParameters;
|
||||||
|
JVM_GetMethodTypeAnnotations;
|
||||||
JVM_GetPrimitiveArrayElement;
|
JVM_GetPrimitiveArrayElement;
|
||||||
JVM_GetProtectionDomain;
|
JVM_GetProtectionDomain;
|
||||||
JVM_GetSockName;
|
JVM_GetSockName;
|
||||||
|
|
|
@ -110,8 +110,6 @@ VARIANT_TEXT=Server
|
||||||
!endif
|
!endif
|
||||||
!elseif "$(Variant)" == "tiered"
|
!elseif "$(Variant)" == "tiered"
|
||||||
VARIANT_TEXT=Tiered
|
VARIANT_TEXT=Tiered
|
||||||
!elseif "$(Variant)" == "kernel"
|
|
||||||
VARIANT_TEXT=Kernel
|
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
#########################################################################
|
#########################################################################
|
||||||
|
@ -305,9 +303,9 @@ $(variantDir)\local.make: checks
|
||||||
checks: checkVariant checkWorkSpace checkSA
|
checks: checkVariant checkWorkSpace checkSA
|
||||||
|
|
||||||
checkVariant:
|
checkVariant:
|
||||||
@ if "$(Variant)"=="" echo Need to specify "Variant=[tiered|compiler2|compiler1|kernel|core]" && false
|
@ if "$(Variant)"=="" echo Need to specify "Variant=[tiered|compiler2|compiler1|core]" && false
|
||||||
@ if "$(Variant)" NEQ "tiered" if "$(Variant)" NEQ "compiler2" if "$(Variant)" NEQ "compiler1" if "$(Variant)" NEQ "kernel" if "$(Variant)" NEQ "core" \
|
@ if "$(Variant)" NEQ "tiered" if "$(Variant)" NEQ "compiler2" if "$(Variant)" NEQ "compiler1" if "$(Variant)" NEQ "core" \
|
||||||
echo Need to specify "Variant=[tiered|compiler2|compiler1|kernel|core]" && false
|
echo Need to specify "Variant=[tiered|compiler2|compiler1|core]" && false
|
||||||
|
|
||||||
checkWorkSpace:
|
checkWorkSpace:
|
||||||
@ if "$(WorkSpace)"=="" echo Need to specify "WorkSpace=..." && false
|
@ if "$(WorkSpace)"=="" echo Need to specify "WorkSpace=..." && false
|
||||||
|
|
|
@ -148,7 +148,7 @@ echo HotSpotJDKDist=%HotSpotJDKDist%
|
||||||
|
|
||||||
REM This is now safe to do.
|
REM This is now safe to do.
|
||||||
:copyfiles
|
:copyfiles
|
||||||
for /D %%i in (compiler1, compiler2, tiered, core, kernel) do (
|
for /D %%i in (compiler1, compiler2, tiered, core) do (
|
||||||
if NOT EXIST %HotSpotBuildSpace%\%%i\generated mkdir %HotSpotBuildSpace%\%%i\generated
|
if NOT EXIST %HotSpotBuildSpace%\%%i\generated mkdir %HotSpotBuildSpace%\%%i\generated
|
||||||
copy %HotSpotWorkSpace%\make\windows\projectfiles\%%i\* %HotSpotBuildSpace%\%%i\generated > NUL
|
copy %HotSpotWorkSpace%\make\windows\projectfiles\%%i\* %HotSpotBuildSpace%\%%i\generated > NUL
|
||||||
)
|
)
|
||||||
|
@ -156,7 +156,7 @@ copy %HotSpotWorkSpace%\make\windows\projectfiles\%%i\* %HotSpotBuildSpace%\%%i\
|
||||||
REM force regneration of ProjectFile
|
REM force regneration of ProjectFile
|
||||||
if exist %ProjectFile% del %ProjectFile%
|
if exist %ProjectFile% del %ProjectFile%
|
||||||
|
|
||||||
for /D %%i in (compiler1, compiler2, tiered, core, kernel) do (
|
for /D %%i in (compiler1, compiler2, tiered, core) do (
|
||||||
echo -- %%i --
|
echo -- %%i --
|
||||||
echo # Generated file! > %HotSpotBuildSpace%\%%i\local.make
|
echo # Generated file! > %HotSpotBuildSpace%\%%i\local.make
|
||||||
echo # Changing a variable below and then deleting %ProjectFile% will cause >> %HotSpotBuildSpace%\%%i\local.make
|
echo # Changing a variable below and then deleting %ProjectFile% will cause >> %HotSpotBuildSpace%\%%i\local.make
|
||||||
|
|
|
@ -221,13 +221,6 @@ LD_FLAGS = /SAFESEH $(LD_FLAGS)
|
||||||
!endif
|
!endif
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
# Compile for space above time.
|
|
||||||
!if "$(Variant)" == "kernel"
|
|
||||||
PRODUCT_OPT_OPTION = /O1 /Oy-
|
|
||||||
FASTDEBUG_OPT_OPTION = /O1 /Oy-
|
|
||||||
DEBUG_OPT_OPTION = /Od
|
|
||||||
!endif
|
|
||||||
|
|
||||||
# If NO_OPTIMIZATIONS is defined in the environment, turn everything off
|
# If NO_OPTIMIZATIONS is defined in the environment, turn everything off
|
||||||
!ifdef NO_OPTIMIZATIONS
|
!ifdef NO_OPTIMIZATIONS
|
||||||
PRODUCT_OPT_OPTION = $(DEBUG_OPT_OPTION)
|
PRODUCT_OPT_OPTION = $(DEBUG_OPT_OPTION)
|
||||||
|
|
|
@ -51,13 +51,6 @@ HS_BUILD_ID=$(HS_BUILD_VER)
|
||||||
# Force resources to be rebuilt every time
|
# Force resources to be rebuilt every time
|
||||||
$(Res_Files): FORCE
|
$(Res_Files): FORCE
|
||||||
|
|
||||||
# Kernel doesn't need exported vtbl symbols.
|
|
||||||
!if "$(Variant)" == "kernel"
|
|
||||||
$(AOUT): $(Res_Files) $(Obj_Files)
|
|
||||||
$(LD) @<<
|
|
||||||
$(LD_FLAGS) /out:$@ /implib:$*.lib $(Obj_Files) $(Res_Files)
|
|
||||||
<<
|
|
||||||
!else
|
|
||||||
vm.def: $(Obj_Files)
|
vm.def: $(Obj_Files)
|
||||||
sh $(WorkSpace)/make/windows/build_vm_def.sh
|
sh $(WorkSpace)/make/windows/build_vm_def.sh
|
||||||
|
|
||||||
|
@ -65,7 +58,6 @@ $(AOUT): $(Res_Files) $(Obj_Files) vm.def
|
||||||
$(LD) @<<
|
$(LD) @<<
|
||||||
$(LD_FLAGS) /out:$@ /implib:$*.lib /def:vm.def $(Obj_Files) $(Res_Files)
|
$(LD_FLAGS) /out:$@ /implib:$*.lib /def:vm.def $(Obj_Files) $(Res_Files)
|
||||||
<<
|
<<
|
||||||
!endif
|
|
||||||
!if "$(MT)" != ""
|
!if "$(MT)" != ""
|
||||||
# The previous link command created a .manifest file that we want to
|
# The previous link command created a .manifest file that we want to
|
||||||
# insert into the linked artifact so we do not need to track it
|
# insert into the linked artifact so we do not need to track it
|
||||||
|
|
|
@ -89,12 +89,8 @@ STACK_SIZE=
|
||||||
# AsyncGetCallTrace is not supported on IA64 yet
|
# AsyncGetCallTrace is not supported on IA64 yet
|
||||||
AGCT_EXPORT=
|
AGCT_EXPORT=
|
||||||
!else
|
!else
|
||||||
!if "$(Variant)" == "kernel"
|
|
||||||
AGCT_EXPORT=
|
|
||||||
!else
|
|
||||||
AGCT_EXPORT=/export:AsyncGetCallTrace
|
AGCT_EXPORT=/export:AsyncGetCallTrace
|
||||||
!endif
|
!endif
|
||||||
!endif
|
|
||||||
|
|
||||||
# If you modify exports below please do the corresponding changes in
|
# If you modify exports below please do the corresponding changes in
|
||||||
# src/share/tools/ProjectCreator/WinGammaPlatformVC7.java
|
# src/share/tools/ProjectCreator/WinGammaPlatformVC7.java
|
||||||
|
|
|
@ -1,27 +0,0 @@
|
||||||
#
|
|
||||||
# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
#
|
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
|
||||||
# under the terms of the GNU General Public License version 2 only, as
|
|
||||||
# published by the Free Software Foundation.
|
|
||||||
#
|
|
||||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
# version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
# accompanied this code).
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License version
|
|
||||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
#
|
|
||||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
# or visit www.oracle.com if you need additional information or have any
|
|
||||||
# questions.
|
|
||||||
#
|
|
||||||
#
|
|
||||||
|
|
||||||
!include ../local.make
|
|
||||||
|
|
||||||
!include $(HOTSPOTWORKSPACE)/make/windows/projectfiles/common/Makefile
|
|
|
@ -1,7 +0,0 @@
|
||||||
;
|
|
||||||
; This .DEF file is a placeholder for one which is automatically
|
|
||||||
; generated during the build process. See
|
|
||||||
; make\windows\build_vm_def.sh and
|
|
||||||
; make\windows\makefiles\projectcreator.make (esp. the "-prelink"
|
|
||||||
; options).
|
|
||||||
;
|
|
|
@ -1,29 +0,0 @@
|
||||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
|
||||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
Project: "vm"=.\vm.dsp - Package Owner=<4>
|
|
||||||
|
|
||||||
Package=<5>
|
|
||||||
{{{
|
|
||||||
}}}
|
|
||||||
|
|
||||||
Package=<4>
|
|
||||||
{{{
|
|
||||||
}}}
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
Global:
|
|
||||||
|
|
||||||
Package=<5>
|
|
||||||
{{{
|
|
||||||
}}}
|
|
||||||
|
|
||||||
Package=<3>
|
|
||||||
{{{
|
|
||||||
}}}
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
|
|
|
@ -1811,13 +1811,15 @@ bool os::Linux::_stack_is_executable = false;
|
||||||
class VM_LinuxDllLoad: public VM_Operation {
|
class VM_LinuxDllLoad: public VM_Operation {
|
||||||
private:
|
private:
|
||||||
const char *_filename;
|
const char *_filename;
|
||||||
|
char *_ebuf;
|
||||||
|
int _ebuflen;
|
||||||
void *_lib;
|
void *_lib;
|
||||||
public:
|
public:
|
||||||
VM_LinuxDllLoad(const char *fn) :
|
VM_LinuxDllLoad(const char *fn, char *ebuf, int ebuflen) :
|
||||||
_filename(fn), _lib(NULL) {}
|
_filename(fn), _ebuf(ebuf), _ebuflen(ebuflen), _lib(NULL) {}
|
||||||
VMOp_Type type() const { return VMOp_LinuxDllLoad; }
|
VMOp_Type type() const { return VMOp_LinuxDllLoad; }
|
||||||
void doit() {
|
void doit() {
|
||||||
_lib = os::Linux::dll_load_inner(_filename);
|
_lib = os::Linux::dll_load_in_vmthread(_filename, _ebuf, _ebuflen);
|
||||||
os::Linux::_stack_is_executable = true;
|
os::Linux::_stack_is_executable = true;
|
||||||
}
|
}
|
||||||
void* loaded_library() { return _lib; }
|
void* loaded_library() { return _lib; }
|
||||||
|
@ -1865,13 +1867,13 @@ void * os::dll_load(const char *filename, char *ebuf, int ebuflen)
|
||||||
// This is for the case where the DLL has an static
|
// This is for the case where the DLL has an static
|
||||||
// constructor function that executes JNI code. We cannot
|
// constructor function that executes JNI code. We cannot
|
||||||
// load such DLLs in the VMThread.
|
// load such DLLs in the VMThread.
|
||||||
result = ::dlopen(filename, RTLD_LAZY);
|
result = os::Linux::dlopen_helper(filename, ebuf, ebuflen);
|
||||||
}
|
}
|
||||||
|
|
||||||
ThreadInVMfromNative tiv(jt);
|
ThreadInVMfromNative tiv(jt);
|
||||||
debug_only(VMNativeEntryWrapper vew;)
|
debug_only(VMNativeEntryWrapper vew;)
|
||||||
|
|
||||||
VM_LinuxDllLoad op(filename);
|
VM_LinuxDllLoad op(filename, ebuf, ebuflen);
|
||||||
VMThread::execute(&op);
|
VMThread::execute(&op);
|
||||||
if (LoadExecStackDllInVMThread) {
|
if (LoadExecStackDllInVMThread) {
|
||||||
result = op.loaded_library();
|
result = op.loaded_library();
|
||||||
|
@ -1883,7 +1885,7 @@ void * os::dll_load(const char *filename, char *ebuf, int ebuflen)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!load_attempted) {
|
if (!load_attempted) {
|
||||||
result = ::dlopen(filename, RTLD_LAZY);
|
result = os::Linux::dlopen_helper(filename, ebuf, ebuflen);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result != NULL) {
|
if (result != NULL) {
|
||||||
|
@ -1892,11 +1894,6 @@ void * os::dll_load(const char *filename, char *ebuf, int ebuflen)
|
||||||
}
|
}
|
||||||
|
|
||||||
Elf32_Ehdr elf_head;
|
Elf32_Ehdr elf_head;
|
||||||
|
|
||||||
// Read system error message into ebuf
|
|
||||||
// It may or may not be overwritten below
|
|
||||||
::strncpy(ebuf, ::dlerror(), ebuflen-1);
|
|
||||||
ebuf[ebuflen-1]='\0';
|
|
||||||
int diag_msg_max_length=ebuflen-strlen(ebuf);
|
int diag_msg_max_length=ebuflen-strlen(ebuf);
|
||||||
char* diag_msg_buf=ebuf+strlen(ebuf);
|
char* diag_msg_buf=ebuf+strlen(ebuf);
|
||||||
|
|
||||||
|
@ -2039,10 +2036,19 @@ void * os::dll_load(const char *filename, char *ebuf, int ebuflen)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void * os::Linux::dll_load_inner(const char *filename) {
|
void * os::Linux::dlopen_helper(const char *filename, char *ebuf, int ebuflen) {
|
||||||
|
void * result = ::dlopen(filename, RTLD_LAZY);
|
||||||
|
if (result == NULL) {
|
||||||
|
::strncpy(ebuf, ::dlerror(), ebuflen - 1);
|
||||||
|
ebuf[ebuflen-1] = '\0';
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
void * os::Linux::dll_load_in_vmthread(const char *filename, char *ebuf, int ebuflen) {
|
||||||
void * result = NULL;
|
void * result = NULL;
|
||||||
if (LoadExecStackDllInVMThread) {
|
if (LoadExecStackDllInVMThread) {
|
||||||
result = ::dlopen(filename, RTLD_LAZY);
|
result = dlopen_helper(filename, ebuf, ebuflen);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Since 7019808, libjvm.so is linked with -noexecstack. If the VM loads a
|
// Since 7019808, libjvm.so is linked with -noexecstack. If the VM loads a
|
||||||
|
|
|
@ -95,7 +95,8 @@ class Linux {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static bool _stack_is_executable;
|
static bool _stack_is_executable;
|
||||||
static void *dll_load_inner(const char *name);
|
static void *dlopen_helper(const char *name, char *ebuf, int ebuflen);
|
||||||
|
static void *dll_load_in_vmthread(const char *name, char *ebuf, int ebuflen);
|
||||||
|
|
||||||
static void init_thread_fpu_state();
|
static void init_thread_fpu_state();
|
||||||
static int get_fpu_control_word();
|
static int get_fpu_control_word();
|
||||||
|
|
|
@ -46,7 +46,7 @@ define_pd_global(uintx, SurvivorRatio, 8);
|
||||||
|
|
||||||
define_pd_global(uintx, JVMInvokeMethodSlack, 8192);
|
define_pd_global(uintx, JVMInvokeMethodSlack, 8192);
|
||||||
|
|
||||||
// Used on 64 bit platforms for UseCompressedOops base address or CDS
|
// Used on 64 bit platforms for UseCompressedOops base address
|
||||||
define_pd_global(uintx, HeapBaseMinAddress, 2*G);
|
define_pd_global(uintx, HeapBaseMinAddress, 2*G);
|
||||||
|
|
||||||
#endif // OS_CPU_BSD_X86_VM_GLOBALS_BSD_X86_HPP
|
#endif // OS_CPU_BSD_X86_VM_GLOBALS_BSD_X86_HPP
|
||||||
|
|
|
@ -41,7 +41,7 @@ define_pd_global(intx, VMThreadStackSize, 512);
|
||||||
define_pd_global(intx, CompilerThreadStackSize, 0);
|
define_pd_global(intx, CompilerThreadStackSize, 0);
|
||||||
define_pd_global(uintx, JVMInvokeMethodSlack, 8192);
|
define_pd_global(uintx, JVMInvokeMethodSlack, 8192);
|
||||||
|
|
||||||
// Used on 64 bit platforms for UseCompressedOops base address or CDS
|
// Used on 64 bit platforms for UseCompressedOops base address
|
||||||
define_pd_global(uintx, HeapBaseMinAddress, 2*G);
|
define_pd_global(uintx, HeapBaseMinAddress, 2*G);
|
||||||
|
|
||||||
#endif // OS_CPU_BSD_ZERO_VM_GLOBALS_BSD_ZERO_HPP
|
#endif // OS_CPU_BSD_ZERO_VM_GLOBALS_BSD_ZERO_HPP
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
define_pd_global(uintx, JVMInvokeMethodSlack, 12288);
|
define_pd_global(uintx, JVMInvokeMethodSlack, 12288);
|
||||||
define_pd_global(intx, CompilerThreadStackSize, 0);
|
define_pd_global(intx, CompilerThreadStackSize, 0);
|
||||||
|
|
||||||
// Used on 64 bit platforms for UseCompressedOops base address or CDS
|
// Used on 64 bit platforms for UseCompressedOops base address
|
||||||
define_pd_global(uintx, HeapBaseMinAddress, CONST64(4)*G);
|
define_pd_global(uintx, HeapBaseMinAddress, CONST64(4)*G);
|
||||||
|
|
||||||
#endif // OS_CPU_LINUX_SPARC_VM_GLOBALS_LINUX_SPARC_HPP
|
#endif // OS_CPU_LINUX_SPARC_VM_GLOBALS_LINUX_SPARC_HPP
|
||||||
|
|
|
@ -44,7 +44,7 @@ define_pd_global(intx, CompilerThreadStackSize, 0);
|
||||||
|
|
||||||
define_pd_global(uintx,JVMInvokeMethodSlack, 8192);
|
define_pd_global(uintx,JVMInvokeMethodSlack, 8192);
|
||||||
|
|
||||||
// Used on 64 bit platforms for UseCompressedOops base address or CDS
|
// Used on 64 bit platforms for UseCompressedOops base address
|
||||||
define_pd_global(uintx,HeapBaseMinAddress, 2*G);
|
define_pd_global(uintx,HeapBaseMinAddress, 2*G);
|
||||||
|
|
||||||
#endif // OS_CPU_LINUX_X86_VM_GLOBALS_LINUX_X86_HPP
|
#endif // OS_CPU_LINUX_X86_VM_GLOBALS_LINUX_X86_HPP
|
||||||
|
|
|
@ -41,7 +41,7 @@ define_pd_global(intx, VMThreadStackSize, 512);
|
||||||
define_pd_global(intx, CompilerThreadStackSize, 0);
|
define_pd_global(intx, CompilerThreadStackSize, 0);
|
||||||
define_pd_global(uintx, JVMInvokeMethodSlack, 8192);
|
define_pd_global(uintx, JVMInvokeMethodSlack, 8192);
|
||||||
|
|
||||||
// Used on 64 bit platforms for UseCompressedOops base address or CDS
|
// Used on 64 bit platforms for UseCompressedOops base address
|
||||||
define_pd_global(uintx, HeapBaseMinAddress, 2*G);
|
define_pd_global(uintx, HeapBaseMinAddress, 2*G);
|
||||||
|
|
||||||
#endif // OS_CPU_LINUX_ZERO_VM_GLOBALS_LINUX_ZERO_HPP
|
#endif // OS_CPU_LINUX_ZERO_VM_GLOBALS_LINUX_ZERO_HPP
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
define_pd_global(uintx, JVMInvokeMethodSlack, 12288);
|
define_pd_global(uintx, JVMInvokeMethodSlack, 12288);
|
||||||
define_pd_global(intx, CompilerThreadStackSize, 0);
|
define_pd_global(intx, CompilerThreadStackSize, 0);
|
||||||
|
|
||||||
// Used on 64 bit platforms for UseCompressedOops base address or CDS
|
// Used on 64 bit platforms for UseCompressedOops base address
|
||||||
#ifdef _LP64
|
#ifdef _LP64
|
||||||
define_pd_global(uintx, HeapBaseMinAddress, CONST64(4)*G);
|
define_pd_global(uintx, HeapBaseMinAddress, CONST64(4)*G);
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -43,7 +43,7 @@ define_pd_global(uintx,JVMInvokeMethodSlack, 10*K);
|
||||||
|
|
||||||
define_pd_global(intx, CompilerThreadStackSize, 0);
|
define_pd_global(intx, CompilerThreadStackSize, 0);
|
||||||
|
|
||||||
// Used on 64 bit platforms for UseCompressedOops base address or CDS
|
// Used on 64 bit platforms for UseCompressedOops base address
|
||||||
define_pd_global(uintx,HeapBaseMinAddress, 256*M);
|
define_pd_global(uintx,HeapBaseMinAddress, 256*M);
|
||||||
|
|
||||||
#endif // OS_CPU_SOLARIS_X86_VM_GLOBALS_SOLARIS_X86_HPP
|
#endif // OS_CPU_SOLARIS_X86_VM_GLOBALS_SOLARIS_X86_HPP
|
||||||
|
|
|
@ -45,7 +45,7 @@ define_pd_global(intx, CompilerThreadStackSize, 0);
|
||||||
|
|
||||||
define_pd_global(uintx, JVMInvokeMethodSlack, 8192);
|
define_pd_global(uintx, JVMInvokeMethodSlack, 8192);
|
||||||
|
|
||||||
// Used on 64 bit platforms for UseCompressedOops base address or CDS
|
// Used on 64 bit platforms for UseCompressedOops base address
|
||||||
define_pd_global(uintx, HeapBaseMinAddress, 2*G);
|
define_pd_global(uintx, HeapBaseMinAddress, 2*G);
|
||||||
|
|
||||||
#endif // OS_CPU_WINDOWS_X86_VM_GLOBALS_WINDOWS_X86_HPP
|
#endif // OS_CPU_WINDOWS_X86_VM_GLOBALS_WINDOWS_X86_HPP
|
||||||
|
|
|
@ -568,36 +568,6 @@ class CoreProductConfig extends ProductConfig {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class KernelDebugConfig extends GenericDebugConfig {
|
|
||||||
String getOptFlag() {
|
|
||||||
return getCI().getNoOptFlag();
|
|
||||||
}
|
|
||||||
|
|
||||||
KernelDebugConfig() {
|
|
||||||
initNames("kernel", "debug", "jvm.dll");
|
|
||||||
init(getIncludes(), getDefines());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
class KernelFastDebugConfig extends GenericDebugConfig {
|
|
||||||
String getOptFlag() {
|
|
||||||
return getCI().getOptFlag();
|
|
||||||
}
|
|
||||||
|
|
||||||
KernelFastDebugConfig() {
|
|
||||||
initNames("kernel", "fastdebug", "jvm.dll");
|
|
||||||
init(getIncludes(), getDefines());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
class KernelProductConfig extends ProductConfig {
|
|
||||||
KernelProductConfig() {
|
|
||||||
initNames("kernel", "product", "jvm.dll");
|
|
||||||
init(getIncludes(), getDefines());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
abstract class CompilerInterface {
|
abstract class CompilerInterface {
|
||||||
abstract Vector getBaseCompilerFlags(Vector defines, Vector includes, String outDir);
|
abstract Vector getBaseCompilerFlags(Vector defines, Vector includes, String outDir);
|
||||||
|
|
|
@ -564,12 +564,6 @@ public abstract class WinGammaPlatform {
|
||||||
allConfigs.add(new CoreFastDebugConfig());
|
allConfigs.add(new CoreFastDebugConfig());
|
||||||
allConfigs.add(new CoreProductConfig());
|
allConfigs.add(new CoreProductConfig());
|
||||||
|
|
||||||
if (platform.equals("Win32")) {
|
|
||||||
allConfigs.add(new KernelDebugConfig());
|
|
||||||
allConfigs.add(new KernelFastDebugConfig());
|
|
||||||
allConfigs.add(new KernelProductConfig());
|
|
||||||
}
|
|
||||||
|
|
||||||
return allConfigs;
|
return allConfigs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2196,8 +2196,7 @@ methodHandle ClassFileParser::parse_method(bool is_interface,
|
||||||
true, // is LVTT
|
true, // is LVTT
|
||||||
CHECK_(nullHandle));
|
CHECK_(nullHandle));
|
||||||
lvtt_cnt++;
|
lvtt_cnt++;
|
||||||
} else if (UseSplitVerifier &&
|
} else if (_major_version >= Verifier::STACKMAP_ATTRIBUTE_MAJOR_VERSION &&
|
||||||
_major_version >= Verifier::STACKMAP_ATTRIBUTE_MAJOR_VERSION &&
|
|
||||||
_cp->symbol_at(code_attribute_name_index) == vmSymbols::tag_stack_map_table()) {
|
_cp->symbol_at(code_attribute_name_index) == vmSymbols::tag_stack_map_table()) {
|
||||||
// Stack map is only needed by the new verifier in JDK1.5.
|
// Stack map is only needed by the new verifier in JDK1.5.
|
||||||
if (parsed_stackmap_attribute) {
|
if (parsed_stackmap_attribute) {
|
||||||
|
|
|
@ -61,8 +61,8 @@
|
||||||
# include "bytes_ppc.hpp"
|
# include "bytes_ppc.hpp"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define NOFAILOVER_MAJOR_VERSION 51
|
#define NOFAILOVER_MAJOR_VERSION 51
|
||||||
#define STATIC_METHOD_IN_INTERFACE_MAJOR_VERSION 52
|
#define NONZERO_PADDING_BYTES_IN_SWITCH_MAJOR_VERSION 51
|
||||||
|
|
||||||
// Access to external entry for VerifyClassCodes - old byte code verifier
|
// Access to external entry for VerifyClassCodes - old byte code verifier
|
||||||
|
|
||||||
|
@ -127,8 +127,7 @@ bool Verifier::verify(instanceKlassHandle klass, Verifier::Mode mode, bool shoul
|
||||||
if (TraceClassInitialization) {
|
if (TraceClassInitialization) {
|
||||||
tty->print_cr("Start class verification for: %s", klassName);
|
tty->print_cr("Start class verification for: %s", klassName);
|
||||||
}
|
}
|
||||||
if (UseSplitVerifier &&
|
if (klass->major_version() >= STACKMAP_ATTRIBUTE_MAJOR_VERSION) {
|
||||||
klass->major_version() >= STACKMAP_ATTRIBUTE_MAJOR_VERSION) {
|
|
||||||
ClassVerifier split_verifier(klass, THREAD);
|
ClassVerifier split_verifier(klass, THREAD);
|
||||||
split_verifier.verify_class(THREAD);
|
split_verifier.verify_class(THREAD);
|
||||||
exception_name = split_verifier.result();
|
exception_name = split_verifier.result();
|
||||||
|
@ -2027,16 +2026,19 @@ void ClassVerifier::verify_switch(
|
||||||
address bcp = bcs->bcp();
|
address bcp = bcs->bcp();
|
||||||
address aligned_bcp = (address) round_to((intptr_t)(bcp + 1), jintSize);
|
address aligned_bcp = (address) round_to((intptr_t)(bcp + 1), jintSize);
|
||||||
|
|
||||||
// 4639449 & 4647081: padding bytes must be 0
|
if (_klass->major_version() < NONZERO_PADDING_BYTES_IN_SWITCH_MAJOR_VERSION) {
|
||||||
u2 padding_offset = 1;
|
// 4639449 & 4647081: padding bytes must be 0
|
||||||
while ((bcp + padding_offset) < aligned_bcp) {
|
u2 padding_offset = 1;
|
||||||
if(*(bcp + padding_offset) != 0) {
|
while ((bcp + padding_offset) < aligned_bcp) {
|
||||||
verify_error(ErrorContext::bad_code(bci),
|
if(*(bcp + padding_offset) != 0) {
|
||||||
"Nonzero padding byte in lookswitch or tableswitch");
|
verify_error(ErrorContext::bad_code(bci),
|
||||||
return;
|
"Nonzero padding byte in lookswitch or tableswitch");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
padding_offset++;
|
||||||
}
|
}
|
||||||
padding_offset++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int default_offset = (int) Bytes::get_Java_u4(aligned_bcp);
|
int default_offset = (int) Bytes::get_Java_u4(aligned_bcp);
|
||||||
int keys, delta;
|
int keys, delta;
|
||||||
current_frame->pop_stack(
|
current_frame->pop_stack(
|
||||||
|
@ -2318,11 +2320,6 @@ void ClassVerifier::verify_invoke_instructions(
|
||||||
types = (1 << JVM_CONSTANT_InterfaceMethodref) |
|
types = (1 << JVM_CONSTANT_InterfaceMethodref) |
|
||||||
(1 << JVM_CONSTANT_Methodref);
|
(1 << JVM_CONSTANT_Methodref);
|
||||||
break;
|
break;
|
||||||
case Bytecodes::_invokestatic:
|
|
||||||
types = (_klass->major_version() < STATIC_METHOD_IN_INTERFACE_MAJOR_VERSION) ?
|
|
||||||
(1 << JVM_CONSTANT_Methodref) :
|
|
||||||
((1 << JVM_CONSTANT_InterfaceMethodref) | (1 << JVM_CONSTANT_Methodref));
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
types = 1 << JVM_CONSTANT_Methodref;
|
types = 1 << JVM_CONSTANT_Methodref;
|
||||||
}
|
}
|
||||||
|
|
|
@ -372,7 +372,7 @@ ReservedSpace FileMapInfo::reserve_shared_memory() {
|
||||||
// other reserved memory (like the code cache).
|
// other reserved memory (like the code cache).
|
||||||
ReservedSpace rs(size, alignment, false, requested_addr);
|
ReservedSpace rs(size, alignment, false, requested_addr);
|
||||||
if (!rs.is_reserved()) {
|
if (!rs.is_reserved()) {
|
||||||
fail_continue(err_msg("Unable to reserved shared space at required address " INTPTR_FORMAT, requested_addr));
|
fail_continue(err_msg("Unable to reserve shared space at required address " INTPTR_FORMAT, requested_addr));
|
||||||
return rs;
|
return rs;
|
||||||
}
|
}
|
||||||
// the reserved virtual memory is for mapping class data sharing archive
|
// the reserved virtual memory is for mapping class data sharing archive
|
||||||
|
|
|
@ -337,27 +337,16 @@ VirtualSpaceNode::VirtualSpaceNode(size_t byte_size) : _top(NULL), _next(NULL),
|
||||||
// align up to vm allocation granularity
|
// align up to vm allocation granularity
|
||||||
byte_size = align_size_up(byte_size, os::vm_allocation_granularity());
|
byte_size = align_size_up(byte_size, os::vm_allocation_granularity());
|
||||||
|
|
||||||
// This allocates memory with mmap. For DumpSharedspaces, allocate the
|
// This allocates memory with mmap. For DumpSharedspaces, try to reserve
|
||||||
// space at low memory so that other shared images don't conflict.
|
// configurable address, generally at the top of the Java heap so other
|
||||||
// This is the same address as memory needed for UseCompressedOops but
|
// memory addresses don't conflict.
|
||||||
// compressed oops don't work with CDS (offsets in metadata are wrong), so
|
|
||||||
// borrow the same address.
|
|
||||||
if (DumpSharedSpaces) {
|
if (DumpSharedSpaces) {
|
||||||
char* shared_base = (char*)HeapBaseMinAddress;
|
char* shared_base = (char*)SharedBaseAddress;
|
||||||
_rs = ReservedSpace(byte_size, 0, false, shared_base, 0);
|
_rs = ReservedSpace(byte_size, 0, false, shared_base, 0);
|
||||||
if (_rs.is_reserved()) {
|
if (_rs.is_reserved()) {
|
||||||
assert(_rs.base() == shared_base, "should match");
|
assert(shared_base == 0 || _rs.base() == shared_base, "should match");
|
||||||
} else {
|
} else {
|
||||||
// If we are dumping the heap, then allocate a wasted block of address
|
// Get a mmap region anywhere if the SharedBaseAddress fails.
|
||||||
// space in order to push the heap to a lower address. This extra
|
|
||||||
// address range allows for other (or larger) libraries to be loaded
|
|
||||||
// without them occupying the space required for the shared spaces.
|
|
||||||
uintx reserved = 0;
|
|
||||||
uintx block_size = 64*1024*1024;
|
|
||||||
while (reserved < SharedDummyBlockSize) {
|
|
||||||
char* dummy = os::reserve_memory(block_size);
|
|
||||||
reserved += block_size;
|
|
||||||
}
|
|
||||||
_rs = ReservedSpace(byte_size);
|
_rs = ReservedSpace(byte_size);
|
||||||
}
|
}
|
||||||
MetaspaceShared::set_shared_rs(&_rs);
|
MetaspaceShared::set_shared_rs(&_rs);
|
||||||
|
|
|
@ -1457,7 +1457,7 @@ JVM_END
|
||||||
JVM_ENTRY(jbyteArray, JVM_GetClassAnnotations(JNIEnv *env, jclass cls))
|
JVM_ENTRY(jbyteArray, JVM_GetClassAnnotations(JNIEnv *env, jclass cls))
|
||||||
assert (cls != NULL, "illegal class");
|
assert (cls != NULL, "illegal class");
|
||||||
JVMWrapper("JVM_GetClassAnnotations");
|
JVMWrapper("JVM_GetClassAnnotations");
|
||||||
ResourceMark rm(THREAD);
|
|
||||||
// Return null for arrays and primitives
|
// Return null for arrays and primitives
|
||||||
if (!java_lang_Class::is_primitive(JNIHandles::resolve(cls))) {
|
if (!java_lang_Class::is_primitive(JNIHandles::resolve(cls))) {
|
||||||
Klass* k = java_lang_Class::as_Klass(JNIHandles::resolve(cls));
|
Klass* k = java_lang_Class::as_Klass(JNIHandles::resolve(cls));
|
||||||
|
@ -1470,20 +1470,15 @@ JVM_ENTRY(jbyteArray, JVM_GetClassAnnotations(JNIEnv *env, jclass cls))
|
||||||
JVM_END
|
JVM_END
|
||||||
|
|
||||||
|
|
||||||
JVM_ENTRY(jbyteArray, JVM_GetFieldAnnotations(JNIEnv *env, jobject field))
|
static bool jvm_get_field_common(jobject field, fieldDescriptor& fd, TRAPS) {
|
||||||
assert(field != NULL, "illegal field");
|
|
||||||
JVMWrapper("JVM_GetFieldAnnotations");
|
|
||||||
|
|
||||||
// some of this code was adapted from from jni_FromReflectedField
|
// some of this code was adapted from from jni_FromReflectedField
|
||||||
|
|
||||||
// field is a handle to a java.lang.reflect.Field object
|
|
||||||
oop reflected = JNIHandles::resolve_non_null(field);
|
oop reflected = JNIHandles::resolve_non_null(field);
|
||||||
oop mirror = java_lang_reflect_Field::clazz(reflected);
|
oop mirror = java_lang_reflect_Field::clazz(reflected);
|
||||||
Klass* k = java_lang_Class::as_Klass(mirror);
|
Klass* k = java_lang_Class::as_Klass(mirror);
|
||||||
int slot = java_lang_reflect_Field::slot(reflected);
|
int slot = java_lang_reflect_Field::slot(reflected);
|
||||||
int modifiers = java_lang_reflect_Field::modifiers(reflected);
|
int modifiers = java_lang_reflect_Field::modifiers(reflected);
|
||||||
|
|
||||||
fieldDescriptor fd;
|
|
||||||
KlassHandle kh(THREAD, k);
|
KlassHandle kh(THREAD, k);
|
||||||
intptr_t offset = InstanceKlass::cast(kh())->field_offset(slot);
|
intptr_t offset = InstanceKlass::cast(kh())->field_offset(slot);
|
||||||
|
|
||||||
|
@ -1491,16 +1486,29 @@ JVM_ENTRY(jbyteArray, JVM_GetFieldAnnotations(JNIEnv *env, jobject field))
|
||||||
// for static fields we only look in the current class
|
// for static fields we only look in the current class
|
||||||
if (!InstanceKlass::cast(kh())->find_local_field_from_offset(offset, true, &fd)) {
|
if (!InstanceKlass::cast(kh())->find_local_field_from_offset(offset, true, &fd)) {
|
||||||
assert(false, "cannot find static field");
|
assert(false, "cannot find static field");
|
||||||
return NULL; // robustness
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// for instance fields we start with the current class and work
|
// for instance fields we start with the current class and work
|
||||||
// our way up through the superclass chain
|
// our way up through the superclass chain
|
||||||
if (!InstanceKlass::cast(kh())->find_field_from_offset(offset, false, &fd)) {
|
if (!InstanceKlass::cast(kh())->find_field_from_offset(offset, false, &fd)) {
|
||||||
assert(false, "cannot find instance field");
|
assert(false, "cannot find instance field");
|
||||||
return NULL; // robustness
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
JVM_ENTRY(jbyteArray, JVM_GetFieldAnnotations(JNIEnv *env, jobject field))
|
||||||
|
// field is a handle to a java.lang.reflect.Field object
|
||||||
|
assert(field != NULL, "illegal field");
|
||||||
|
JVMWrapper("JVM_GetFieldAnnotations");
|
||||||
|
|
||||||
|
fieldDescriptor fd;
|
||||||
|
bool gotFd = jvm_get_field_common(field, fd, CHECK_NULL);
|
||||||
|
if (!gotFd) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return (jbyteArray) JNIHandles::make_local(env, Annotations::make_java_array(fd.annotations(), THREAD));
|
return (jbyteArray) JNIHandles::make_local(env, Annotations::make_java_array(fd.annotations(), THREAD));
|
||||||
JVM_END
|
JVM_END
|
||||||
|
@ -1525,12 +1533,8 @@ static Method* jvm_get_method_common(jobject method) {
|
||||||
Klass* k = java_lang_Class::as_Klass(mirror);
|
Klass* k = java_lang_Class::as_Klass(mirror);
|
||||||
|
|
||||||
Method* m = InstanceKlass::cast(k)->method_with_idnum(slot);
|
Method* m = InstanceKlass::cast(k)->method_with_idnum(slot);
|
||||||
if (m == NULL) {
|
assert(m != NULL, "cannot find method");
|
||||||
assert(false, "cannot find method");
|
return m; // caller has to deal with NULL in product mode
|
||||||
return NULL; // robustness
|
|
||||||
}
|
|
||||||
|
|
||||||
return m;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1539,6 +1543,10 @@ JVM_ENTRY(jbyteArray, JVM_GetMethodAnnotations(JNIEnv *env, jobject method))
|
||||||
|
|
||||||
// method is a handle to a java.lang.reflect.Method object
|
// method is a handle to a java.lang.reflect.Method object
|
||||||
Method* m = jvm_get_method_common(method);
|
Method* m = jvm_get_method_common(method);
|
||||||
|
if (m == NULL) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return (jbyteArray) JNIHandles::make_local(env,
|
return (jbyteArray) JNIHandles::make_local(env,
|
||||||
Annotations::make_java_array(m->annotations(), THREAD));
|
Annotations::make_java_array(m->annotations(), THREAD));
|
||||||
JVM_END
|
JVM_END
|
||||||
|
@ -1549,6 +1557,10 @@ JVM_ENTRY(jbyteArray, JVM_GetMethodDefaultAnnotationValue(JNIEnv *env, jobject m
|
||||||
|
|
||||||
// method is a handle to a java.lang.reflect.Method object
|
// method is a handle to a java.lang.reflect.Method object
|
||||||
Method* m = jvm_get_method_common(method);
|
Method* m = jvm_get_method_common(method);
|
||||||
|
if (m == NULL) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return (jbyteArray) JNIHandles::make_local(env,
|
return (jbyteArray) JNIHandles::make_local(env,
|
||||||
Annotations::make_java_array(m->annotation_default(), THREAD));
|
Annotations::make_java_array(m->annotation_default(), THREAD));
|
||||||
JVM_END
|
JVM_END
|
||||||
|
@ -1559,6 +1571,10 @@ JVM_ENTRY(jbyteArray, JVM_GetMethodParameterAnnotations(JNIEnv *env, jobject met
|
||||||
|
|
||||||
// method is a handle to a java.lang.reflect.Method object
|
// method is a handle to a java.lang.reflect.Method object
|
||||||
Method* m = jvm_get_method_common(method);
|
Method* m = jvm_get_method_common(method);
|
||||||
|
if (m == NULL) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return (jbyteArray) JNIHandles::make_local(env,
|
return (jbyteArray) JNIHandles::make_local(env,
|
||||||
Annotations::make_java_array(m->parameter_annotations(), THREAD));
|
Annotations::make_java_array(m->parameter_annotations(), THREAD));
|
||||||
JVM_END
|
JVM_END
|
||||||
|
@ -1583,6 +1599,38 @@ JVM_ENTRY(jbyteArray, JVM_GetClassTypeAnnotations(JNIEnv *env, jclass cls))
|
||||||
return NULL;
|
return NULL;
|
||||||
JVM_END
|
JVM_END
|
||||||
|
|
||||||
|
JVM_ENTRY(jbyteArray, JVM_GetMethodTypeAnnotations(JNIEnv *env, jobject method))
|
||||||
|
assert (method != NULL, "illegal method");
|
||||||
|
JVMWrapper("JVM_GetMethodTypeAnnotations");
|
||||||
|
|
||||||
|
// method is a handle to a java.lang.reflect.Method object
|
||||||
|
Method* m = jvm_get_method_common(method);
|
||||||
|
if (m == NULL) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
AnnotationArray* type_annotations = m->type_annotations();
|
||||||
|
if (type_annotations != NULL) {
|
||||||
|
typeArrayOop a = Annotations::make_java_array(type_annotations, CHECK_NULL);
|
||||||
|
return (jbyteArray) JNIHandles::make_local(env, a);
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
JVM_END
|
||||||
|
|
||||||
|
JVM_ENTRY(jbyteArray, JVM_GetFieldTypeAnnotations(JNIEnv *env, jobject field))
|
||||||
|
assert (field != NULL, "illegal field");
|
||||||
|
JVMWrapper("JVM_GetFieldTypeAnnotations");
|
||||||
|
|
||||||
|
fieldDescriptor fd;
|
||||||
|
bool gotFd = jvm_get_field_common(field, fd, CHECK_NULL);
|
||||||
|
if (!gotFd) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (jbyteArray) JNIHandles::make_local(env, Annotations::make_java_array(fd.type_annotations(), THREAD));
|
||||||
|
JVM_END
|
||||||
|
|
||||||
static void bounds_check(constantPoolHandle cp, jint index, TRAPS) {
|
static void bounds_check(constantPoolHandle cp, jint index, TRAPS) {
|
||||||
if (!cp->is_within_bounds(index)) {
|
if (!cp->is_within_bounds(index)) {
|
||||||
THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), "Constant pool index out of bounds");
|
THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), "Constant pool index out of bounds");
|
||||||
|
@ -1722,7 +1770,7 @@ JVM_ENTRY(jobjectArray, JVM_GetClassDeclaredMethods(JNIEnv *env, jclass ofClass,
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < methods_length; i++) {
|
for (i = 0; i < methods_length; i++) {
|
||||||
methodHandle method(THREAD, methods->at(i));
|
methodHandle method(THREAD, methods->at(i));
|
||||||
if (!method->is_initializer()) {
|
if (!method->is_initializer() && !method->is_overpass()) {
|
||||||
if (!publicOnly || method->is_public()) {
|
if (!publicOnly || method->is_public()) {
|
||||||
++num_methods;
|
++num_methods;
|
||||||
}
|
}
|
||||||
|
@ -1736,7 +1784,7 @@ JVM_ENTRY(jobjectArray, JVM_GetClassDeclaredMethods(JNIEnv *env, jclass ofClass,
|
||||||
int out_idx = 0;
|
int out_idx = 0;
|
||||||
for (i = 0; i < methods_length; i++) {
|
for (i = 0; i < methods_length; i++) {
|
||||||
methodHandle method(THREAD, methods->at(i));
|
methodHandle method(THREAD, methods->at(i));
|
||||||
if (!method->is_initializer()) {
|
if (!method->is_initializer() && !method->is_overpass()) {
|
||||||
if (!publicOnly || method->is_public()) {
|
if (!publicOnly || method->is_public()) {
|
||||||
oop m = Reflection::new_method(method, UseNewReflection, false, CHECK_NULL);
|
oop m = Reflection::new_method(method, UseNewReflection, false, CHECK_NULL);
|
||||||
result->obj_at_put(out_idx, m);
|
result->obj_at_put(out_idx, m);
|
||||||
|
|
|
@ -523,6 +523,14 @@ JVM_GetMethodParameterAnnotations(JNIEnv *env, jobject method);
|
||||||
JNIEXPORT jbyteArray JNICALL
|
JNIEXPORT jbyteArray JNICALL
|
||||||
JVM_GetClassTypeAnnotations(JNIEnv *env, jclass cls);
|
JVM_GetClassTypeAnnotations(JNIEnv *env, jclass cls);
|
||||||
|
|
||||||
|
// field is a handle to a java.lang.reflect.Field object
|
||||||
|
JNIEXPORT jbyteArray JNICALL
|
||||||
|
JVM_GetFieldTypeAnnotations(JNIEnv *env, jobject field);
|
||||||
|
|
||||||
|
// method is a handle to a java.lang.reflect.Method object
|
||||||
|
JNIEXPORT jbyteArray JNICALL
|
||||||
|
JVM_GetMethodTypeAnnotations(JNIEnv *env, jobject method);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* New (JDK 1.4) reflection implementation
|
* New (JDK 1.4) reflection implementation
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -260,6 +260,7 @@ static ObsoleteFlag obsolete_jvm_flags[] = {
|
||||||
{ "CMSRevisitStackSize", JDK_Version::jdk(8), JDK_Version::jdk(9) },
|
{ "CMSRevisitStackSize", JDK_Version::jdk(8), JDK_Version::jdk(9) },
|
||||||
{ "PrintRevisitStats", JDK_Version::jdk(8), JDK_Version::jdk(9) },
|
{ "PrintRevisitStats", JDK_Version::jdk(8), JDK_Version::jdk(9) },
|
||||||
{ "UseVectoredExceptions", JDK_Version::jdk(8), JDK_Version::jdk(9) },
|
{ "UseVectoredExceptions", JDK_Version::jdk(8), JDK_Version::jdk(9) },
|
||||||
|
{ "UseSplitVerifier", JDK_Version::jdk(8), JDK_Version::jdk(9) },
|
||||||
#ifdef PRODUCT
|
#ifdef PRODUCT
|
||||||
{ "DesiredMethodLimit",
|
{ "DesiredMethodLimit",
|
||||||
JDK_Version::jdk_update(7, 2), JDK_Version::jdk(8) },
|
JDK_Version::jdk_update(7, 2), JDK_Version::jdk(8) },
|
||||||
|
@ -1169,7 +1170,6 @@ void Arguments::set_cms_and_parnew_gc_flags() {
|
||||||
set_parnew_gc_flags();
|
set_parnew_gc_flags();
|
||||||
}
|
}
|
||||||
|
|
||||||
// MaxHeapSize is aligned down in collectorPolicy
|
|
||||||
size_t max_heap = align_size_down(MaxHeapSize,
|
size_t max_heap = align_size_down(MaxHeapSize,
|
||||||
CardTableRS::ct_max_alignment_constraint());
|
CardTableRS::ct_max_alignment_constraint());
|
||||||
|
|
||||||
|
@ -1207,10 +1207,6 @@ void Arguments::set_cms_and_parnew_gc_flags() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Code along this path potentially sets NewSize and OldSize
|
// Code along this path potentially sets NewSize and OldSize
|
||||||
|
|
||||||
assert(max_heap >= InitialHeapSize, "Error");
|
|
||||||
assert(max_heap >= NewSize, "Error");
|
|
||||||
|
|
||||||
if (PrintGCDetails && Verbose) {
|
if (PrintGCDetails && Verbose) {
|
||||||
// Too early to use gclog_or_tty
|
// Too early to use gclog_or_tty
|
||||||
tty->print_cr("CMS set min_heap_size: " SIZE_FORMAT
|
tty->print_cr("CMS set min_heap_size: " SIZE_FORMAT
|
||||||
|
|
|
@ -679,9 +679,6 @@ class CommandLineFlags {
|
||||||
product(bool, UseCompilerSafepoints, true, \
|
product(bool, UseCompilerSafepoints, true, \
|
||||||
"Stop at safepoints in compiled code") \
|
"Stop at safepoints in compiled code") \
|
||||||
\
|
\
|
||||||
product(bool, UseSplitVerifier, true, \
|
|
||||||
"use split verifier with StackMapTable attributes") \
|
|
||||||
\
|
|
||||||
product(bool, FailOverToOldVerifier, true, \
|
product(bool, FailOverToOldVerifier, true, \
|
||||||
"fail over to old verifier when split verifier fails") \
|
"fail over to old verifier when split verifier fails") \
|
||||||
\
|
\
|
||||||
|
@ -869,6 +866,11 @@ class CommandLineFlags {
|
||||||
diagnostic(bool, PrintNMTStatistics, false, \
|
diagnostic(bool, PrintNMTStatistics, false, \
|
||||||
"Print native memory tracking summary data if it is on") \
|
"Print native memory tracking summary data if it is on") \
|
||||||
\
|
\
|
||||||
|
diagnostic(bool, AutoShutdownNMT, true, \
|
||||||
|
"Automatically shutdown native memory tracking under stress " \
|
||||||
|
"situation. When set to false, native memory tracking tries to " \
|
||||||
|
"stay alive at the expense of JVM performance") \
|
||||||
|
\
|
||||||
diagnostic(bool, LogCompilation, false, \
|
diagnostic(bool, LogCompilation, false, \
|
||||||
"Log compilation activity in detail to hotspot.log or LogFile") \
|
"Log compilation activity in detail to hotspot.log or LogFile") \
|
||||||
\
|
\
|
||||||
|
@ -2905,6 +2907,10 @@ class CommandLineFlags {
|
||||||
"if non-zero, start verifying C heap after Nth call to " \
|
"if non-zero, start verifying C heap after Nth call to " \
|
||||||
"malloc/realloc/free") \
|
"malloc/realloc/free") \
|
||||||
\
|
\
|
||||||
|
diagnostic(uintx, MallocMaxTestWords, 0, \
|
||||||
|
"if non-zero, max # of Words that malloc/realloc can allocate " \
|
||||||
|
"(for testing only)") \
|
||||||
|
\
|
||||||
product(intx, TypeProfileWidth, 2, \
|
product(intx, TypeProfileWidth, 2, \
|
||||||
"number of receiver types to record in call/cast profile") \
|
"number of receiver types to record in call/cast profile") \
|
||||||
\
|
\
|
||||||
|
@ -3569,8 +3575,9 @@ class CommandLineFlags {
|
||||||
product(uintx, SharedMiscCodeSize, 120*K, \
|
product(uintx, SharedMiscCodeSize, 120*K, \
|
||||||
"Size of the shared miscellaneous code area (in bytes)") \
|
"Size of the shared miscellaneous code area (in bytes)") \
|
||||||
\
|
\
|
||||||
product(uintx, SharedDummyBlockSize, 0, \
|
product(uintx, SharedBaseAddress, LP64_ONLY(32*G) \
|
||||||
"Size of dummy block used to shift heap addresses (in bytes)") \
|
NOT_LP64(LINUX_ONLY(2*G) NOT_LINUX(0)), \
|
||||||
|
"Address to allocate shared memory region for class data") \
|
||||||
\
|
\
|
||||||
diagnostic(bool, EnableInvokeDynamic, true, \
|
diagnostic(bool, EnableInvokeDynamic, true, \
|
||||||
"support JSR 292 (method handles, invokedynamic, " \
|
"support JSR 292 (method handles, invokedynamic, " \
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -80,6 +80,8 @@ julong os::num_frees = 0; // # of calls to free
|
||||||
julong os::free_bytes = 0; // # of bytes freed
|
julong os::free_bytes = 0; // # of bytes freed
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static juint cur_malloc_words = 0; // current size for MallocMaxTestWords
|
||||||
|
|
||||||
void os_init_globals() {
|
void os_init_globals() {
|
||||||
// Called from init_globals().
|
// Called from init_globals().
|
||||||
// See Threads::create_vm() in thread.cpp, and init.cpp.
|
// See Threads::create_vm() in thread.cpp, and init.cpp.
|
||||||
|
@ -570,6 +572,26 @@ void verify_block(void* memblock) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//
|
||||||
|
// This function supports testing of the malloc out of memory
|
||||||
|
// condition without really running the system out of memory.
|
||||||
|
//
|
||||||
|
static u_char* testMalloc(size_t alloc_size) {
|
||||||
|
assert(MallocMaxTestWords > 0, "sanity check");
|
||||||
|
|
||||||
|
if ((cur_malloc_words + (alloc_size / BytesPerWord)) > MallocMaxTestWords) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
u_char* ptr = (u_char*)::malloc(alloc_size);
|
||||||
|
|
||||||
|
if (ptr != NULL) {
|
||||||
|
Atomic::add(((jint) (alloc_size / BytesPerWord)),
|
||||||
|
(volatile jint *) &cur_malloc_words);
|
||||||
|
}
|
||||||
|
return ptr;
|
||||||
|
}
|
||||||
|
|
||||||
void* os::malloc(size_t size, MEMFLAGS memflags, address caller) {
|
void* os::malloc(size_t size, MEMFLAGS memflags, address caller) {
|
||||||
NOT_PRODUCT(inc_stat_counter(&num_mallocs, 1));
|
NOT_PRODUCT(inc_stat_counter(&num_mallocs, 1));
|
||||||
NOT_PRODUCT(inc_stat_counter(&alloc_bytes, size));
|
NOT_PRODUCT(inc_stat_counter(&alloc_bytes, size));
|
||||||
|
@ -579,11 +601,22 @@ void* os::malloc(size_t size, MEMFLAGS memflags, address caller) {
|
||||||
// if NULL is returned the calling functions assume out of memory.
|
// if NULL is returned the calling functions assume out of memory.
|
||||||
size = 1;
|
size = 1;
|
||||||
}
|
}
|
||||||
if (size > size + space_before + space_after) { // Check for rollover.
|
|
||||||
|
const size_t alloc_size = size + space_before + space_after;
|
||||||
|
|
||||||
|
if (size > alloc_size) { // Check for rollover.
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
NOT_PRODUCT(if (MallocVerifyInterval > 0) check_heap());
|
NOT_PRODUCT(if (MallocVerifyInterval > 0) check_heap());
|
||||||
u_char* ptr = (u_char*)::malloc(size + space_before + space_after);
|
|
||||||
|
u_char* ptr;
|
||||||
|
|
||||||
|
if (MallocMaxTestWords > 0) {
|
||||||
|
ptr = testMalloc(alloc_size);
|
||||||
|
} else {
|
||||||
|
ptr = (u_char*)::malloc(alloc_size);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef ASSERT
|
#ifdef ASSERT
|
||||||
if (ptr == NULL) return NULL;
|
if (ptr == NULL) return NULL;
|
||||||
|
|
|
@ -68,6 +68,7 @@ int MemTracker::_thread_count = 255;
|
||||||
volatile jint MemTracker::_pooled_recorder_count = 0;
|
volatile jint MemTracker::_pooled_recorder_count = 0;
|
||||||
volatile unsigned long MemTracker::_processing_generation = 0;
|
volatile unsigned long MemTracker::_processing_generation = 0;
|
||||||
volatile bool MemTracker::_worker_thread_idle = false;
|
volatile bool MemTracker::_worker_thread_idle = false;
|
||||||
|
volatile bool MemTracker::_slowdown_calling_thread = false;
|
||||||
debug_only(intx MemTracker::_main_thread_tid = 0;)
|
debug_only(intx MemTracker::_main_thread_tid = 0;)
|
||||||
NOT_PRODUCT(volatile jint MemTracker::_pending_recorder_count = 0;)
|
NOT_PRODUCT(volatile jint MemTracker::_pending_recorder_count = 0;)
|
||||||
|
|
||||||
|
@ -364,6 +365,12 @@ void MemTracker::create_memory_record(address addr, MEMFLAGS flags,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (thread != NULL) {
|
if (thread != NULL) {
|
||||||
|
// slow down all calling threads except NMT worker thread, so it
|
||||||
|
// can catch up.
|
||||||
|
if (_slowdown_calling_thread && thread != _worker_thread) {
|
||||||
|
os::yield_all();
|
||||||
|
}
|
||||||
|
|
||||||
if (thread->is_Java_thread() && ((JavaThread*)thread)->is_safepoint_visible()) {
|
if (thread->is_Java_thread() && ((JavaThread*)thread)->is_safepoint_visible()) {
|
||||||
JavaThread* java_thread = (JavaThread*)thread;
|
JavaThread* java_thread = (JavaThread*)thread;
|
||||||
JavaThreadState state = java_thread->thread_state();
|
JavaThreadState state = java_thread->thread_state();
|
||||||
|
@ -442,6 +449,7 @@ void MemTracker::enqueue_pending_recorder(MemRecorder* rec) {
|
||||||
#define MAX_SAFEPOINTS_TO_SKIP 128
|
#define MAX_SAFEPOINTS_TO_SKIP 128
|
||||||
#define SAFE_SEQUENCE_THRESHOLD 30
|
#define SAFE_SEQUENCE_THRESHOLD 30
|
||||||
#define HIGH_GENERATION_THRESHOLD 60
|
#define HIGH_GENERATION_THRESHOLD 60
|
||||||
|
#define MAX_RECORDER_THREAD_RATIO 30
|
||||||
|
|
||||||
void MemTracker::sync() {
|
void MemTracker::sync() {
|
||||||
assert(_tracking_level > NMT_off, "NMT is not enabled");
|
assert(_tracking_level > NMT_off, "NMT is not enabled");
|
||||||
|
@ -487,6 +495,13 @@ void MemTracker::sync() {
|
||||||
pending_recorders = _global_recorder;
|
pending_recorders = _global_recorder;
|
||||||
_global_recorder = NULL;
|
_global_recorder = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// see if NMT has too many outstanding recorder instances, it usually
|
||||||
|
// means that worker thread is lagging behind in processing them.
|
||||||
|
if (!AutoShutdownNMT) {
|
||||||
|
_slowdown_calling_thread = (MemRecorder::_instance_count > MAX_RECORDER_THREAD_RATIO * _thread_count);
|
||||||
|
}
|
||||||
|
|
||||||
// check _worker_thread with lock to avoid racing condition
|
// check _worker_thread with lock to avoid racing condition
|
||||||
if (_worker_thread != NULL) {
|
if (_worker_thread != NULL) {
|
||||||
_worker_thread->at_sync_point(pending_recorders, InstanceKlass::number_of_instance_classes());
|
_worker_thread->at_sync_point(pending_recorders, InstanceKlass::number_of_instance_classes());
|
||||||
|
|
|
@ -84,6 +84,7 @@ class MemTracker : AllStatic {
|
||||||
static inline bool baseline() { return false; }
|
static inline bool baseline() { return false; }
|
||||||
static inline bool has_baseline() { return false; }
|
static inline bool has_baseline() { return false; }
|
||||||
|
|
||||||
|
static inline void set_autoShutdown(bool value) { }
|
||||||
static void shutdown(ShutdownReason reason) { }
|
static void shutdown(ShutdownReason reason) { }
|
||||||
static inline bool shutdown_in_progress() { }
|
static inline bool shutdown_in_progress() { }
|
||||||
static bool print_memory_usage(BaselineOutputer& out, size_t unit,
|
static bool print_memory_usage(BaselineOutputer& out, size_t unit,
|
||||||
|
@ -238,6 +239,16 @@ class MemTracker : AllStatic {
|
||||||
// if native memory tracking tracks callsite
|
// if native memory tracking tracks callsite
|
||||||
static inline bool track_callsite() { return _tracking_level == NMT_detail; }
|
static inline bool track_callsite() { return _tracking_level == NMT_detail; }
|
||||||
|
|
||||||
|
// NMT automatically shuts itself down under extreme situation by default.
|
||||||
|
// When the value is set to false, NMT will try its best to stay alive,
|
||||||
|
// even it has to slow down VM.
|
||||||
|
static inline void set_autoShutdown(bool value) {
|
||||||
|
AutoShutdownNMT = value;
|
||||||
|
if (AutoShutdownNMT && _slowdown_calling_thread) {
|
||||||
|
_slowdown_calling_thread = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// shutdown native memory tracking capability. Native memory tracking
|
// shutdown native memory tracking capability. Native memory tracking
|
||||||
// can be shutdown by VM when it encounters low memory scenarios.
|
// can be shutdown by VM when it encounters low memory scenarios.
|
||||||
// Memory tracker should gracefully shutdown itself, and preserve the
|
// Memory tracker should gracefully shutdown itself, and preserve the
|
||||||
|
@ -507,6 +518,10 @@ class MemTracker : AllStatic {
|
||||||
// although NMT is still procesing current generation, but
|
// although NMT is still procesing current generation, but
|
||||||
// there is not more recorder to process, set idle state
|
// there is not more recorder to process, set idle state
|
||||||
static volatile bool _worker_thread_idle;
|
static volatile bool _worker_thread_idle;
|
||||||
|
|
||||||
|
// if NMT should slow down calling thread to allow
|
||||||
|
// worker thread to catch up
|
||||||
|
static volatile bool _slowdown_calling_thread;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // !INCLUDE_NMT
|
#endif // !INCLUDE_NMT
|
||||||
|
|
|
@ -49,6 +49,9 @@ NMTDCmd::NMTDCmd(outputStream* output,
|
||||||
_shutdown("shutdown", "request runtime to shutdown itself and free the " \
|
_shutdown("shutdown", "request runtime to shutdown itself and free the " \
|
||||||
"memory used by runtime.",
|
"memory used by runtime.",
|
||||||
"BOOLEAN", false, "false"),
|
"BOOLEAN", false, "false"),
|
||||||
|
_auto_shutdown("autoShutdown", "automatically shutdown itself under " \
|
||||||
|
"stress situation",
|
||||||
|
"BOOLEAN", true, "true"),
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
_debug("debug", "print tracker statistics. Debug only, not thread safe", \
|
_debug("debug", "print tracker statistics. Debug only, not thread safe", \
|
||||||
"BOOLEAN", false, "false"),
|
"BOOLEAN", false, "false"),
|
||||||
|
@ -61,6 +64,7 @@ NMTDCmd::NMTDCmd(outputStream* output,
|
||||||
_dcmdparser.add_dcmd_option(&_summary_diff);
|
_dcmdparser.add_dcmd_option(&_summary_diff);
|
||||||
_dcmdparser.add_dcmd_option(&_detail_diff);
|
_dcmdparser.add_dcmd_option(&_detail_diff);
|
||||||
_dcmdparser.add_dcmd_option(&_shutdown);
|
_dcmdparser.add_dcmd_option(&_shutdown);
|
||||||
|
_dcmdparser.add_dcmd_option(&_auto_shutdown);
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
_dcmdparser.add_dcmd_option(&_debug);
|
_dcmdparser.add_dcmd_option(&_debug);
|
||||||
#endif
|
#endif
|
||||||
|
@ -84,17 +88,19 @@ void NMTDCmd::execute(TRAPS) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int nopt = 0;
|
int nopt = 0;
|
||||||
if(_summary.is_set() && _summary.value()) { ++nopt; }
|
if (_summary.is_set() && _summary.value()) { ++nopt; }
|
||||||
if(_detail.is_set() && _detail.value()) { ++nopt; }
|
if (_detail.is_set() && _detail.value()) { ++nopt; }
|
||||||
if(_baseline.is_set() && _baseline.value()) { ++nopt; }
|
if (_baseline.is_set() && _baseline.value()) { ++nopt; }
|
||||||
if(_summary_diff.is_set() && _summary_diff.value()) { ++nopt; }
|
if (_summary_diff.is_set() && _summary_diff.value()) { ++nopt; }
|
||||||
if(_detail_diff.is_set() && _detail_diff.value()) { ++nopt; }
|
if (_detail_diff.is_set() && _detail_diff.value()) { ++nopt; }
|
||||||
if(_shutdown.is_set() && _shutdown.value()) { ++nopt; }
|
if (_shutdown.is_set() && _shutdown.value()) { ++nopt; }
|
||||||
|
if (_auto_shutdown.is_set()) { ++nopt; }
|
||||||
|
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
if(_debug.is_set() && _debug.value()) { ++nopt; }
|
if (_debug.is_set() && _debug.value()) { ++nopt; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(nopt > 1) {
|
if (nopt > 1) {
|
||||||
output()->print_cr("At most one of the following option can be specified: " \
|
output()->print_cr("At most one of the following option can be specified: " \
|
||||||
"summary, detail, baseline, summary.diff, detail.diff, shutdown"
|
"summary, detail, baseline, summary.diff, detail.diff, shutdown"
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
|
@ -156,6 +162,8 @@ void NMTDCmd::execute(TRAPS) {
|
||||||
MemTracker::shutdown(MemTracker::NMT_shutdown_user);
|
MemTracker::shutdown(MemTracker::NMT_shutdown_user);
|
||||||
output()->print_cr("Shutdown is in progress, it will take a few moments to " \
|
output()->print_cr("Shutdown is in progress, it will take a few moments to " \
|
||||||
"completely shutdown");
|
"completely shutdown");
|
||||||
|
} else if (_auto_shutdown.is_set()) {
|
||||||
|
MemTracker::set_autoShutdown(_auto_shutdown.value());
|
||||||
} else {
|
} else {
|
||||||
ShouldNotReachHere();
|
ShouldNotReachHere();
|
||||||
output()->print_cr("Unknown command");
|
output()->print_cr("Unknown command");
|
||||||
|
|
|
@ -39,6 +39,7 @@ class NMTDCmd: public DCmdWithParser {
|
||||||
DCmdArgument<bool> _summary_diff;
|
DCmdArgument<bool> _summary_diff;
|
||||||
DCmdArgument<bool> _detail_diff;
|
DCmdArgument<bool> _detail_diff;
|
||||||
DCmdArgument<bool> _shutdown;
|
DCmdArgument<bool> _shutdown;
|
||||||
|
DCmdArgument<bool> _auto_shutdown;
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
DCmdArgument<bool> _debug;
|
DCmdArgument<bool> _debug;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -22,26 +22,16 @@
|
||||||
# questions.
|
# questions.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
## some tests require path to find test source dir
|
||||||
if [ "${TESTSRC}" = "" ]
|
if [ "${TESTSRC}" = "" ]
|
||||||
then
|
then
|
||||||
echo "TESTSRC not set. Test cannot execute. Failed."
|
TESTSRC=${PWD}
|
||||||
exit 1
|
echo "TESTSRC not set. Using "${TESTSRC}" as default"
|
||||||
fi
|
fi
|
||||||
echo "TESTSRC=${TESTSRC}"
|
echo "TESTSRC=${TESTSRC}"
|
||||||
if [ "${TESTJAVA}" = "" ]
|
## Adding common setup Variables for running shell tests.
|
||||||
then
|
. ${TESTSRC}/../../test_env.sh
|
||||||
echo "TESTJAVA not set. Test cannot execute. Failed."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo "TESTJAVA=${TESTJAVA}"
|
|
||||||
if [ "${TESTCLASSES}" = "" ]
|
|
||||||
then
|
|
||||||
echo "TESTCLASSES not set. Test cannot execute. Failed."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo "TESTCLASSES=${TESTCLASSES}"
|
|
||||||
echo "CLASSPATH=${CLASSPATH}"
|
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
|
@ -50,7 +40,7 @@ cp ${TESTSRC}/input6890943.txt .
|
||||||
cp ${TESTSRC}/output6890943.txt .
|
cp ${TESTSRC}/output6890943.txt .
|
||||||
cp ${TESTSRC}/Test6890943.sh .
|
cp ${TESTSRC}/Test6890943.sh .
|
||||||
|
|
||||||
${TESTJAVA}/bin/javac -d . Test6890943.java
|
${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} -d . Test6890943.java
|
||||||
|
|
||||||
${TESTJAVA}/bin/java -XX:-PrintVMOptions -XX:+IgnoreUnrecognizedVMOptions ${TESTVMOPTS} Test6890943 < input6890943.txt > pretest.out 2>&1
|
${TESTJAVA}/bin/java -XX:-PrintVMOptions -XX:+IgnoreUnrecognizedVMOptions ${TESTVMOPTS} Test6890943 < input6890943.txt > pretest.out 2>&1
|
||||||
|
|
||||||
|
|
|
@ -22,26 +22,15 @@
|
||||||
# questions.
|
# questions.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
## some tests require path to find test source dir
|
||||||
if [ "${TESTSRC}" = "" ]
|
if [ "${TESTSRC}" = "" ]
|
||||||
then
|
then
|
||||||
echo "TESTSRC not set. Test cannot execute. Failed."
|
TESTSRC=${PWD}
|
||||||
exit 1
|
echo "TESTSRC not set. Using "${TESTSRC}" as default"
|
||||||
fi
|
fi
|
||||||
echo "TESTSRC=${TESTSRC}"
|
echo "TESTSRC=${TESTSRC}"
|
||||||
if [ "${TESTJAVA}" = "" ]
|
## Adding common setup Variables for running shell tests.
|
||||||
then
|
. ${TESTSRC}/../../test_env.sh
|
||||||
echo "TESTJAVA not set. Test cannot execute. Failed."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo "TESTJAVA=${TESTJAVA}"
|
|
||||||
if [ "${TESTCLASSES}" = "" ]
|
|
||||||
then
|
|
||||||
echo "TESTCLASSES not set. Test cannot execute. Failed."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo "TESTCLASSES=${TESTCLASSES}"
|
|
||||||
echo "CLASSPATH=${CLASSPATH}"
|
|
||||||
|
|
||||||
# Amount of physical memory in megabytes
|
# Amount of physical memory in megabytes
|
||||||
MEM=0
|
MEM=0
|
||||||
|
@ -87,7 +76,7 @@ set -x
|
||||||
cp ${TESTSRC}/Test7005594.java .
|
cp ${TESTSRC}/Test7005594.java .
|
||||||
cp ${TESTSRC}/Test7005594.sh .
|
cp ${TESTSRC}/Test7005594.sh .
|
||||||
|
|
||||||
${TESTJAVA}/bin/javac -d . Test7005594.java
|
${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} -d . Test7005594.java
|
||||||
|
|
||||||
${TESTJAVA}/bin/java ${TESTVMOPTS} -Xms1600m -XX:+IgnoreUnrecognizedVMOptions -XX:-ZapUnusedHeapArea -Xcomp -XX:CompileOnly=Test7005594.test Test7005594 > test.out 2>&1
|
${TESTJAVA}/bin/java ${TESTVMOPTS} -Xms1600m -XX:+IgnoreUnrecognizedVMOptions -XX:-ZapUnusedHeapArea -Xcomp -XX:CompileOnly=Test7005594.test Test7005594 > test.out 2>&1
|
||||||
|
|
||||||
|
|
|
@ -22,33 +22,22 @@
|
||||||
# questions.
|
# questions.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
## some tests require path to find test source dir
|
||||||
if [ "${TESTSRC}" = "" ]
|
if [ "${TESTSRC}" = "" ]
|
||||||
then
|
then
|
||||||
echo "TESTSRC not set. Test cannot execute. Failed."
|
TESTSRC=${PWD}
|
||||||
exit 1
|
echo "TESTSRC not set. Using "${TESTSRC}" as default"
|
||||||
fi
|
fi
|
||||||
echo "TESTSRC=${TESTSRC}"
|
echo "TESTSRC=${TESTSRC}"
|
||||||
if [ "${TESTJAVA}" = "" ]
|
## Adding common setup Variables for running shell tests.
|
||||||
then
|
. ${TESTSRC}/../../test_env.sh
|
||||||
echo "TESTJAVA not set. Test cannot execute. Failed."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo "TESTJAVA=${TESTJAVA}"
|
|
||||||
if [ "${TESTCLASSES}" = "" ]
|
|
||||||
then
|
|
||||||
echo "TESTCLASSES not set. Test cannot execute. Failed."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo "TESTCLASSES=${TESTCLASSES}"
|
|
||||||
echo "CLASSPATH=${CLASSPATH}"
|
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
cp ${TESTSRC}/Test6857159.java .
|
cp ${TESTSRC}/Test6857159.java .
|
||||||
cp ${TESTSRC}/Test6857159.sh .
|
cp ${TESTSRC}/Test6857159.sh .
|
||||||
|
|
||||||
${TESTJAVA}/bin/javac -d . Test6857159.java
|
${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} -d . Test6857159.java
|
||||||
|
|
||||||
${TESTJAVA}/bin/java ${TESTVMOPTS} -Xbatch -XX:+PrintCompilation -XX:CompileOnly=Test6857159\$ct.run Test6857159 > test.out 2>&1
|
${TESTJAVA}/bin/java ${TESTVMOPTS} -Xbatch -XX:+PrintCompilation -XX:CompileOnly=Test6857159\$ct.run Test6857159 > test.out 2>&1
|
||||||
|
|
||||||
|
|
|
@ -22,28 +22,24 @@
|
||||||
# questions.
|
# questions.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
## some tests require path to find test source dir
|
||||||
if [ "${TESTSRC}" = "" ]
|
if [ "${TESTSRC}" = "" ]
|
||||||
then
|
then
|
||||||
echo "TESTSRC not set. Test cannot execute. Failed."
|
TESTSRC=${PWD}
|
||||||
exit 1
|
echo "TESTSRC not set. Using "${TESTSRC}" as default"
|
||||||
fi
|
fi
|
||||||
echo "TESTSRC=${TESTSRC}"
|
echo "TESTSRC=${TESTSRC}"
|
||||||
if [ "${TESTJAVA}" = "" ]
|
## Adding common setup Variables for running shell tests.
|
||||||
then
|
. ${TESTSRC}/../../test_env.sh
|
||||||
echo "TESTJAVA not set. Test cannot execute. Failed."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo "TESTJAVA=${TESTJAVA}"
|
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
${TESTJAVA}/bin/jar xf ${TESTJAVA}/jre/lib/javaws.jar
|
${COMPILEJAVA}/bin/jar xf ${COMPILEJAVA}/jre/lib/javaws.jar
|
||||||
${TESTJAVA}/bin/jar cf foo.jar *
|
${COMPILEJAVA}/bin/jar cf foo.jar *
|
||||||
cp ${TESTSRC}/Test7068051.java ./
|
cp ${TESTSRC}/Test7068051.java ./
|
||||||
${TESTJAVA}/bin/jar -uf0 foo.jar Test7068051.java
|
${COMPILEJAVA}/bin/jar -uf0 foo.jar Test7068051.java
|
||||||
|
|
||||||
${TESTJAVA}/bin/javac -d . Test7068051.java
|
${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} -d . Test7068051.java
|
||||||
|
|
||||||
${TESTJAVA}/bin/java ${TESTVMOPTS} -showversion -Xbatch Test7068051 foo.jar
|
${TESTJAVA}/bin/java ${TESTVMOPTS} -showversion -Xbatch Test7068051 foo.jar
|
||||||
|
|
||||||
|
|
|
@ -22,33 +22,22 @@
|
||||||
# questions.
|
# questions.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
## some tests require path to find test source dir
|
||||||
if [ "${TESTSRC}" = "" ]
|
if [ "${TESTSRC}" = "" ]
|
||||||
then
|
then
|
||||||
echo "TESTSRC not set. Test cannot execute. Failed."
|
TESTSRC=${PWD}
|
||||||
exit 1
|
echo "TESTSRC not set. Using "${TESTSRC}" as default"
|
||||||
fi
|
fi
|
||||||
echo "TESTSRC=${TESTSRC}"
|
echo "TESTSRC=${TESTSRC}"
|
||||||
if [ "${TESTJAVA}" = "" ]
|
## Adding common setup Variables for running shell tests.
|
||||||
then
|
. ${TESTSRC}/../../test_env.sh
|
||||||
echo "TESTJAVA not set. Test cannot execute. Failed."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo "TESTJAVA=${TESTJAVA}"
|
|
||||||
if [ "${TESTCLASSES}" = "" ]
|
|
||||||
then
|
|
||||||
echo "TESTCLASSES not set. Test cannot execute. Failed."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo "TESTCLASSES=${TESTCLASSES}"
|
|
||||||
echo "CLASSPATH=${CLASSPATH}"
|
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
cp ${TESTSRC}/Stemmer.java .
|
cp ${TESTSRC}/Stemmer.java .
|
||||||
cp ${TESTSRC}/words .
|
cp ${TESTSRC}/words .
|
||||||
|
|
||||||
${TESTJAVA}/bin/javac -d . Stemmer.java
|
${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} -d . Stemmer.java
|
||||||
|
|
||||||
${TESTJAVA}/bin/java ${TESTVMOPTS} -Xbatch Stemmer words > test.out 2>&1
|
${TESTJAVA}/bin/java ${TESTVMOPTS} -Xbatch Stemmer words > test.out 2>&1
|
||||||
|
|
||||||
|
|
|
@ -23,50 +23,15 @@
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
|
## some tests require path to find test source dir
|
||||||
if [ "${TESTSRC}" = "" ]
|
if [ "${TESTSRC}" = "" ]
|
||||||
then
|
then
|
||||||
echo "TESTSRC not set. Test cannot execute. Failed."
|
TESTSRC=${PWD}
|
||||||
exit 1
|
echo "TESTSRC not set. Using "${TESTSRC}" as default"
|
||||||
fi
|
fi
|
||||||
echo "TESTSRC=${TESTSRC}"
|
echo "TESTSRC=${TESTSRC}"
|
||||||
if [ "${TESTJAVA}" = "" ]
|
## Adding common setup Variables for running shell tests.
|
||||||
then
|
. ${TESTSRC}/../../test_env.sh
|
||||||
echo "TESTJAVA not set. Test cannot execute. Failed."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo "TESTJAVA=${TESTJAVA}"
|
|
||||||
if [ "${TESTCLASSES}" = "" ]
|
|
||||||
then
|
|
||||||
echo "TESTCLASSES not set. Test cannot execute. Failed."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo "TESTCLASSES=${TESTCLASSES}"
|
|
||||||
echo "CLASSPATH=${CLASSPATH}"
|
|
||||||
|
|
||||||
# set platform-dependent variables
|
|
||||||
OS=`uname -s`
|
|
||||||
case "$OS" in
|
|
||||||
SunOS | Linux | Darwin )
|
|
||||||
NULL=/dev/null
|
|
||||||
PS=":"
|
|
||||||
FS="/"
|
|
||||||
;;
|
|
||||||
Windows_* )
|
|
||||||
NULL=NUL
|
|
||||||
PS=";"
|
|
||||||
FS="\\"
|
|
||||||
;;
|
|
||||||
CYGWIN_* )
|
|
||||||
NULL=/dev/null
|
|
||||||
PS=";"
|
|
||||||
FS="/"
|
|
||||||
;;
|
|
||||||
* )
|
|
||||||
echo "Unrecognized system!"
|
|
||||||
exit 1;
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
|
|
||||||
${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -Xinternalversion | sed 's/amd64/x86/' | grep "x86" | grep "Server VM" | grep "debug"
|
${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -Xinternalversion | sed 's/amd64/x86/' | grep "x86" | grep "Server VM" | grep "debug"
|
||||||
|
|
||||||
|
@ -88,7 +53,7 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cp ${TESTSRC}${FS}TestIntVect.java .
|
cp ${TESTSRC}${FS}TestIntVect.java .
|
||||||
${TESTJAVA}${FS}bin${FS}javac -d . TestIntVect.java
|
${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} -d . TestIntVect.java
|
||||||
|
|
||||||
${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -Xbatch -XX:-TieredCompilation -XX:CICompilerCount=1 -XX:+PrintCompilation -XX:+TraceNewVectors TestIntVect > test.out 2>&1
|
${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -Xbatch -XX:-TieredCompilation -XX:CICompilerCount=1 -XX:+PrintCompilation -XX:+TraceNewVectors TestIntVect > test.out 2>&1
|
||||||
|
|
||||||
|
|
|
@ -5,38 +5,25 @@
|
||||||
## @author yqi
|
## @author yqi
|
||||||
## @run shell test6941923.sh
|
## @run shell test6941923.sh
|
||||||
##
|
##
|
||||||
|
## some tests require path to find test source dir
|
||||||
|
if [ "${TESTSRC}" = "" ]
|
||||||
|
then
|
||||||
|
TESTSRC=${PWD}
|
||||||
|
echo "TESTSRC not set. Using "${TESTSRC}" as default"
|
||||||
|
fi
|
||||||
|
echo "TESTSRC=${TESTSRC}"
|
||||||
|
## Adding common setup Variables for running shell tests.
|
||||||
|
. ${TESTSRC}/../../test_env.sh
|
||||||
|
|
||||||
## skip on windows
|
## skip on windows
|
||||||
OS=`uname -s`
|
OS=`uname -s`
|
||||||
case "$OS" in
|
case "$OS" in
|
||||||
SunOS | Linux | Darwin )
|
|
||||||
NULL=/dev/null
|
|
||||||
PS=":"
|
|
||||||
FS="/"
|
|
||||||
;;
|
|
||||||
Windows_* | CYGWIN_* )
|
Windows_* | CYGWIN_* )
|
||||||
echo "Test skipped for Windows"
|
echo "Test skipped for Windows"
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
* )
|
|
||||||
echo "Unrecognized system!"
|
|
||||||
exit 1;
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ "${JAVA_HOME}" = "" ]
|
|
||||||
then
|
|
||||||
echo "JAVA_HOME not set"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
$JAVA_HOME/bin/java ${TESTVMOPTS} -version > $NULL 2>&1
|
|
||||||
|
|
||||||
if [ $? != 0 ]; then
|
|
||||||
echo "Wrong JAVA_HOME? JAVA_HOME: $JAVA_HOME"
|
|
||||||
exit $?
|
|
||||||
fi
|
|
||||||
|
|
||||||
# create a small test case
|
# create a small test case
|
||||||
testname="Test"
|
testname="Test"
|
||||||
if [ -e ${testname}.java ]; then
|
if [ -e ${testname}.java ]; then
|
||||||
|
@ -96,10 +83,10 @@ msgsuccess="succeeded"
|
||||||
msgfail="failed"
|
msgfail="failed"
|
||||||
gclogsize="16K"
|
gclogsize="16K"
|
||||||
filesize=$((16*1024))
|
filesize=$((16*1024))
|
||||||
$JAVA_HOME/bin/javac ${testname}.java > $NULL 2>&1
|
${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} ${testname}.java > $NULL 2>&1
|
||||||
|
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
echo "$JAVA_HOME/bin/javac ${testname}.java $fail"
|
echo "${COMPILEJAVA}/bin/javac ${testname}.java $fail"
|
||||||
exit -1
|
exit -1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -119,7 +106,7 @@ fi
|
||||||
|
|
||||||
options="-Xloggc:$logfile -XX:+UseConcMarkSweepGC -XX:+PrintGC -XX:+PrintGCDetails -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=1 -XX:GCLogFileSize=$gclogsize"
|
options="-Xloggc:$logfile -XX:+UseConcMarkSweepGC -XX:+PrintGC -XX:+PrintGCDetails -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=1 -XX:GCLogFileSize=$gclogsize"
|
||||||
echo "Test gc log rotation in same file, wait for $tts minutes ...."
|
echo "Test gc log rotation in same file, wait for $tts minutes ...."
|
||||||
$JAVA_HOME/bin/java ${TESTVMOPTS} $options $testname $tts
|
${TESTJAVA}/bin/java $options $testname $tts
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
echo "$msgfail"
|
echo "$msgfail"
|
||||||
exit -1
|
exit -1
|
||||||
|
@ -148,7 +135,7 @@ fi
|
||||||
numoffiles=3
|
numoffiles=3
|
||||||
options="-Xloggc:$logfile -XX:+UseConcMarkSweepGC -XX:+PrintGC -XX:+PrintGCDetails -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=$numoffiles -XX:GCLogFileSize=$gclogsize"
|
options="-Xloggc:$logfile -XX:+UseConcMarkSweepGC -XX:+PrintGC -XX:+PrintGCDetails -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=$numoffiles -XX:GCLogFileSize=$gclogsize"
|
||||||
echo "Test gc log rotation in $numoffiles files, wait for $tts minutes ...."
|
echo "Test gc log rotation in $numoffiles files, wait for $tts minutes ...."
|
||||||
$JAVA_HOME/bin/java ${TESTVMOPTS} $options $testname $tts
|
${TESTJAVA}/bin/java $options $testname $tts
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
echo "$msgfail"
|
echo "$msgfail"
|
||||||
exit -1
|
exit -1
|
||||||
|
|
|
@ -27,78 +27,29 @@
|
||||||
# @summary Loader-constraint table allows arrays instead of only the base-classes
|
# @summary Loader-constraint table allows arrays instead of only the base-classes
|
||||||
# @run shell Test6626217.sh
|
# @run shell Test6626217.sh
|
||||||
#
|
#
|
||||||
|
## some tests require path to find test source dir
|
||||||
if [ "${TESTSRC}" = "" ]
|
if [ "${TESTSRC}" = "" ]
|
||||||
then TESTSRC=.
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${TESTJAVA}" = "" ]
|
|
||||||
then
|
then
|
||||||
PARENT=`dirname \`which java\``
|
TESTSRC=${PWD}
|
||||||
TESTJAVA=`dirname ${PARENT}`
|
echo "TESTSRC not set. Using "${TESTSRC}" as default"
|
||||||
echo "TESTJAVA not set, selecting " ${TESTJAVA}
|
|
||||||
echo "If this is incorrect, try setting the variable manually."
|
|
||||||
fi
|
fi
|
||||||
|
echo "TESTSRC=${TESTSRC}"
|
||||||
if [ "${TESTCLASSES}" = "" ]
|
## Adding common setup Variables for running shell tests.
|
||||||
then
|
. ${TESTSRC}/../../test_env.sh
|
||||||
echo "TESTCLASSES not set. Test cannot execute. Failed."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# set platform-dependent variables
|
|
||||||
OS=`uname -s`
|
|
||||||
case "$OS" in
|
|
||||||
SunOS | Linux | Darwin )
|
|
||||||
NULL=/dev/null
|
|
||||||
PS=":"
|
|
||||||
FS="/"
|
|
||||||
RM=/bin/rm
|
|
||||||
CP=/bin/cp
|
|
||||||
MV=/bin/mv
|
|
||||||
;;
|
|
||||||
Windows_* )
|
|
||||||
NULL=NUL
|
|
||||||
PS=";"
|
|
||||||
FS="\\"
|
|
||||||
RM=rm
|
|
||||||
CP=cp
|
|
||||||
MV=mv
|
|
||||||
;;
|
|
||||||
CYGWIN_* )
|
|
||||||
NULL=/dev/null
|
|
||||||
PS=";"
|
|
||||||
FS="/"
|
|
||||||
RM=rm
|
|
||||||
CP=cp
|
|
||||||
MV=mv
|
|
||||||
;;
|
|
||||||
* )
|
|
||||||
echo "Unrecognized system!"
|
|
||||||
exit 1;
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
JEMMYPATH=${CPAPPEND}
|
|
||||||
CLASSPATH=.${PS}${TESTCLASSES}${PS}${JEMMYPATH} ; export CLASSPATH
|
|
||||||
|
|
||||||
THIS_DIR=`pwd`
|
|
||||||
|
|
||||||
JAVA=${TESTJAVA}${FS}bin${FS}java
|
JAVA=${TESTJAVA}${FS}bin${FS}java
|
||||||
JAVAC=${TESTJAVA}${FS}bin${FS}javac
|
JAVAC=${COMPILEJAVA}${FS}bin${FS}javac
|
||||||
|
|
||||||
${JAVA} ${TESTVMOPTS} -version
|
|
||||||
|
|
||||||
# Current directory is scratch directory, copy all the test source there
|
# Current directory is scratch directory, copy all the test source there
|
||||||
# (for the subsequent moves to work).
|
# (for the subsequent moves to work).
|
||||||
${CP} ${TESTSRC}${FS}* ${THIS_DIR}
|
${CP} ${TESTSRC}${FS}* ${THIS_DIR}
|
||||||
|
|
||||||
# A Clean Compile: this line will probably fail within jtreg as have a clean dir:
|
# A Clean Compile: this line will probably fail within jtreg as have a clean dir:
|
||||||
${RM} -f *.class *.impl many_loader.java
|
${RM} -f *.class *.impl many_loader.java
|
||||||
|
|
||||||
# Compile all the usual suspects, including the default 'many_loader'
|
# Compile all the usual suspects, including the default 'many_loader'
|
||||||
${CP} many_loader1.java.foo many_loader.java
|
${CP} many_loader1.java.foo many_loader.java
|
||||||
${JAVAC} -source 1.4 -target 1.4 -Xlint *.java
|
${JAVAC} ${TESTJAVACOPTS} -source 1.4 -target 1.4 -Xlint *.java
|
||||||
|
|
||||||
# Rename the class files, so the custom loader (and not the system loader) will find it
|
# Rename the class files, so the custom loader (and not the system loader) will find it
|
||||||
${MV} from_loader2.class from_loader2.impl2
|
${MV} from_loader2.class from_loader2.impl2
|
||||||
|
@ -106,7 +57,7 @@ ${MV} from_loader2.class from_loader2.impl2
|
||||||
# Compile the next version of 'many_loader'
|
# Compile the next version of 'many_loader'
|
||||||
${MV} many_loader.class many_loader.impl1
|
${MV} many_loader.class many_loader.impl1
|
||||||
${CP} many_loader2.java.foo many_loader.java
|
${CP} many_loader2.java.foo many_loader.java
|
||||||
${JAVAC} -source 1.4 -target 1.4 -Xlint many_loader.java
|
${JAVAC} ${TESTJAVACOPTS} -source 1.4 -target 1.4 -Xlint many_loader.java
|
||||||
|
|
||||||
# Rename the class file, so the custom loader (and not the system loader) will find it
|
# Rename the class file, so the custom loader (and not the system loader) will find it
|
||||||
${MV} many_loader.class many_loader.impl2
|
${MV} many_loader.class many_loader.impl2
|
||||||
|
|
|
@ -1,71 +1,137 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
#
|
||||||
|
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
|
#
|
||||||
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
|
# under the terms of the GNU General Public License version 2 only, as
|
||||||
|
# published by the Free Software Foundation.
|
||||||
|
#
|
||||||
|
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
# version 2 for more details (a copy is included in the LICENSE file that
|
||||||
|
# accompanied this code).
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License version
|
||||||
|
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||||
|
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
#
|
||||||
|
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||||
|
# or visit www.oracle.com if you need additional information or have any
|
||||||
|
# questions.
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
##
|
##
|
||||||
## @test
|
## @test
|
||||||
## @bug 6878713
|
## @bug 6878713
|
||||||
|
## @bug 7030610
|
||||||
|
## @bug 7037122
|
||||||
|
## @bug 7123945
|
||||||
## @summary Verifier heap corruption, relating to backward jsrs
|
## @summary Verifier heap corruption, relating to backward jsrs
|
||||||
## @run shell/timeout=120 Test6878713.sh
|
## @run shell Test6878713.sh
|
||||||
##
|
##
|
||||||
|
## some tests require path to find test source dir
|
||||||
if [ "${TESTSRC}" = "" ]
|
if [ "${TESTSRC}" = "" ]
|
||||||
then TESTSRC=.
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${TESTJAVA}" = "" ]
|
|
||||||
then
|
then
|
||||||
PARENT=`dirname \`which java\``
|
TESTSRC=${PWD}
|
||||||
TESTJAVA=`dirname ${PARENT}`
|
echo "TESTSRC not set. Using "${TESTSRC}" as default"
|
||||||
echo "TESTJAVA not set, selecting " ${TESTJAVA}
|
|
||||||
echo "If this is incorrect, try setting the variable manually."
|
|
||||||
fi
|
fi
|
||||||
|
echo "TESTSRC=${TESTSRC}"
|
||||||
|
## Adding common setup Variables for running shell tests.
|
||||||
|
. ${TESTSRC}/../../test_env.sh
|
||||||
|
|
||||||
if [ "${TESTCLASSES}" = "" ]
|
TARGET_CLASS=OOMCrashClass1960_2
|
||||||
then
|
|
||||||
echo "TESTCLASSES not set. Test cannot execute. Failed."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# set platform-dependent variables
|
echo "INFO: extracting the target class."
|
||||||
OS=`uname -s`
|
${COMPILEJAVA}${FS}bin${FS}jar xvf \
|
||||||
case "$OS" in
|
${TESTSRC}${FS}testcase.jar ${TARGET_CLASS}.class
|
||||||
SunOS | Linux | Darwin )
|
|
||||||
NULL=/dev/null
|
|
||||||
PS=":"
|
|
||||||
FS="/"
|
|
||||||
;;
|
|
||||||
Windows_* )
|
|
||||||
NULL=NUL
|
|
||||||
PS=";"
|
|
||||||
FS="\\"
|
|
||||||
;;
|
|
||||||
CYGWIN_* )
|
|
||||||
NULL=/dev/null
|
|
||||||
PS=";"
|
|
||||||
FS="/"
|
|
||||||
;;
|
|
||||||
* )
|
|
||||||
echo "Unrecognized system!"
|
|
||||||
exit 1;
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
JEMMYPATH=${CPAPPEND}
|
# remove any hs_err_pid that might exist here
|
||||||
CLASSPATH=.${PS}${TESTCLASSES}${PS}${JEMMYPATH} ; export CLASSPATH
|
rm -f hs_err_pid*.log
|
||||||
|
|
||||||
THIS_DIR=`pwd`
|
echo "INFO: checking for 32-bit versus 64-bit VM."
|
||||||
|
${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -version 2>&1 \
|
||||||
${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -version
|
| grep "64-Bit [^ ][^ ]* VM" > /dev/null 2>&1
|
||||||
|
status="$?"
|
||||||
${TESTJAVA}${FS}bin${FS}jar xvf ${TESTSRC}${FS}testcase.jar
|
if [ "$status" = 0 ]; then
|
||||||
|
echo "INFO: testing a 64-bit VM."
|
||||||
${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} OOMCrashClass1960_2 > test.out 2>&1
|
is_64_bit=true
|
||||||
|
|
||||||
if [ -s core -o -s "hs_*.log" ]
|
|
||||||
then
|
|
||||||
cat hs*.log
|
|
||||||
echo "Test Failed"
|
|
||||||
exit 1
|
|
||||||
else
|
else
|
||||||
echo "Test Passed"
|
echo "INFO: testing a 32-bit VM."
|
||||||
exit 0
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$is_64_bit" = true ]; then
|
||||||
|
# limit is 768MB in 8-byte words (1024 * 1024 * 768 / 8) == 100663296
|
||||||
|
MALLOC_MAX=100663296
|
||||||
|
else
|
||||||
|
# limit is 768MB in 4-byte words (1024 * 1024 * 768 / 4) == 201326592
|
||||||
|
MALLOC_MAX=201326592
|
||||||
|
fi
|
||||||
|
echo "INFO: MALLOC_MAX=$MALLOC_MAX"
|
||||||
|
|
||||||
|
echo "INFO: executing the target class."
|
||||||
|
# -XX:+PrintCommandLineFlags for debugging purposes
|
||||||
|
# -XX:+IgnoreUnrecognizedVMOptions so test will run on a VM without
|
||||||
|
# the new -XX:MallocMaxTestWords option
|
||||||
|
# -XX:+UnlockDiagnosticVMOptions so we can use -XX:MallocMaxTestWords
|
||||||
|
# -XX:MallocMaxTestWords limits malloc to $MALLOC_MAX
|
||||||
|
${TESTJAVA}${FS}bin${FS}java \
|
||||||
|
-XX:+PrintCommandLineFlags \
|
||||||
|
-XX:+IgnoreUnrecognizedVMOptions \
|
||||||
|
-XX:+UnlockDiagnosticVMOptions \
|
||||||
|
-XX:MallocMaxTestWords=$MALLOC_MAX \
|
||||||
|
${TESTVMOPTS} ${TARGET_CLASS} > test.out 2>&1
|
||||||
|
|
||||||
|
echo "INFO: begin contents of test.out:"
|
||||||
|
cat test.out
|
||||||
|
echo "INFO: end contents of test.out."
|
||||||
|
|
||||||
|
echo "INFO: checking for memory allocation error message."
|
||||||
|
# We are looking for this specific memory allocation failure mesg so
|
||||||
|
# we know we exercised the right allocation path with the test class:
|
||||||
|
MESG1="Native memory allocation (malloc) failed to allocate 25696531[0-9][0-9] bytes"
|
||||||
|
grep "$MESG1" test.out
|
||||||
|
status="$?"
|
||||||
|
if [ "$status" = 0 ]; then
|
||||||
|
echo "INFO: found expected memory allocation error message."
|
||||||
|
else
|
||||||
|
echo "INFO: did not find expected memory allocation error message."
|
||||||
|
|
||||||
|
# If we didn't find MESG1 above, then there are several scenarios:
|
||||||
|
# 1) -XX:MallocMaxTestWords is not supported by the current VM and we
|
||||||
|
# didn't fail TARGET_CLASS's memory allocation attempt; instead
|
||||||
|
# we failed to find TARGET_CLASS's main() method. The TARGET_CLASS
|
||||||
|
# is designed to provoke a memory allocation failure during class
|
||||||
|
# loading; we actually don't care about running the class which is
|
||||||
|
# why it doesn't have a main() method.
|
||||||
|
# 2) we failed a memory allocation, but not the one we were looking
|
||||||
|
# so it might be that TARGET_CLASS no longer tickles the same
|
||||||
|
# memory allocation code path
|
||||||
|
# 3) TARGET_CLASS reproduces the failure mode (SIGSEGV) fixed by
|
||||||
|
# 6878713 because the test is running on a pre-fix VM.
|
||||||
|
echo "INFO: checking for no main() method message."
|
||||||
|
MESG2="Error: Main method not found in class"
|
||||||
|
grep "$MESG2" test.out
|
||||||
|
status="$?"
|
||||||
|
if [ "$status" = 0 ]; then
|
||||||
|
echo "INFO: found no main() method message."
|
||||||
|
else
|
||||||
|
echo "FAIL: did not find no main() method message."
|
||||||
|
# status is non-zero for exit below
|
||||||
|
|
||||||
|
if [ -s hs_err_pid*.log ]; then
|
||||||
|
echo "INFO: begin contents of hs_err_pid file:"
|
||||||
|
cat hs_err_pid*.log
|
||||||
|
echo "INFO: end contents of hs_err_pid file."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$status" = 0 ]; then
|
||||||
|
echo "PASS: test found one of the expected messages."
|
||||||
|
fi
|
||||||
|
exit "$status"
|
||||||
|
|
|
@ -7,18 +7,15 @@
|
||||||
## @compile T.java
|
## @compile T.java
|
||||||
## @run shell Test6929067.sh
|
## @run shell Test6929067.sh
|
||||||
##
|
##
|
||||||
|
set -x
|
||||||
if [ "${TESTSRC}" = "" ]
|
if [ "${TESTSRC}" = "" ]
|
||||||
then TESTSRC=.
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${TESTJAVA}" = "" ]
|
|
||||||
then
|
then
|
||||||
PARENT=`dirname \`which java\``
|
TESTSRC=${PWD}
|
||||||
TESTJAVA=`dirname ${PARENT}`
|
echo "TESTSRC not set. Using "${TESTSRC}" as default"
|
||||||
echo "TESTJAVA not set, selecting " ${TESTJAVA}
|
|
||||||
echo "If this is incorrect, try setting the variable manually."
|
|
||||||
fi
|
fi
|
||||||
|
echo "TESTSRC=${TESTSRC}"
|
||||||
|
## Adding common setup Variables for running shell tests.
|
||||||
|
. ${TESTSRC}/../../test_env.sh
|
||||||
|
|
||||||
# set platform-dependent variables
|
# set platform-dependent variables
|
||||||
OS=`uname -s`
|
OS=`uname -s`
|
||||||
|
@ -107,7 +104,7 @@ then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
LD_LIBRARY_PATH=.:${TESTJAVA}/jre/lib/${ARCH}/${VMTYPE}:/usr/lib:$LD_LIBRARY_PATH
|
LD_LIBRARY_PATH=.:${COMPILEJAVA}/jre/lib/${ARCH}/${VMTYPE}:/usr/lib:$LD_LIBRARY_PATH
|
||||||
export LD_LIBRARY_PATH
|
export LD_LIBRARY_PATH
|
||||||
|
|
||||||
cp ${TESTSRC}${FS}invoke.c .
|
cp ${TESTSRC}${FS}invoke.c .
|
||||||
|
@ -115,15 +112,16 @@ cp ${TESTSRC}${FS}invoke.c .
|
||||||
# Copy the result of our @compile action:
|
# Copy the result of our @compile action:
|
||||||
cp ${TESTCLASSES}${FS}T.class .
|
cp ${TESTCLASSES}${FS}T.class .
|
||||||
|
|
||||||
${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -fullversion
|
|
||||||
|
|
||||||
echo "Architecture: ${ARCH}"
|
echo "Architecture: ${ARCH}"
|
||||||
echo "Compilation flag: ${COMP_FLAG}"
|
echo "Compilation flag: ${COMP_FLAG}"
|
||||||
echo "VM type: ${VMTYPE}"
|
echo "VM type: ${VMTYPE}"
|
||||||
|
# Note pthread may not be found thus invoke creation will fail to be created.
|
||||||
|
# Check to ensure you have a /usr/lib/libpthread.so if you don't please look
|
||||||
|
# for /usr/lib/`uname -m`-linux-gnu version ensure to add that path to below compilation.
|
||||||
|
|
||||||
gcc -DLINUX ${COMP_FLAG} -o invoke \
|
gcc -DLINUX ${COMP_FLAG} -o invoke \
|
||||||
-I${TESTJAVA}/include -I${TESTJAVA}/include/linux \
|
-I${COMPILEJAVA}/include -I${COMPILEJAVA}/include/linux \
|
||||||
-L${TESTJAVA}/jre/lib/${ARCH}/${VMTYPE} \
|
-L${COMPILEJAVA}/jre/lib/${ARCH}/${VMTYPE} \
|
||||||
-ljvm -lpthread invoke.c
|
-ljvm -lpthread invoke.c
|
||||||
|
|
||||||
./invoke
|
./invoke
|
||||||
|
|
|
@ -10,55 +10,15 @@
|
||||||
##
|
##
|
||||||
|
|
||||||
if [ "${TESTSRC}" = "" ]
|
if [ "${TESTSRC}" = "" ]
|
||||||
then TESTSRC=.
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${TESTJAVA}" = "" ]
|
|
||||||
then
|
then
|
||||||
PARENT=`dirname \`which java\``
|
TESTSRC=${PWD}
|
||||||
TESTJAVA=`dirname ${PARENT}`
|
echo "TESTSRC not set. Using "${TESTSRC}" as default"
|
||||||
echo "TESTJAVA not set, selecting " ${TESTJAVA}
|
|
||||||
echo "If this is incorrect, try setting the variable manually."
|
|
||||||
fi
|
fi
|
||||||
|
echo "TESTSRC=${TESTSRC}"
|
||||||
|
## Adding common setup Variables for running shell tests.
|
||||||
|
. ${TESTSRC}/../../test_env.sh
|
||||||
|
|
||||||
if [ "${TESTCLASSES}" = "" ]
|
${COMPILEJAVA}${FS}bin${FS}jar xvf ${TESTSRC}${FS}testcase.jar
|
||||||
then
|
|
||||||
echo "TESTCLASSES not set. Test cannot execute. Failed."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# set platform-dependent variables
|
|
||||||
OS=`uname -s`
|
|
||||||
case "$OS" in
|
|
||||||
SunOS | Linux | Darwin )
|
|
||||||
NULL=/dev/null
|
|
||||||
PS=":"
|
|
||||||
FS="/"
|
|
||||||
;;
|
|
||||||
Windows_* )
|
|
||||||
NULL=NUL
|
|
||||||
PS=";"
|
|
||||||
FS="\\"
|
|
||||||
;;
|
|
||||||
CYGWIN_* )
|
|
||||||
NULL=/dev/null
|
|
||||||
PS=";"
|
|
||||||
FS="/"
|
|
||||||
;;
|
|
||||||
* )
|
|
||||||
echo "Unrecognized system!"
|
|
||||||
exit 1;
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
JEMMYPATH=${CPAPPEND}
|
|
||||||
CLASSPATH=.${PS}${TESTCLASSES}${PS}${JEMMYPATH} ; export CLASSPATH
|
|
||||||
|
|
||||||
THIS_DIR=`pwd`
|
|
||||||
|
|
||||||
${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -version
|
|
||||||
|
|
||||||
${TESTJAVA}${FS}bin${FS}jar xvf ${TESTSRC}${FS}testcase.jar
|
|
||||||
|
|
||||||
${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} OOMCrashClass4000_1 > test.out 2>&1
|
${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} OOMCrashClass4000_1 > test.out 2>&1
|
||||||
|
|
||||||
|
|
|
@ -29,34 +29,22 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
if [ "${TESTSRC}" = "" ]
|
if [ "${TESTSRC}" = "" ]
|
||||||
then TESTSRC=.
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${TESTJAVA}" = "" ]
|
|
||||||
then
|
then
|
||||||
PARENT=`dirname \`which java\``
|
TESTSRC=${PWD}
|
||||||
TESTJAVA=`dirname ${PARENT}`
|
echo "TESTSRC not set. Using "${TESTSRC}" as default"
|
||||||
printf "TESTJAVA not set, selecting " ${TESTJAVA}
|
|
||||||
printf " If this is incorrect, try setting the variable manually.\n"
|
|
||||||
fi
|
fi
|
||||||
|
echo "TESTSRC=${TESTSRC}"
|
||||||
|
## Adding common setup Variables for running shell tests.
|
||||||
|
. ${TESTSRC}/../../test_env.sh
|
||||||
|
|
||||||
OS=`uname -s`
|
OS=`uname -s`
|
||||||
case "$OS" in
|
case "$OS" in
|
||||||
SunOS | Linux | Darwin )
|
|
||||||
FS="/"
|
|
||||||
;;
|
|
||||||
Windows_* | CYGWIN_* )
|
Windows_* | CYGWIN_* )
|
||||||
printf "Not testing libjsig.so on Windows. PASSED.\n "
|
printf "Not testing libjsig.so on Windows. PASSED.\n "
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
* )
|
|
||||||
printf "Not testing libjsig.so on unrecognised system. PASSED.\n "
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
JAVA=${TESTJAVA}${FS}bin${FS}java
|
JAVA=${TESTJAVA}${FS}bin${FS}java
|
||||||
|
|
||||||
# LD_PRELOAD arch needs to match the binary we run, so run the java
|
# LD_PRELOAD arch needs to match the binary we run, so run the java
|
||||||
|
@ -97,7 +85,7 @@ case $ARCH in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
LIBJSIG=${TESTJAVA}${FS}jre${FS}lib${FS}${ARCH}${FS}libjsig.so
|
LIBJSIG=${COMPILEJAVA}${FS}jre${FS}lib${FS}${ARCH}${FS}libjsig.so
|
||||||
|
|
||||||
# If libjsig and binary do not match, skip test.
|
# If libjsig and binary do not match, skip test.
|
||||||
|
|
||||||
|
|
|
@ -32,26 +32,19 @@
|
||||||
##
|
##
|
||||||
|
|
||||||
if [ "${TESTSRC}" = "" ]
|
if [ "${TESTSRC}" = "" ]
|
||||||
then TESTSRC=.
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${TESTJAVA}" = "" ]
|
|
||||||
then
|
then
|
||||||
PARENT=`dirname \`which java\``
|
TESTSRC=${PWD}
|
||||||
TESTJAVA=`dirname ${PARENT}`
|
echo "TESTSRC not set. Using "${TESTSRC}" as default"
|
||||||
echo "TESTJAVA not set, selecting " ${TESTJAVA}
|
|
||||||
echo "If this is incorrect, try setting the variable manually."
|
|
||||||
fi
|
fi
|
||||||
|
echo "TESTSRC=${TESTSRC}"
|
||||||
BIT_FLAG=""
|
## Adding common setup Variables for running shell tests.
|
||||||
|
. ${TESTSRC}/../../test_env.sh
|
||||||
|
|
||||||
# set platform-dependent variables
|
# set platform-dependent variables
|
||||||
OS=`uname -s`
|
OS=`uname -s`
|
||||||
case "$OS" in
|
case "$OS" in
|
||||||
Linux)
|
Linux)
|
||||||
NULL=/dev/null
|
echo "Testing on Linux"
|
||||||
PS=":"
|
|
||||||
FS="/"
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
NULL=NUL
|
NULL=NUL
|
||||||
|
@ -64,7 +57,7 @@ esac
|
||||||
|
|
||||||
ARCH=`uname -m`
|
ARCH=`uname -m`
|
||||||
|
|
||||||
THIS_DIR=`pwd`
|
THIS_DIR=.
|
||||||
|
|
||||||
cp ${TESTSRC}${FS}*.java ${THIS_DIR}
|
cp ${TESTSRC}${FS}*.java ${THIS_DIR}
|
||||||
${TESTJAVA}${FS}bin${FS}javac *.java
|
${TESTJAVA}${FS}bin${FS}javac *.java
|
||||||
|
|
|
@ -12,22 +12,13 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
if [ "${TESTSRC}" = "" ]
|
if [ "${TESTSRC}" = "" ]
|
||||||
then TESTSRC=.
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${TESTJAVA}" = "" ]
|
|
||||||
then
|
then
|
||||||
PARENT=`dirname \`which java\``
|
TESTSRC=${PWD}
|
||||||
TESTJAVA=`dirname ${PARENT}`
|
echo "TESTSRC not set. Using "${TESTSRC}" as default"
|
||||||
echo "TESTJAVA not set, selecting " ${TESTJAVA}
|
|
||||||
echo "If this is incorrect, try setting the variable manually."
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${TESTCLASSES}" = "" ]
|
|
||||||
then
|
|
||||||
echo "TESTCLASSES not set. Test cannot execute. Failed."
|
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
echo "TESTSRC=${TESTSRC}"
|
||||||
|
## Adding common setup Variables for running shell tests.
|
||||||
|
. ${TESTSRC}/../../test_env.sh
|
||||||
|
|
||||||
# Jtreg sets TESTVMOPTS which may include -d64 which is
|
# Jtreg sets TESTVMOPTS which may include -d64 which is
|
||||||
# required to test a 64-bit JVM on some platforms.
|
# required to test a 64-bit JVM on some platforms.
|
||||||
|
|
|
@ -10,13 +10,14 @@
|
||||||
## @summary Improve config file parsing
|
## @summary Improve config file parsing
|
||||||
## @run shell Test7158804.sh
|
## @run shell Test7158804.sh
|
||||||
##
|
##
|
||||||
|
if [ "${TESTSRC}" = "" ]
|
||||||
if [ "${TESTJAVA}" = "" ]
|
|
||||||
then
|
then
|
||||||
echo "TESTJAVA not set. Test cannot execute. Failed."
|
TESTSRC=${PWD}
|
||||||
exit 1
|
echo "TESTSRC not set. Using "${TESTSRC}" as default"
|
||||||
fi
|
fi
|
||||||
echo "TESTJAVA=${TESTJAVA}"
|
echo "TESTSRC=${TESTSRC}"
|
||||||
|
## Adding common setup Variables for running shell tests.
|
||||||
|
. ${TESTSRC}/../../test_env.sh
|
||||||
|
|
||||||
rm -f .hotspotrc
|
rm -f .hotspotrc
|
||||||
echo -XX:+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa >.hotspotrc
|
echo -XX:+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa >.hotspotrc
|
||||||
|
|
|
@ -29,27 +29,13 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
if [ "${TESTSRC}" = "" ]
|
if [ "${TESTSRC}" = "" ]
|
||||||
then TESTSRC=.
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${TESTJAVA}" = "" ]
|
|
||||||
then
|
then
|
||||||
PARENT=`dirname \`which java\``
|
TESTSRC=${PWD}
|
||||||
TESTJAVA=`dirname ${PARENT}`
|
echo "TESTSRC not set. Using "${TESTSRC}" as default"
|
||||||
printf "TESTJAVA not set, selecting " ${TESTJAVA}
|
|
||||||
printf " If this is incorrect, try setting the variable manually.\n"
|
|
||||||
fi
|
fi
|
||||||
|
echo "TESTSRC=${TESTSRC}"
|
||||||
# set platform-dependent variables
|
## Adding common setup Variables for running shell tests.
|
||||||
OS=`uname -s`
|
. ${TESTSRC}/../../test_env.sh
|
||||||
case "$OS" in
|
|
||||||
Windows_* )
|
|
||||||
FS="\\"
|
|
||||||
;;
|
|
||||||
* )
|
|
||||||
FS="/"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
JAVA=${TESTJAVA}${FS}bin${FS}java
|
JAVA=${TESTJAVA}${FS}bin${FS}java
|
||||||
|
|
||||||
|
|
|
@ -19,26 +19,26 @@
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
* or visit www.oracle.com if you need additional information or have any
|
||||||
* questions.
|
* questions.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @test
|
* @test
|
||||||
* @bug 8007736
|
* @key regression
|
||||||
* @summary Test static interface method.
|
* @bug 8010389
|
||||||
* @run main/othervm -Xverify:all TestStaticIF
|
* @run main/othervm -Djava.library.path=. VMThreadDlopen
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class TestStaticIF implements StaticMethodInInterface {
|
public class VMThreadDlopen {
|
||||||
|
public static void main(String[] args) throws Exception {
|
||||||
public static void main(String[] args) {
|
File file = new File("libbroken.so");
|
||||||
System.out.printf("main: %s%n", StaticMethodInInterface.get());
|
file.createNewFile();
|
||||||
}
|
try {
|
||||||
}
|
System.loadLibrary("broken");
|
||||||
|
} catch (UnsatisfiedLinkError e) {
|
||||||
interface StaticMethodInInterface {
|
e.printStackTrace();
|
||||||
|
// expected
|
||||||
public static String get() {
|
}
|
||||||
return "Hello from StaticMethodInInterface.get()";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -33,17 +33,17 @@ import com.oracle.java.testlibrary.*;
|
||||||
public class BooleanFlagWithInvalidValue {
|
public class BooleanFlagWithInvalidValue {
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
|
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
|
||||||
"-XX:+UseLargePages=8", "-version");
|
"-XX:+PrintWarnings=8", "-version");
|
||||||
|
|
||||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||||
output.shouldContain("Improperly specified VM option 'UseLargePages=8'");
|
output.shouldContain("Improperly specified VM option 'PrintWarnings=8'");
|
||||||
output.shouldHaveExitValue(1);
|
output.shouldHaveExitValue(1);
|
||||||
|
|
||||||
pb = ProcessTools.createJavaProcessBuilder(
|
pb = ProcessTools.createJavaProcessBuilder(
|
||||||
"-XX:-UseLargePages=8", "-version");
|
"-XX:-PrintWarnings=8", "-version");
|
||||||
|
|
||||||
output = new OutputAnalyzer(pb.start());
|
output = new OutputAnalyzer(pb.start());
|
||||||
output.shouldContain("Improperly specified VM option 'UseLargePages=8'");
|
output.shouldContain("Improperly specified VM option 'PrintWarnings=8'");
|
||||||
output.shouldHaveExitValue(1);
|
output.shouldHaveExitValue(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,10 +33,10 @@ import com.oracle.java.testlibrary.*;
|
||||||
public class FlagWithInvalidValue {
|
public class FlagWithInvalidValue {
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
|
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
|
||||||
"-XX:ObjectAlignmentInBytes=v", "-version");
|
"-XX:MaxRAMFraction=v", "-version");
|
||||||
|
|
||||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||||
output.shouldContain("Improperly specified VM option 'ObjectAlignmentInBytes=v'");
|
output.shouldContain("Improperly specified VM option 'MaxRAMFraction=v'");
|
||||||
output.shouldHaveExitValue(1);
|
output.shouldHaveExitValue(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,17 +33,17 @@ import com.oracle.java.testlibrary.*;
|
||||||
public class NonBooleanFlagWithInvalidBooleanPrefix {
|
public class NonBooleanFlagWithInvalidBooleanPrefix {
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
|
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
|
||||||
"-XX:-ObjectAlignmentInBytes=16", "-version");
|
"-XX:-MaxRAMFraction=16", "-version");
|
||||||
|
|
||||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||||
output.shouldContain("Unexpected +/- setting in VM option 'ObjectAlignmentInBytes=16'");
|
output.shouldContain("Unexpected +/- setting in VM option 'MaxRAMFraction=16'");
|
||||||
output.shouldHaveExitValue(1);
|
output.shouldHaveExitValue(1);
|
||||||
|
|
||||||
pb = ProcessTools.createJavaProcessBuilder(
|
pb = ProcessTools.createJavaProcessBuilder(
|
||||||
"-XX:+ObjectAlignmentInBytes=16", "-version");
|
"-XX:+MaxRAMFraction=16", "-version");
|
||||||
|
|
||||||
output = new OutputAnalyzer(pb.start());
|
output = new OutputAnalyzer(pb.start());
|
||||||
output.shouldContain("Unexpected +/- setting in VM option 'ObjectAlignmentInBytes=16'");
|
output.shouldContain("Unexpected +/- setting in VM option 'MaxRAMFraction=16'");
|
||||||
output.shouldHaveExitValue(1);
|
output.shouldHaveExitValue(1);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class BaselineWithParameter {
|
||||||
|
|
||||||
// Run 'jcmd <pid> VM.native_memory baseline=false'
|
// Run 'jcmd <pid> VM.native_memory baseline=false'
|
||||||
pb.command(new String[] { JDKToolFinder.getJDKTool("jcmd"), pid, "VM.native_memory", "baseline=false"});
|
pb.command(new String[] { JDKToolFinder.getJDKTool("jcmd"), pid, "VM.native_memory", "baseline=false"});
|
||||||
pb.start();
|
pb.start().waitFor();
|
||||||
|
|
||||||
// Run 'jcmd <pid> VM.native_memory summary=false'
|
// Run 'jcmd <pid> VM.native_memory summary=false'
|
||||||
pb.command(new String[] { JDKToolFinder.getJDKTool("jcmd"), pid, "VM.native_memory", "summary=false"});
|
pb.command(new String[] { JDKToolFinder.getJDKTool("jcmd"), pid, "VM.native_memory", "summary=false"});
|
||||||
|
|
|
@ -27,7 +27,9 @@
|
||||||
* @bug 8005936
|
* @bug 8005936
|
||||||
* @summary Make sure PrintNMTStatistics works on normal JVM exit
|
* @summary Make sure PrintNMTStatistics works on normal JVM exit
|
||||||
* @library /testlibrary /testlibrary/whitebox
|
* @library /testlibrary /testlibrary/whitebox
|
||||||
* @run compile PrintNMTStatistics.java
|
* @build PrintNMTStatistics
|
||||||
|
* @run main ClassFileInstaller sun.hotspot.WhiteBox
|
||||||
|
* @run main PrintNMTStatistics
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import com.oracle.java.testlibrary.*;
|
import com.oracle.java.testlibrary.*;
|
||||||
|
@ -52,13 +54,15 @@ public class PrintNMTStatistics {
|
||||||
|
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
|
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
|
||||||
"-XX:+UnlockDiagnosticVMOptions",
|
"-XX:+UnlockDiagnosticVMOptions",
|
||||||
|
"-Xbootclasspath/a:.",
|
||||||
|
"-XX:+WhiteBoxAPI",
|
||||||
"-XX:NativeMemoryTracking=summary",
|
"-XX:NativeMemoryTracking=summary",
|
||||||
"+XX:+PrintNMTStatistics",
|
"-XX:+PrintNMTStatistics",
|
||||||
"PrintNMTStatistics",
|
"PrintNMTStatistics",
|
||||||
"test");
|
"test");
|
||||||
|
|
||||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||||
output.shouldContain("Java Heap (reserved=");
|
output.shouldContain("Java Heap (reserved=");
|
||||||
output.shouldNotContain("error");
|
output.shouldNotContain("error");
|
||||||
output.shouldNotContain("warning");
|
output.shouldNotContain("warning");
|
||||||
output.shouldHaveExitValue(0);
|
output.shouldHaveExitValue(0);
|
||||||
|
|
193
hotspot/test/test_env.sh
Normal file
193
hotspot/test/test_env.sh
Normal file
|
@ -0,0 +1,193 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
|
#
|
||||||
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
|
# under the terms of the GNU General Public License version 2 only, as
|
||||||
|
# published by the Free Software Foundation.
|
||||||
|
#
|
||||||
|
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
# version 2 for more details (a copy is included in the LICENSE file that
|
||||||
|
# accompanied this code).
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License version
|
||||||
|
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||||
|
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
#
|
||||||
|
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||||
|
# or visit www.oracle.com if you need additional information or have any
|
||||||
|
# questions.
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# This Environment script was written to capture typically used environment
|
||||||
|
# setup for a given shell test.
|
||||||
|
#
|
||||||
|
|
||||||
|
# TESTJAVA can be a JDK or JRE. If JRE you need to set COMPILEJAVA
|
||||||
|
if [ "${TESTJAVA}" = "" ]
|
||||||
|
then
|
||||||
|
echo "TESTJAVA not set. Test cannot execute. Failed."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "TESTJAVA=${TESTJAVA}"
|
||||||
|
|
||||||
|
# COMPILEJAVA requires a JDK, some shell test use javac,jar,etc
|
||||||
|
if [ "${COMPILEJAVA}" = "" ]
|
||||||
|
then
|
||||||
|
echo "COMPILEJAVA not set. Using TESTJAVA as default"
|
||||||
|
COMPILEJAVA=${TESTJAVA}
|
||||||
|
fi
|
||||||
|
echo "COMPILEJAVA=${COMPILEJAVA}"
|
||||||
|
|
||||||
|
if [ "${TESTCLASSES}" = "" ]
|
||||||
|
then
|
||||||
|
echo "TESTCLASES not set. Using "." as default"
|
||||||
|
TESTCLASSES=.
|
||||||
|
fi
|
||||||
|
echo "TESTCLASSES=${TESTCLASSES}"
|
||||||
|
|
||||||
|
# set platform-dependent variables
|
||||||
|
OS=`uname -s`
|
||||||
|
case "$OS" in
|
||||||
|
SunOS | Linux | Darwin )
|
||||||
|
NULL=/dev/null
|
||||||
|
PS=":"
|
||||||
|
FS="/"
|
||||||
|
RM=/bin/rm
|
||||||
|
CP=/bin/cp
|
||||||
|
MV=/bin/mv
|
||||||
|
;;
|
||||||
|
Windows_* )
|
||||||
|
NULL=NUL
|
||||||
|
PS=";"
|
||||||
|
FS="\\"
|
||||||
|
RM=rm
|
||||||
|
CP=cp
|
||||||
|
MV=mv
|
||||||
|
;;
|
||||||
|
CYGWIN_* )
|
||||||
|
NULL=/dev/null
|
||||||
|
PS=";"
|
||||||
|
FS="/"
|
||||||
|
RM=rm
|
||||||
|
CP=cp
|
||||||
|
MV=mv
|
||||||
|
;;
|
||||||
|
* )
|
||||||
|
echo "Unrecognized system!"
|
||||||
|
exit 1;
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
export NULL PS FS RM CP MV
|
||||||
|
echo "NULL =${NULL}"
|
||||||
|
echo "PS =${PS}"
|
||||||
|
echo "FS =${FS}"
|
||||||
|
echo "RM =${RM}"
|
||||||
|
echo "CP =${CP}"
|
||||||
|
echo "MV =${MV}"
|
||||||
|
|
||||||
|
# jtreg -classpathappend:<path>
|
||||||
|
JEMMYPATH=${CPAPPEND}
|
||||||
|
CLASSPATH=.${PS}${TESTCLASSES}${PS}${JEMMYPATH} ; export CLASSPATH
|
||||||
|
echo "CLASSPATH =${CLASSPATH}"
|
||||||
|
|
||||||
|
# Current directory is scratch directory
|
||||||
|
THIS_DIR=.
|
||||||
|
echo "THIS_DIR=${THIS_DIR}"
|
||||||
|
|
||||||
|
# Check to ensure the java defined actually works
|
||||||
|
${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -version
|
||||||
|
if [ $? != 0 ]; then
|
||||||
|
echo "Wrong TESTJAVA or TESTVMOPTS:"
|
||||||
|
echo $TESTJAVA TESTVMOPTS
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -Xinternalversion > vm_version.out 2>&1
|
||||||
|
|
||||||
|
VM_TYPE="unknown"
|
||||||
|
grep "Server" vm_version.out > ${NULL}
|
||||||
|
if [ $? = 0 ]
|
||||||
|
then
|
||||||
|
VM_TYPE="server"
|
||||||
|
fi
|
||||||
|
grep "Client" vm_version.out > ${NULL}
|
||||||
|
if [ $? = 0 ]
|
||||||
|
then
|
||||||
|
VM_TYPE="client"
|
||||||
|
fi
|
||||||
|
|
||||||
|
VM_BITS="32"
|
||||||
|
grep "64-Bit" vm_version.out > ${NULL}
|
||||||
|
if [ $? = 0 ]
|
||||||
|
then
|
||||||
|
VM_BITS="64"
|
||||||
|
fi
|
||||||
|
|
||||||
|
VM_OS="unknown"
|
||||||
|
grep "solaris" vm_version.out > ${NULL}
|
||||||
|
if [ $? = 0 ]
|
||||||
|
then
|
||||||
|
VM_OS="solaris"
|
||||||
|
fi
|
||||||
|
grep "linux" vm_version.out > ${NULL}
|
||||||
|
if [ $? = 0 ]
|
||||||
|
then
|
||||||
|
VM_OS="linux"
|
||||||
|
fi
|
||||||
|
grep "windows" vm_version.out > ${NULL}
|
||||||
|
if [ $? = 0 ]
|
||||||
|
then
|
||||||
|
VM_OS="windows"
|
||||||
|
fi
|
||||||
|
grep "bsd" vm_version.out > ${NULL}
|
||||||
|
if [ $? = 0 ]
|
||||||
|
then
|
||||||
|
VM_OS="bsd"
|
||||||
|
fi
|
||||||
|
|
||||||
|
VM_CPU="unknown"
|
||||||
|
grep "sparc" vm_version.out > ${NULL}
|
||||||
|
if [ $? = 0 ]
|
||||||
|
then
|
||||||
|
VM_CPU="sparc"
|
||||||
|
if [ $VM_BITS = "64" ]
|
||||||
|
then
|
||||||
|
VM_CPU="sparcv9"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
grep "x86" vm_version.out > ${NULL}
|
||||||
|
if [ $? = 0 ]
|
||||||
|
then
|
||||||
|
VM_CPU="i386"
|
||||||
|
fi
|
||||||
|
grep "amd64" vm_version.out > ${NULL}
|
||||||
|
if [ $? = 0 ]
|
||||||
|
then
|
||||||
|
VM_CPU="amd64"
|
||||||
|
fi
|
||||||
|
grep "arm" vm_version.out > ${NULL}
|
||||||
|
if [ $? = 0 ]
|
||||||
|
then
|
||||||
|
VM_CPU="arm"
|
||||||
|
fi
|
||||||
|
grep "ppc" vm_version.out > ${NULL}
|
||||||
|
if [ $? = 0 ]
|
||||||
|
then
|
||||||
|
VM_CPU="ppc"
|
||||||
|
fi
|
||||||
|
grep "ia64" vm_version.out > ${NULL}
|
||||||
|
if [ $? = 0 ]
|
||||||
|
then
|
||||||
|
VM_CPU="ia64"
|
||||||
|
fi
|
||||||
|
export VM_TYPE VM_BITS VM_OS VM_CPU
|
||||||
|
echo "VM_TYPE=${VM_TYPE}"
|
||||||
|
echo "VM_BITS=${VM_BITS}"
|
||||||
|
echo "VM_OS=${VM_OS}"
|
||||||
|
echo "VM_CPU=${VM_CPU}"
|
|
@ -204,3 +204,4 @@ c933505d75c2a0a671f06d6dac5d2237a9228d2d jdk8-b79
|
||||||
dfb40f066c6ce129822f0f5dc2ac89173808781a jdk8-b80
|
dfb40f066c6ce129822f0f5dc2ac89173808781a jdk8-b80
|
||||||
c0f8022eba536dcdc8aae659005b33f3982b9368 jdk8-b81
|
c0f8022eba536dcdc8aae659005b33f3982b9368 jdk8-b81
|
||||||
624bcb4800065c6656171948e31ebb2925f25c7a jdk8-b82
|
624bcb4800065c6656171948e31ebb2925f25c7a jdk8-b82
|
||||||
|
ac519af51769e92c51b597a730974e8607357709 jdk8-b83
|
||||||
|
|
|
@ -45,7 +45,7 @@ SUBDIRS_management = jmx
|
||||||
SUBDIRS_desktop = image
|
SUBDIRS_desktop = image
|
||||||
SUBDIRS_enterprise = crypto/provider jndi \
|
SUBDIRS_enterprise = crypto/provider jndi \
|
||||||
org rowset net/httpserver
|
org rowset net/httpserver
|
||||||
SUBDIRS_misc = $(SCRIPT_SUBDIR) tracing servicetag nio demo
|
SUBDIRS_misc = $(SCRIPT_SUBDIR) tracing nio demo
|
||||||
|
|
||||||
SUBDIRS_tools = tools
|
SUBDIRS_tools = tools
|
||||||
|
|
||||||
|
|
|
@ -1,80 +0,0 @@
|
||||||
# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
#
|
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
|
||||||
# under the terms of the GNU General Public License version 2 only, as
|
|
||||||
# published by the Free Software Foundation. Oracle designates this
|
|
||||||
# particular file as subject to the "Classpath" exception as provided
|
|
||||||
# by Oracle in the LICENSE file that accompanied this code.
|
|
||||||
#
|
|
||||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
# version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
# accompanied this code).
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License version
|
|
||||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
#
|
|
||||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
# or visit www.oracle.com if you need additional information or have any
|
|
||||||
# questions.
|
|
||||||
|
|
||||||
BUILDDIR = ../../..
|
|
||||||
PACKAGE = com.sun.servicetag
|
|
||||||
PRODUCT = sun
|
|
||||||
include $(BUILDDIR)/common/Defs.gmk
|
|
||||||
|
|
||||||
#
|
|
||||||
# Files to compile
|
|
||||||
#
|
|
||||||
AUTO_FILES_JAVA_DIRS = com/sun/servicetag
|
|
||||||
|
|
||||||
#
|
|
||||||
# Rules
|
|
||||||
#
|
|
||||||
include $(BUILDDIR)/common/Classes.gmk
|
|
||||||
|
|
||||||
SERVICETAG_LIBDIR = $(LIBDIR)/servicetag
|
|
||||||
SERVICETAG_RESOURCES_DIR = $(CLASSDESTDIR)/com/sun/servicetag/resources
|
|
||||||
FILES_copy = $(SERVICETAG_RESOURCES_DIR)/product_registration.xsd \
|
|
||||||
$(SERVICETAG_RESOURCES_DIR)/register.html \
|
|
||||||
$(SERVICETAG_RESOURCES_DIR)/register_ja.html \
|
|
||||||
$(SERVICETAG_RESOURCES_DIR)/register_zh_CN.html \
|
|
||||||
$(SERVICETAG_LIBDIR)/jdk_header.png
|
|
||||||
|
|
||||||
# Add all properties files to the FILES_copy list
|
|
||||||
SWORDFISH_properties := $(shell \
|
|
||||||
$(CD) $(SHARE_SRC)/classes/com/sun/servicetag/resources; \
|
|
||||||
$(FIND) . -name 'javase_*.properties' -print ; \
|
|
||||||
)
|
|
||||||
FILES_copy += $(shell \
|
|
||||||
for f in $(SWORDFISH_properties) ; do \
|
|
||||||
echo $(SERVICETAG_RESOURCES_DIR)/$$f ; \
|
|
||||||
done \
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
#OTHER_JAVACFLAGS += -Xlint:unchecked
|
|
||||||
|
|
||||||
build: install-servicetag-lib copy-files
|
|
||||||
|
|
||||||
copy-files: $(FILES_copy)
|
|
||||||
|
|
||||||
$(CLASSBINDIR)/%: $(SHARE_SRC)/classes/%
|
|
||||||
$(install-file)
|
|
||||||
|
|
||||||
$(SERVICETAG_LIBDIR)/jdk_header.png: $(SHARE_SRC)/classes/com/sun/servicetag/resources/jdk_header.png
|
|
||||||
$(install-file)
|
|
||||||
$(call chmod-file, 444)
|
|
||||||
|
|
||||||
install-servicetag-lib:
|
|
||||||
@$(RM) -rf $(SERVICETAG_LIBDIR)
|
|
||||||
$(MKDIR) $(SERVICETAG_LIBDIR)
|
|
||||||
|
|
||||||
clean clobber::
|
|
||||||
@$(RM) $(FILES_copy)
|
|
||||||
|
|
||||||
.PHONY: copy-files
|
|
|
@ -59,8 +59,7 @@ EXCLUDE_PROPWARN_PKGS = com.sun.java.swing.plaf.windows \
|
||||||
# This is an interim solution until the ct.sym is replaced
|
# This is an interim solution until the ct.sym is replaced
|
||||||
# with a new module system (being discussed for JDK 8).
|
# with a new module system (being discussed for JDK 8).
|
||||||
#
|
#
|
||||||
EXPORTED_PRIVATE_PKGS = com.sun.servicetag \
|
EXPORTED_PRIVATE_PKGS = com.oracle.net \
|
||||||
com.oracle.net \
|
|
||||||
com.oracle.nio
|
com.oracle.nio
|
||||||
|
|
||||||
# 64-bit solaris has a few special cases. We define the variable
|
# 64-bit solaris has a few special cases. We define the variable
|
||||||
|
|
|
@ -209,6 +209,7 @@ JAVA_JAVA_java = \
|
||||||
sun/util/locale/provider/CalendarDataProviderImpl.java \
|
sun/util/locale/provider/CalendarDataProviderImpl.java \
|
||||||
sun/util/locale/provider/CalendarDataUtility.java \
|
sun/util/locale/provider/CalendarDataUtility.java \
|
||||||
sun/util/locale/provider/CalendarNameProviderImpl.java \
|
sun/util/locale/provider/CalendarNameProviderImpl.java \
|
||||||
|
sun/util/locale/provider/CalendarProviderImpl.java \
|
||||||
sun/util/locale/provider/CollationRules.java \
|
sun/util/locale/provider/CollationRules.java \
|
||||||
sun/util/locale/provider/CollatorProviderImpl.java \
|
sun/util/locale/provider/CollatorProviderImpl.java \
|
||||||
sun/util/locale/provider/CurrencyNameProviderImpl.java \
|
sun/util/locale/provider/CurrencyNameProviderImpl.java \
|
||||||
|
@ -232,6 +233,7 @@ JAVA_JAVA_java = \
|
||||||
sun/util/locale/provider/SPILocaleProviderAdapter.java \
|
sun/util/locale/provider/SPILocaleProviderAdapter.java \
|
||||||
sun/util/locale/provider/TimeZoneNameProviderImpl.java \
|
sun/util/locale/provider/TimeZoneNameProviderImpl.java \
|
||||||
sun/util/locale/provider/TimeZoneNameUtility.java \
|
sun/util/locale/provider/TimeZoneNameUtility.java \
|
||||||
|
sun/util/spi/CalendarProvider.java \
|
||||||
java/util/LocaleISOData.java \
|
java/util/LocaleISOData.java \
|
||||||
sun/util/cldr/CLDRLocaleProviderAdapter.java \
|
sun/util/cldr/CLDRLocaleProviderAdapter.java \
|
||||||
java/util/MissingResourceException.java \
|
java/util/MissingResourceException.java \
|
||||||
|
|
|
@ -133,6 +133,7 @@ SUNWprivate_1.1 {
|
||||||
Java_java_lang_ClassLoader_00024NativeLibrary_find;
|
Java_java_lang_ClassLoader_00024NativeLibrary_find;
|
||||||
Java_java_lang_ClassLoader_00024NativeLibrary_load;
|
Java_java_lang_ClassLoader_00024NativeLibrary_load;
|
||||||
Java_java_lang_ClassLoader_00024NativeLibrary_unload;
|
Java_java_lang_ClassLoader_00024NativeLibrary_unload;
|
||||||
|
Java_java_lang_ClassLoader_00024NativeLibrary_findBuiltinLib;
|
||||||
Java_java_lang_ClassLoader_getCaller;
|
Java_java_lang_ClassLoader_getCaller;
|
||||||
Java_java_lang_ClassLoader_registerNatives;
|
Java_java_lang_ClassLoader_registerNatives;
|
||||||
Java_java_lang_Compiler_registerNatives;
|
Java_java_lang_Compiler_registerNatives;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -384,9 +384,7 @@ OTHER_INCLUDES += \
|
||||||
ifeq ($(PLATFORM),windows)
|
ifeq ($(PLATFORM),windows)
|
||||||
OTHER_LDLIBS += $(JVMLIB) ws2_32.lib \
|
OTHER_LDLIBS += $(JVMLIB) ws2_32.lib \
|
||||||
-libpath:$(LIBDIR) java.lib \
|
-libpath:$(LIBDIR) java.lib \
|
||||||
$(OBJDIR)/../../../../sun/java.net/net/$(OBJDIRNAME)/net.lib \
|
$(OBJDIR)/../../../../sun/java.net/net/$(OBJDIRNAME)/net.lib
|
||||||
$(OBJDIR)/../../../java.lang/java/$(OBJDIRNAME)/io_util.obj \
|
|
||||||
$(OBJDIR)/../../../java.lang/java/$(OBJDIRNAME)/FileDescriptor_md.obj
|
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM), linux)
|
ifeq ($(PLATFORM), linux)
|
||||||
OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -ljava -lnet -lpthread $(LIBDL)
|
OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -ljava -lnet -lpthread $(LIBDL)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -76,6 +76,7 @@ FILES_c = \
|
||||||
debug_trace.c \
|
debug_trace.c \
|
||||||
debug_util.c \
|
debug_util.c \
|
||||||
awt_Plugin.c \
|
awt_Plugin.c \
|
||||||
|
gnome_interface.c \
|
||||||
gtk2_interface.c \
|
gtk2_interface.c \
|
||||||
swing_GTKEngine.c \
|
swing_GTKEngine.c \
|
||||||
swing_GTKStyle.c \
|
swing_GTKStyle.c \
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -843,6 +843,7 @@ LIBAWT_XAWT_FILES:=\
|
||||||
debug_trace.c \
|
debug_trace.c \
|
||||||
debug_util.c \
|
debug_util.c \
|
||||||
awt_Plugin.c \
|
awt_Plugin.c \
|
||||||
|
gnome_interface.c \
|
||||||
gtk2_interface.c \
|
gtk2_interface.c \
|
||||||
swing_GTKEngine.c \
|
swing_GTKEngine.c \
|
||||||
swing_GTKStyle.c \
|
swing_GTKStyle.c \
|
||||||
|
@ -1959,8 +1960,6 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBNIO,\
|
||||||
-lsendfile -ljava -lnet -lc,\
|
-lsendfile -ljava -lnet -lc,\
|
||||||
LDFLAGS_SUFFIX_windows:=jvm.lib ws2_32.lib $(WIN_JAVA_LIB) \
|
LDFLAGS_SUFFIX_windows:=jvm.lib ws2_32.lib $(WIN_JAVA_LIB) \
|
||||||
$(JDK_OUTPUTDIR)/objs/libnet/net.lib \
|
$(JDK_OUTPUTDIR)/objs/libnet/net.lib \
|
||||||
$(JDK_OUTPUTDIR)/objs/libjava/io_util.obj \
|
|
||||||
$(JDK_OUTPUTDIR)/objs/libjava/FileDescriptor_md.obj \
|
|
||||||
advapi32.lib,\
|
advapi32.lib,\
|
||||||
LDFLAGS_SUFFIX_macosx:=-ljava -lnet -pthread -framework CoreFoundation,\
|
LDFLAGS_SUFFIX_macosx:=-ljava -lnet -pthread -framework CoreFoundation,\
|
||||||
LDFLAGS_SUFFIX:=,\
|
LDFLAGS_SUFFIX:=,\
|
||||||
|
@ -2387,18 +2386,23 @@ endif
|
||||||
|
|
||||||
ifndef BUILD_HEADLESS_ONLY
|
ifndef BUILD_HEADLESS_ONLY
|
||||||
LIBSPLASHSCREEN_DIRS:=\
|
LIBSPLASHSCREEN_DIRS:=\
|
||||||
$(JDK_TOPDIR)/src/share/native/sun/awt/giflib \
|
|
||||||
$(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg \
|
$(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg \
|
||||||
$(JDK_TOPDIR)/src/share/native/sun/awt/libpng \
|
$(JDK_TOPDIR)/src/share/native/sun/awt/libpng \
|
||||||
$(JDK_TOPDIR)/src/share/native/sun/awt/splashscreen
|
$(JDK_TOPDIR)/src/share/native/sun/awt/splashscreen
|
||||||
|
|
||||||
|
ifeq ($(USE_EXTERNAL_LIBGIF),true)
|
||||||
|
GIFLIB_LDFLAGS := -lgif
|
||||||
|
else
|
||||||
|
LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/share/native/sun/awt/giflib
|
||||||
|
GIFLIB_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/awt/giflib
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(OPENJDK_TARGET_OS), macosx)
|
ifneq ($(OPENJDK_TARGET_OS), macosx)
|
||||||
LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt/splashscreen
|
LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt/splashscreen
|
||||||
else
|
else
|
||||||
LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/macosx/native/sun/awt/splashscreen
|
LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/macosx/native/sun/awt/splashscreen
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
LIBSPLASHSCREEN_CFLAGS:=-DSPLASHSCREEN -DPNG_NO_MMX_CODE \
|
LIBSPLASHSCREEN_CFLAGS:=-DSPLASHSCREEN -DPNG_NO_MMX_CODE \
|
||||||
$(foreach dir,$(LIBSPLASHSCREEN_DIRS),-I$(dir))
|
$(foreach dir,$(LIBSPLASHSCREEN_DIRS),-I$(dir))
|
||||||
|
|
||||||
|
@ -2450,11 +2454,11 @@ $(eval $(call SetupNativeCompilation,LIBSPLASHSCREEN,\
|
||||||
EXCLUDE_FILES:=imageioJPEG.c jpegdecoder.c pngtest.c,\
|
EXCLUDE_FILES:=imageioJPEG.c jpegdecoder.c pngtest.c,\
|
||||||
LANG:=C,\
|
LANG:=C,\
|
||||||
OPTIMIZATION:=LOW, \
|
OPTIMIZATION:=LOW, \
|
||||||
CFLAGS:=$(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB),\
|
CFLAGS:=$(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB) $(GIFLIB_CFLAGS),\
|
||||||
MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libsplashscreen/mapfile-vers, \
|
MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libsplashscreen/mapfile-vers, \
|
||||||
LDFLAGS:=$(LDFLAGS_JDKLIB) \
|
LDFLAGS:=$(LDFLAGS_JDKLIB) \
|
||||||
$(call SET_SHARED_LIBRARY_ORIGIN),\
|
$(call SET_SHARED_LIBRARY_ORIGIN),\
|
||||||
LDFLAGS_SUFFIX:=$(LIBSPLASHSCREEN_LDFLAGS_SUFFIX) $(LIBZ),\
|
LDFLAGS_SUFFIX:=$(LIBSPLASHSCREEN_LDFLAGS_SUFFIX) $(LIBZ) $(GIFLIB_LDFLAGS),\
|
||||||
LDFLAGS_SUFFIX_solaris:=-lc,\
|
LDFLAGS_SUFFIX_solaris:=-lc,\
|
||||||
VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
|
VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
|
||||||
RC_FLAGS:=$(RC_FLAGS)\
|
RC_FLAGS:=$(RC_FLAGS)\
|
||||||
|
|
|
@ -81,17 +81,6 @@ endif
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
|
|
||||||
LIBDIR = $(JDK_OUTPUTDIR)/lib
|
LIBDIR = $(JDK_OUTPUTDIR)/lib
|
||||||
SERVICETAG_LIBDIR = $(LIBDIR)/servicetag
|
|
||||||
|
|
||||||
$(SERVICETAG_LIBDIR)/jdk_header.png: $(JDK_TOPDIR)/src/share/classes/com/sun/servicetag/resources/jdk_header.png
|
|
||||||
$(MKDIR) -p $(@D)
|
|
||||||
$(RM) $@
|
|
||||||
$(CP) $< $@
|
|
||||||
$(CHMOD) 444 $@
|
|
||||||
|
|
||||||
COPY_FILES += $(SERVICETAG_LIBDIR)/jdk_header.png
|
|
||||||
|
|
||||||
##########################################################################################
|
|
||||||
|
|
||||||
MGMT_LIBDIR = $(LIBDIR)/management
|
MGMT_LIBDIR = $(LIBDIR)/management
|
||||||
MGMT_LIB_SRC = $(JDK_TOPDIR)/src/share/lib/management
|
MGMT_LIB_SRC = $(JDK_TOPDIR)/src/share/lib/management
|
||||||
|
|
|
@ -59,15 +59,6 @@ COPY_FILES += \
|
||||||
COPY_FILES += \
|
COPY_FILES += \
|
||||||
$(JDK_TOPDIR)/src/share/classes/sun/jvmstat/perfdata/resources/aliasmap
|
$(JDK_TOPDIR)/src/share/classes/sun/jvmstat/perfdata/resources/aliasmap
|
||||||
|
|
||||||
# Servicetag resources
|
|
||||||
SERVICETAG_RESOURCES_DIR = $(JDK_TOPDIR)/src/share/classes/com/sun/servicetag/resources
|
|
||||||
COPY_FILES += \
|
|
||||||
$(SERVICETAG_RESOURCES_DIR)/product_registration.xsd \
|
|
||||||
$(SERVICETAG_RESOURCES_DIR)/register.html \
|
|
||||||
$(SERVICETAG_RESOURCES_DIR)/register_ja.html \
|
|
||||||
$(SERVICETAG_RESOURCES_DIR)/register_zh_CN.html \
|
|
||||||
$(wildcard $(SERVICETAG_RESOURCES_DIR)/javase_*.properties)
|
|
||||||
|
|
||||||
# JConsole resources
|
# JConsole resources
|
||||||
JCONSOLE_RESOURCES_DIR = $(JDK_TOPDIR)/src/share/classes/sun/tools/jconsole/resources
|
JCONSOLE_RESOURCES_DIR = $(JDK_TOPDIR)/src/share/classes/sun/tools/jconsole/resources
|
||||||
COPY_FILES += \
|
COPY_FILES += \
|
||||||
|
|
|
@ -76,8 +76,6 @@ $(eval $(call SetupArchive,BUILD_DNS_JAR,,\
|
||||||
$(IMAGES_OUTPUTDIR)/lib/tzdb.jar: $(JDK_OUTPUTDIR)/lib/tzdb.jar
|
$(IMAGES_OUTPUTDIR)/lib/tzdb.jar: $(JDK_OUTPUTDIR)/lib/tzdb.jar
|
||||||
$(install-file)
|
$(install-file)
|
||||||
|
|
||||||
JARS += $(IMAGES_OUTPUTDIR)/lib/tzdb.jar
|
|
||||||
|
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
|
|
||||||
LOCALEDATA_INCLUDE_LOCALES := ar be bg ca cs da de el es et fi fr ga hi hr hu in is it \
|
LOCALEDATA_INCLUDE_LOCALES := ar be bg ca cs da de el es et fi fr ga hi hr hu in is it \
|
||||||
|
@ -213,28 +211,28 @@ RT_JAR_EXCLUDES += \
|
||||||
org/relaxng/datatype \
|
org/relaxng/datatype \
|
||||||
sun/awt/HKSCS.class \
|
sun/awt/HKSCS.class \
|
||||||
sun/awt/motif/X11GB2312.class \
|
sun/awt/motif/X11GB2312.class \
|
||||||
sun/awt/motif/X11GB2312\$$Decoder.class \
|
sun/awt/motif/X11GB2312\$$$$Decoder.class \
|
||||||
sun/awt/motif/X11GB2312\$$Encoder.class \
|
sun/awt/motif/X11GB2312\$$$$Encoder.class \
|
||||||
sun/awt/motif/X11GBK.class \
|
sun/awt/motif/X11GBK.class \
|
||||||
sun/awt/motif/X11GBK\$$Encoder.class \
|
sun/awt/motif/X11GBK\$$$$Encoder.class \
|
||||||
sun/awt/motif/X11KSC5601.class \
|
sun/awt/motif/X11KSC5601.class \
|
||||||
sun/awt/motif/X11KSC5601\$$Decoder.class \
|
sun/awt/motif/X11KSC5601\$$$$Decoder.class \
|
||||||
sun/awt/motif/X11KSC5601\$$Encoder.class \
|
sun/awt/motif/X11KSC5601\$$$$Encoder.class \
|
||||||
sun/jvmstat \
|
sun/jvmstat \
|
||||||
sun/net/spi/nameservice/dns \
|
sun/net/spi/nameservice/dns \
|
||||||
sun/nio/cs/ext \
|
sun/nio/cs/ext \
|
||||||
sun/rmi/rmic \
|
sun/rmi/rmic \
|
||||||
sun/security/ec/ECDHKeyAgreement.class \
|
sun/security/ec/ECDHKeyAgreement.class \
|
||||||
sun/security/ec/ECDSASignature.class \
|
sun/security/ec/ECDSASignature.class \
|
||||||
sun/security/ec/ECDSASignature\$$Raw.class \
|
sun/security/ec/ECDSASignature\$$$$Raw.class \
|
||||||
sun/security/ec/ECDSASignature\$$SHA1.class \
|
sun/security/ec/ECDSASignature\$$$$SHA1.class \
|
||||||
sun/security/ec/ECDSASignature\$$SHA224.class \
|
sun/security/ec/ECDSASignature\$$$$SHA224.class \
|
||||||
sun/security/ec/ECDSASignature\$$SHA256.class \
|
sun/security/ec/ECDSASignature\$$$$SHA256.class \
|
||||||
sun/security/ec/ECDSASignature\$$SHA384.class \
|
sun/security/ec/ECDSASignature\$$$$SHA384.class \
|
||||||
sun/security/ec/ECDSASignature\$$SHA512.class \
|
sun/security/ec/ECDSASignature\$$$$SHA512.class \
|
||||||
sun/security/ec/ECKeyFactory.class \
|
sun/security/ec/ECKeyFactory.class \
|
||||||
sun/security/ec/ECKeyPairGenerator.class \
|
sun/security/ec/ECKeyPairGenerator.class \
|
||||||
sun/security/ec/SunEC\$$1.class \
|
sun/security/ec/SunEC\$$$$1.class \
|
||||||
sun/security/ec/SunEC.class \
|
sun/security/ec/SunEC.class \
|
||||||
sun/security/ec/SunECEntries.class \
|
sun/security/ec/SunECEntries.class \
|
||||||
sun/security/internal \
|
sun/security/internal \
|
||||||
|
@ -357,23 +355,25 @@ $(PROFILE_VERSION_CLASS_TARGETS) : $(PROFILE_VERSION_JAVA_TARGETS)
|
||||||
|
|
||||||
|
|
||||||
# Support for removing the addPropertyChangeListener and removePropertyChangeListener
|
# Support for removing the addPropertyChangeListener and removePropertyChangeListener
|
||||||
# methods from classes that only go into the profile builds. For now the Pack200.Packer
|
# methods from classes that only go into the profile builds.
|
||||||
# and Packer200.Unpacker classes have special handling because of the $ in the file
|
|
||||||
# name.
|
|
||||||
BEANLESS_CLASSES = $(IMAGES_OUTPUTDIR)/beanless
|
BEANLESS_CLASSES = $(IMAGES_OUTPUTDIR)/beanless
|
||||||
|
|
||||||
|
# When there are $ characters in filenames we have some very subtle interactions between
|
||||||
|
# make expansion and shell expansion. In this particular case $< will contain a single $ while
|
||||||
|
# $@ will contain \$. So we have to pass $< in single-quotes to avoid shell expansion
|
||||||
$(BEANLESS_CLASSES)/%: $(JDK_OUTPUTDIR)/classes/%
|
$(BEANLESS_CLASSES)/%: $(JDK_OUTPUTDIR)/classes/%
|
||||||
$(MKDIR) -p $(@D)
|
$(MKDIR) -p $(@D)
|
||||||
$(TOOL_REMOVEMETHODS) $< $@ addPropertyChangeListener removePropertyChangeListener
|
$(TOOL_REMOVEMETHODS) '$<' $@ addPropertyChangeListener removePropertyChangeListener
|
||||||
|
|
||||||
CLASSES_TO_DEBEAN = \
|
CLASSES_TO_DEBEAN = \
|
||||||
java/util/logging/LogManager.class \
|
java/util/logging/LogManager.class \
|
||||||
|
java/util/jar/Pack200\$$Packer.class \
|
||||||
|
java/util/jar/Pack200\$$Unpacker.class \
|
||||||
com/sun/java/util/jar/pack/PackerImpl.class \
|
com/sun/java/util/jar/pack/PackerImpl.class \
|
||||||
com/sun/java/util/jar/pack/UnpackerImpl.class
|
com/sun/java/util/jar/pack/UnpackerImpl.class
|
||||||
|
|
||||||
BEANLESS_CLASSES_TARGETS =
|
|
||||||
ifneq ($(PROFILE),)
|
ifneq ($(PROFILE),)
|
||||||
BEANLESS_CLASSES_TARGETS := $(foreach c, $(CLASSES_TO_DEBEAN), $(BEANLESS_CLASSES)/$c)
|
BEANLESS_CLASSES_TARGETS := $(addprefix $(BEANLESS_CLASSES)/, $(CLASSES_TO_DEBEAN))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -400,13 +400,8 @@ $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/rt.jar: $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the
|
||||||
$(ECHO) Updating rt.jar $(PROFILE) && \
|
$(ECHO) Updating rt.jar $(PROFILE) && \
|
||||||
$(CD) $(patsubst %$(VERSION_CLASS_PATH),%,$(CLASS_FILE)) && \
|
$(CD) $(patsubst %$(VERSION_CLASS_PATH),%,$(CLASS_FILE)) && \
|
||||||
$(JAR) $(RT_JAR_UPDATE_OPTIONS) $@.tmp $(VERSION_CLASS_PATH); \
|
$(JAR) $(RT_JAR_UPDATE_OPTIONS) $@.tmp $(VERSION_CLASS_PATH); \
|
||||||
$(MKDIR) -p $(BEANLESS_CLASSES)/java/util/jar; \
|
|
||||||
$(TOOL_REMOVEMETHODS) $(JDK_OUTPUTDIR)/classes/java/util/jar/Pack200\$$Packer.class \
|
|
||||||
$(BEANLESS_CLASSES)/java/util/jar/Pack200\$$Packer.class addPropertyChangeListener removePropertyChangeListener; \
|
|
||||||
$(TOOL_REMOVEMETHODS) $(JDK_OUTPUTDIR)/classes/java/util/jar/Pack200\$$Unpacker.class \
|
|
||||||
$(BEANLESS_CLASSES)/java/util/jar/Pack200\$$Unpacker.class addPropertyChangeListener removePropertyChangeListener; \
|
|
||||||
$(CD) $(BEANLESS_CLASSES) && \
|
$(CD) $(BEANLESS_CLASSES) && \
|
||||||
$(JAR) $(RT_JAR_UPDATE_OPTIONS) $@.tmp $(CLASSES_TO_DEBEAN) java/util/jar/* ; \
|
$(JAR) $(RT_JAR_UPDATE_OPTIONS) $@.tmp $(CLASSES_TO_DEBEAN); \
|
||||||
fi
|
fi
|
||||||
$(MV) $@.tmp $@
|
$(MV) $@.tmp $@
|
||||||
|
|
||||||
|
@ -871,8 +866,7 @@ EXCLUDE_PROPWARN_PKGS = com.sun.java.swing.plaf.windows \
|
||||||
# This is an interim solution until the ct.sym is replaced
|
# This is an interim solution until the ct.sym is replaced
|
||||||
# with a new module system (being discussed for JDK 8).
|
# with a new module system (being discussed for JDK 8).
|
||||||
#
|
#
|
||||||
EXPORTED_PRIVATE_PKGS = com.sun.servicetag \
|
EXPORTED_PRIVATE_PKGS = com.oracle.net \
|
||||||
com.oracle.net \
|
|
||||||
com.oracle.nio
|
com.oracle.nio
|
||||||
|
|
||||||
$(IMAGES_OUTPUTDIR)/symbols/_the.symbols: $(IMAGES_OUTPUTDIR)/lib/rt.jar
|
$(IMAGES_OUTPUTDIR)/symbols/_the.symbols: $(IMAGES_OUTPUTDIR)/lib/rt.jar
|
||||||
|
@ -1123,8 +1117,6 @@ endif
|
||||||
$(IMAGES_OUTPUTDIR)/lib/ext/nashorn.jar: $(NASHORN_DIST)/nashorn.jar
|
$(IMAGES_OUTPUTDIR)/lib/ext/nashorn.jar: $(NASHORN_DIST)/nashorn.jar
|
||||||
$(install-file)
|
$(install-file)
|
||||||
|
|
||||||
JARS += $(IMAGES_OUTPUTDIR)/lib/ext/nashorn.jar
|
|
||||||
|
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
|
|
||||||
-include $(CUSTOM_MAKE_DIR)/CreateJars.gmk
|
-include $(CUSTOM_MAKE_DIR)/CreateJars.gmk
|
||||||
|
|
|
@ -194,7 +194,6 @@ $(eval $(call add_properties_to_clean,COM_SUN_ROWSET_HK,\
|
||||||
$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/rowset)),\
|
$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/rowset)),\
|
||||||
%zh_TW,%zh_HK))
|
%zh_TW,%zh_HK))
|
||||||
|
|
||||||
#com/sun/servicetag/resources
|
|
||||||
#com/sun/swing/internal/plaf/basic/resources
|
#com/sun/swing/internal/plaf/basic/resources
|
||||||
$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_BASIC,\
|
$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_BASIC,\
|
||||||
$(filter %.properties,\
|
$(filter %.properties,\
|
||||||
|
|
|
@ -649,7 +649,7 @@ ifneq ($(POST_STRIP_CMD),)
|
||||||
EXEC_LIST_BIN:=$(filter-out %$(notdir $(MSVCR_DLL)),$(filter %.exe %.dll,$(ALL_BIN_LIST)))
|
EXEC_LIST_BIN:=$(filter-out %$(notdir $(MSVCR_DLL)),$(filter %.exe %.dll,$(ALL_BIN_LIST)))
|
||||||
else
|
else
|
||||||
# Find all executables in JDK_OUTPUTDIR since they exist when this makefile is parsed
|
# Find all executables in JDK_OUTPUTDIR since they exist when this makefile is parsed
|
||||||
EXEC_LIST_BIN:=$(shell $(FILE) `$(FIND) $(JDK_OUTPUTDIR)/bin -type f -name \*$(EXE_SUFFIX)` \
|
EXEC_LIST_BIN:=$(shell $(FILE) `$(FIND) $(JDK_OUTPUTDIR)/bin -type f -name \*$(EXE_SUFFIX) ! -name \*.debuginfo` \
|
||||||
| $(EGREP) 'ELF' | $(CUT) -d':' -f1)
|
| $(EGREP) 'ELF' | $(CUT) -d':' -f1)
|
||||||
# On mac, the old build searches for static libraries for stripping instead of shared.
|
# On mac, the old build searches for static libraries for stripping instead of shared.
|
||||||
# Not clear if it's intentional.
|
# Not clear if it's intentional.
|
||||||
|
|
|
@ -30,9 +30,8 @@
|
||||||
|
|
||||||
PROFILE_NAMES := compact1 compact2 compact3
|
PROFILE_NAMES := compact1 compact2 compact3
|
||||||
|
|
||||||
# The include files use 1,2,3,4 for simplicity and conciseness. Internally we
|
# The include files use 1,2,3 for simplicity and conciseness. Internally we
|
||||||
# use profile_1, profile_2 and profile_3. Note that profile_4 is a full JRE so
|
# use profile_1, profile_2 and profile_3.
|
||||||
# we never have to use it directly.
|
|
||||||
|
|
||||||
ALL_PROFILES := profile_1 profile_2 profile_3
|
ALL_PROFILES := profile_1 profile_2 profile_3
|
||||||
|
|
||||||
|
|
|
@ -74,19 +74,19 @@ PROFILE_3_JARS := \
|
||||||
$(PROFILE_2_JARS)
|
$(PROFILE_2_JARS)
|
||||||
|
|
||||||
ifdef OPENJDK
|
ifdef OPENJDK
|
||||||
PROFILE_4_JRE_JAR_FILES := $(filter-out alt-rt.jar, $(PROFILE_4_JRE_JAR_FILES))
|
FULL_JRE_JAR_FILES := $(filter-out alt-rt.jar, $(FULL_JRE_JAR_FILES))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
PROFILE_4_JARS := \
|
FULL_JRE_JARS := \
|
||||||
$(addprefix $(IMAGES_OUTPUTDIR)/lib/, $(PROFILE_4_JRE_JAR_FILES)) \
|
$(addprefix $(IMAGES_OUTPUTDIR)/lib/, $(FULL_JRE_JAR_FILES)) \
|
||||||
$(PROFILE_3_JARS)
|
$(PROFILE_3_JARS)
|
||||||
|
|
||||||
# The full set of "jar" files needed for a complete JDK (ct.sym and src.zip
|
# The full set of "jar" files needed for a complete JDK (ct.sym and src.zip
|
||||||
# are also included.)
|
# are also included.)
|
||||||
# Note we need to add back the regular form of all the custom profile jars e.g.
|
# Note we need to add back the regular form of all the custom profile jars e.g.
|
||||||
# rt.jar and resources.jar
|
# rt.jar and resources.jar that we filtered out above
|
||||||
|
|
||||||
ALL_JARS := $(PROFILE_4_JARS) \
|
ALL_JARS := $(FULL_JRE_JARS) \
|
||||||
$(IMAGES_OUTPUTDIR)/lib/rt.jar \
|
$(IMAGES_OUTPUTDIR)/lib/rt.jar \
|
||||||
$(IMAGES_OUTPUTDIR)/lib/resources.jar \
|
$(IMAGES_OUTPUTDIR)/lib/resources.jar \
|
||||||
$(IMAGES_OUTPUTDIR)/lib/jconsole.jar \
|
$(IMAGES_OUTPUTDIR)/lib/jconsole.jar \
|
||||||
|
@ -94,7 +94,6 @@ ALL_JARS := $(PROFILE_4_JARS) \
|
||||||
$(IMAGES_OUTPUTDIR)/lib/tools.jar \
|
$(IMAGES_OUTPUTDIR)/lib/tools.jar \
|
||||||
$(IMAGES_OUTPUTDIR)/lib/ct.sym \
|
$(IMAGES_OUTPUTDIR)/lib/ct.sym \
|
||||||
$(IMAGES_OUTPUTDIR)/src.zip \
|
$(IMAGES_OUTPUTDIR)/src.zip \
|
||||||
$(IMAGES_OUTPUTDIR)/lib/ext/cldrdata.jar \
|
|
||||||
$(IMAGES_OUTPUTDIR)/lib/sa-jdi.jar
|
$(IMAGES_OUTPUTDIR)/lib/sa-jdi.jar
|
||||||
|
|
||||||
ifeq ($(OPENJDK_TARGET_OS),solaris)
|
ifeq ($(OPENJDK_TARGET_OS),solaris)
|
||||||
|
@ -140,7 +139,7 @@ ALL_JRE_BIN_FILES := \
|
||||||
$(PROFILE_1_JRE_BIN_FILES) \
|
$(PROFILE_1_JRE_BIN_FILES) \
|
||||||
$(PROFILE_2_JRE_BIN_FILES) \
|
$(PROFILE_2_JRE_BIN_FILES) \
|
||||||
$(PROFILE_3_JRE_BIN_FILES) \
|
$(PROFILE_3_JRE_BIN_FILES) \
|
||||||
$(PROFILE_4_JRE_BIN_FILES)
|
$(FULL_JRE_BIN_FILES)
|
||||||
|
|
||||||
NOT_JRE_BIN_FILES := $(filter-out $(ALL_JRE_BIN_FILES), $(NEW_ALL_BIN_LIST))
|
NOT_JRE_BIN_FILES := $(filter-out $(ALL_JRE_BIN_FILES), $(NEW_ALL_BIN_LIST))
|
||||||
|
|
||||||
|
@ -149,18 +148,18 @@ ifeq ($(PROFILE), profile_1)
|
||||||
NOT_JRE_BIN_FILES += \
|
NOT_JRE_BIN_FILES += \
|
||||||
$(PROFILE_2_JRE_BIN_FILES) \
|
$(PROFILE_2_JRE_BIN_FILES) \
|
||||||
$(PROFILE_3_JRE_BIN_FILES) \
|
$(PROFILE_3_JRE_BIN_FILES) \
|
||||||
$(PROFILE_4_JRE_BIN_FILES)
|
$(FULL_JRE_BIN_FILES)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(PROFILE), profile_2)
|
ifeq ($(PROFILE), profile_2)
|
||||||
NOT_JRE_BIN_FILES += \
|
NOT_JRE_BIN_FILES += \
|
||||||
$(PROFILE_3_JRE_BIN_FILES) \
|
$(PROFILE_3_JRE_BIN_FILES) \
|
||||||
$(PROFILE_4_JRE_BIN_FILES)
|
$(FULL_JRE_BIN_FILES)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(PROFILE), profile_3)
|
ifeq ($(PROFILE), profile_3)
|
||||||
NOT_JRE_BIN_FILES += \
|
NOT_JRE_BIN_FILES += \
|
||||||
$(PROFILE_4_JRE_BIN_FILES)
|
$(FULL_JRE_BIN_FILES)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
NOT_JRE_BIN_FILES := $(addprefix $(JDK_OUTPUTDIR)/bin/, $(NOT_JRE_BIN_FILES))
|
NOT_JRE_BIN_FILES := $(addprefix $(JDK_OUTPUTDIR)/bin/, $(NOT_JRE_BIN_FILES))
|
||||||
|
@ -173,7 +172,7 @@ ALL_JRE_LIB_FILES := \
|
||||||
$(PROFILE_1_JRE_LIB_FILES) \
|
$(PROFILE_1_JRE_LIB_FILES) \
|
||||||
$(PROFILE_2_JRE_LIB_FILES) \
|
$(PROFILE_2_JRE_LIB_FILES) \
|
||||||
$(PROFILE_3_JRE_LIB_FILES) \
|
$(PROFILE_3_JRE_LIB_FILES) \
|
||||||
$(PROFILE_4_JRE_LIB_FILES)
|
$(FULL_JRE_LIB_FILES)
|
||||||
|
|
||||||
NOT_JRE_LIB_FILES := $(filter-out $(ALL_JRE_LIB_FILES), $(NEW_ALL_LIB_LIST))
|
NOT_JRE_LIB_FILES := $(filter-out $(ALL_JRE_LIB_FILES), $(NEW_ALL_LIB_LIST))
|
||||||
|
|
||||||
|
@ -189,18 +188,18 @@ ifeq ($(PROFILE), profile_1)
|
||||||
NOT_JRE_LIB_FILES += \
|
NOT_JRE_LIB_FILES += \
|
||||||
$(PROFILE_2_JRE_LIB_FILES) \
|
$(PROFILE_2_JRE_LIB_FILES) \
|
||||||
$(PROFILE_3_JRE_LIB_FILES) \
|
$(PROFILE_3_JRE_LIB_FILES) \
|
||||||
$(PROFILE_4_JRE_LIB_FILES)
|
$(FULL_JRE_LIB_FILES)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(PROFILE), profile_2)
|
ifeq ($(PROFILE), profile_2)
|
||||||
NOT_JRE_LIB_FILES += \
|
NOT_JRE_LIB_FILES += \
|
||||||
$(PROFILE_3_JRE_LIB_FILES) \
|
$(PROFILE_3_JRE_LIB_FILES) \
|
||||||
$(PROFILE_4_JRE_LIB_FILES)
|
$(FULL_JRE_LIB_FILES)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(PROFILE), profile_3)
|
ifeq ($(PROFILE), profile_3)
|
||||||
NOT_JRE_LIB_FILES += \
|
NOT_JRE_LIB_FILES += \
|
||||||
$(PROFILE_4_JRE_LIB_FILES)
|
$(FULL_JRE_LIB_FILES)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Exclude the custom jar files as these will be added back via a special rule
|
# Exclude the custom jar files as these will be added back via a special rule
|
||||||
|
@ -279,13 +278,13 @@ class_list = $(patsubst $(JDK_OUTPUTDIR)/classes/%,%,\
|
||||||
|
|
||||||
ifeq ($(PROFILE), profile_1)
|
ifeq ($(PROFILE), profile_1)
|
||||||
RT_JAR_EXCLUDES += \
|
RT_JAR_EXCLUDES += \
|
||||||
$(PROFILE_1_RTJAR_EXCLUDE_TYPES) \
|
$(call class_list, $(PROFILE_1_RTJAR_EXCLUDE_TYPES)) \
|
||||||
$(PROFILE_2_RTJAR_INCLUDE_PACKAGES) \
|
$(PROFILE_2_RTJAR_INCLUDE_PACKAGES) \
|
||||||
$(call class_list, $(PROFILE_2_RTJAR_INCLUDE_TYPES)) \
|
$(call class_list, $(PROFILE_2_RTJAR_INCLUDE_TYPES)) \
|
||||||
$(PROFILE_3_RTJAR_INCLUDE_PACKAGES) \
|
$(PROFILE_3_RTJAR_INCLUDE_PACKAGES) \
|
||||||
$(call class_list, $(PROFILE_3_RTJAR_INCLUDE_TYPES)) \
|
$(call class_list, $(PROFILE_3_RTJAR_INCLUDE_TYPES)) \
|
||||||
$(PROFILE_4_RTJAR_INCLUDE_PACKAGES) \
|
$(FULL_JRE_RTJAR_INCLUDE_PACKAGES) \
|
||||||
$(call class_list, $(PROFILE_4_RTJAR_INCLUDE_TYPES))
|
$(call class_list, $(FULL_JRE_RTJAR_INCLUDE_TYPES))
|
||||||
RT_JAR_INCLUDE_TYPES := \
|
RT_JAR_INCLUDE_TYPES := \
|
||||||
$(call class_list, $(PROFILE_1_RTJAR_INCLUDE_TYPES))
|
$(call class_list, $(PROFILE_1_RTJAR_INCLUDE_TYPES))
|
||||||
PROFILE_INCLUDE_METAINF_SERVICES := \
|
PROFILE_INCLUDE_METAINF_SERVICES := \
|
||||||
|
@ -293,11 +292,11 @@ ifeq ($(PROFILE), profile_1)
|
||||||
endif
|
endif
|
||||||
ifeq ($(PROFILE), profile_2)
|
ifeq ($(PROFILE), profile_2)
|
||||||
RT_JAR_EXCLUDES += \
|
RT_JAR_EXCLUDES += \
|
||||||
$(PROFILE_2_RTJAR_EXCLUDE_TYPES) \
|
$(call class_list, $(PROFILE_2_RTJAR_EXCLUDE_TYPES)) \
|
||||||
$(PROFILE_3_RTJAR_INCLUDE_PACKAGES) \
|
$(PROFILE_3_RTJAR_INCLUDE_PACKAGES) \
|
||||||
$(call class_list, $(PROFILE_3_RTJAR_INCLUDE_TYPES)) \
|
$(call class_list, $(PROFILE_3_RTJAR_INCLUDE_TYPES)) \
|
||||||
$(PROFILE_4_RTJAR_INCLUDE_PACKAGES) \
|
$(FULL_JRE_RTJAR_INCLUDE_PACKAGES) \
|
||||||
$(call class_list, $(PROFILE_4_RTJAR_INCLUDE_TYPES))
|
$(call class_list, $(FULL_JRE_RTJAR_INCLUDE_TYPES))
|
||||||
RT_JAR_INCLUDE_TYPES := \
|
RT_JAR_INCLUDE_TYPES := \
|
||||||
$(call class_list, $(PROFILE_1_RTJAR_INCLUDE_TYPES)) \
|
$(call class_list, $(PROFILE_1_RTJAR_INCLUDE_TYPES)) \
|
||||||
$(call class_list, $(PROFILE_2_RTJAR_INCLUDE_TYPES))
|
$(call class_list, $(PROFILE_2_RTJAR_INCLUDE_TYPES))
|
||||||
|
@ -307,9 +306,9 @@ ifeq ($(PROFILE), profile_2)
|
||||||
endif
|
endif
|
||||||
ifeq ($(PROFILE), profile_3)
|
ifeq ($(PROFILE), profile_3)
|
||||||
RT_JAR_EXCLUDES += \
|
RT_JAR_EXCLUDES += \
|
||||||
$(PROFILE_3_RTJAR_EXCLUDE_TYPES) \
|
$(call class_list, $(PROFILE_3_RTJAR_EXCLUDE_TYPES)) \
|
||||||
$(PROFILE_4_RTJAR_INCLUDE_PACKAGES) \
|
$(FULL_JRE_RTJAR_INCLUDE_PACKAGES) \
|
||||||
$(call class_list, $(PROFILE_4_RTJAR_INCLUDE_TYPES))
|
$(call class_list, $(FULL_JRE_RTJAR_INCLUDE_TYPES))
|
||||||
RT_JAR_INCLUDE_TYPES := \
|
RT_JAR_INCLUDE_TYPES := \
|
||||||
$(call class_list, $(PROFILE_1_RTJAR_INCLUDE_TYPES)) \
|
$(call class_list, $(PROFILE_1_RTJAR_INCLUDE_TYPES)) \
|
||||||
$(call class_list, $(PROFILE_2_RTJAR_INCLUDE_TYPES)) \
|
$(call class_list, $(PROFILE_2_RTJAR_INCLUDE_TYPES)) \
|
||||||
|
|
|
@ -133,6 +133,7 @@ SUNWprivate_1.1 {
|
||||||
Java_java_lang_ClassLoader_00024NativeLibrary_find;
|
Java_java_lang_ClassLoader_00024NativeLibrary_find;
|
||||||
Java_java_lang_ClassLoader_00024NativeLibrary_load;
|
Java_java_lang_ClassLoader_00024NativeLibrary_load;
|
||||||
Java_java_lang_ClassLoader_00024NativeLibrary_unload;
|
Java_java_lang_ClassLoader_00024NativeLibrary_unload;
|
||||||
|
Java_java_lang_ClassLoader_00024NativeLibrary_findBuiltinLib;
|
||||||
Java_java_lang_ClassLoader_getCaller;
|
Java_java_lang_ClassLoader_getCaller;
|
||||||
Java_java_lang_ClassLoader_registerNatives;
|
Java_java_lang_ClassLoader_registerNatives;
|
||||||
Java_java_lang_Compiler_registerNatives;
|
Java_java_lang_Compiler_registerNatives;
|
||||||
|
|
|
@ -27,6 +27,7 @@ PROFILE_1_JRE_BIN_FILES := \
|
||||||
keytool$(EXE_SUFFIX)
|
keytool$(EXE_SUFFIX)
|
||||||
|
|
||||||
PROFILE_1_JRE_LIB_FILES := \
|
PROFILE_1_JRE_LIB_FILES := \
|
||||||
|
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)j2pkcs11$(SHARED_LIBRARY_SUFFIX) \
|
||||||
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) \
|
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) \
|
||||||
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX) \
|
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX) \
|
||||||
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jsig.diz \
|
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jsig.diz \
|
||||||
|
@ -34,6 +35,7 @@ PROFILE_1_JRE_LIB_FILES := \
|
||||||
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)nio$(SHARED_LIBRARY_SUFFIX) \
|
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)nio$(SHARED_LIBRARY_SUFFIX) \
|
||||||
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)npt$(SHARED_LIBRARY_SUFFIX) \
|
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)npt$(SHARED_LIBRARY_SUFFIX) \
|
||||||
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)npt.diz \
|
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)npt.diz \
|
||||||
|
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)sunec$(SHARED_LIBRARY_SUFFIX) \
|
||||||
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)unpack$(SHARED_LIBRARY_SUFFIX) \
|
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)unpack$(SHARED_LIBRARY_SUFFIX) \
|
||||||
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)verify$(SHARED_LIBRARY_SUFFIX) \
|
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)verify$(SHARED_LIBRARY_SUFFIX) \
|
||||||
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)verify.diz \
|
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)verify.diz \
|
||||||
|
@ -61,7 +63,9 @@ PROFILE_1_JRE_LIB_FILES := \
|
||||||
currency.data \
|
currency.data \
|
||||||
ext/localedata.jar \
|
ext/localedata.jar \
|
||||||
ext/meta-index \
|
ext/meta-index \
|
||||||
|
ext/sunec.jar \
|
||||||
ext/sunjce_provider.jar \
|
ext/sunjce_provider.jar \
|
||||||
|
ext/sunpkcs11.jar \
|
||||||
jce.jar \
|
jce.jar \
|
||||||
jsse.jar \
|
jsse.jar \
|
||||||
logging.properties \
|
logging.properties \
|
||||||
|
@ -88,7 +92,9 @@ PROFILE_1_JRE_OTHER_FILES := \
|
||||||
|
|
||||||
PROFILE_1_JRE_JAR_FILES := \
|
PROFILE_1_JRE_JAR_FILES := \
|
||||||
ext/localedata.jar \
|
ext/localedata.jar \
|
||||||
|
ext/sunec.jar \
|
||||||
ext/sunjce_provider.jar \
|
ext/sunjce_provider.jar \
|
||||||
|
ext/sunpkcs11.jar \
|
||||||
jce.jar \
|
jce.jar \
|
||||||
jsse.jar \
|
jsse.jar \
|
||||||
resources.jar \
|
resources.jar \
|
||||||
|
@ -142,7 +148,7 @@ PROFILE_3_JRE_JAR_FILES := \
|
||||||
management-agent.jar
|
management-agent.jar
|
||||||
|
|
||||||
|
|
||||||
PROFILE_4_JRE_BIN_FILES := \
|
FULL_JRE_BIN_FILES := \
|
||||||
orbd$(EXE_SUFFIX) \
|
orbd$(EXE_SUFFIX) \
|
||||||
pack200$(EXE_SUFFIX) \
|
pack200$(EXE_SUFFIX) \
|
||||||
policytool$(EXE_SUFFIX) \
|
policytool$(EXE_SUFFIX) \
|
||||||
|
@ -150,7 +156,7 @@ PROFILE_4_JRE_BIN_FILES := \
|
||||||
tnameserv$(EXE_SUFFIX) \
|
tnameserv$(EXE_SUFFIX) \
|
||||||
unpack200$(EXE_SUFFIX)
|
unpack200$(EXE_SUFFIX)
|
||||||
|
|
||||||
PROFILE_4_JRE_LIB_FILES := \
|
FULL_JRE_LIB_FILES := \
|
||||||
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)awt$(SHARED_LIBRARY_SUFFIX) \
|
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)awt$(SHARED_LIBRARY_SUFFIX) \
|
||||||
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)awt_headless$(SHARED_LIBRARY_SUFFIX) \
|
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)awt_headless$(SHARED_LIBRARY_SUFFIX) \
|
||||||
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)awt_xawt$(SHARED_LIBRARY_SUFFIX) \
|
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)awt_xawt$(SHARED_LIBRARY_SUFFIX) \
|
||||||
|
@ -158,7 +164,6 @@ PROFILE_4_JRE_LIB_FILES := \
|
||||||
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)dt_socket$(SHARED_LIBRARY_SUFFIX) \
|
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)dt_socket$(SHARED_LIBRARY_SUFFIX) \
|
||||||
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)dt_socket.diz \
|
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)dt_socket.diz \
|
||||||
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)fontmanager$(SHARED_LIBRARY_SUFFIX) \
|
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)fontmanager$(SHARED_LIBRARY_SUFFIX) \
|
||||||
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)j2pkcs11$(SHARED_LIBRARY_SUFFIX) \
|
|
||||||
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jawt$(SHARED_LIBRARY_SUFFIX) \
|
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jawt$(SHARED_LIBRARY_SUFFIX) \
|
||||||
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jdwp$(SHARED_LIBRARY_SUFFIX) \
|
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jdwp$(SHARED_LIBRARY_SUFFIX) \
|
||||||
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jpeg$(SHARED_LIBRARY_SUFFIX) \
|
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jpeg$(SHARED_LIBRARY_SUFFIX) \
|
||||||
|
@ -167,7 +172,6 @@ PROFILE_4_JRE_LIB_FILES := \
|
||||||
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)kcms$(SHARED_LIBRARY_SUFFIX) \
|
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)kcms$(SHARED_LIBRARY_SUFFIX) \
|
||||||
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)mlib_image$(SHARED_LIBRARY_SUFFIX) \
|
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)mlib_image$(SHARED_LIBRARY_SUFFIX) \
|
||||||
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)splashscreen$(SHARED_LIBRARY_SUFFIX) \
|
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)splashscreen$(SHARED_LIBRARY_SUFFIX) \
|
||||||
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)sunec$(SHARED_LIBRARY_SUFFIX) \
|
|
||||||
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)t2k$(SHARED_LIBRARY_SUFFIX) \
|
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)t2k$(SHARED_LIBRARY_SUFFIX) \
|
||||||
alt-rt.jar \
|
alt-rt.jar \
|
||||||
charsets.jar \
|
charsets.jar \
|
||||||
|
@ -178,8 +182,7 @@ PROFILE_4_JRE_LIB_FILES := \
|
||||||
cmm/sRGB.pf \
|
cmm/sRGB.pf \
|
||||||
ext/cldrdata.jar \
|
ext/cldrdata.jar \
|
||||||
ext/dnsns.jar \
|
ext/dnsns.jar \
|
||||||
ext/sunec.jar \
|
ext/nashorn.jar \
|
||||||
ext/sunpkcs11.jar \
|
|
||||||
ext/zipfs.jar \
|
ext/zipfs.jar \
|
||||||
flavormap.properties \
|
flavormap.properties \
|
||||||
fontconfig.RedHat.5.bfc \
|
fontconfig.RedHat.5.bfc \
|
||||||
|
@ -219,10 +222,9 @@ PROFILE_4_JRE_LIB_FILES := \
|
||||||
oblique-fonts/fonts.dir \
|
oblique-fonts/fonts.dir \
|
||||||
psfont.properties.ja \
|
psfont.properties.ja \
|
||||||
psfontj2d.properties \
|
psfontj2d.properties \
|
||||||
servicetag/jdk_header.png \
|
|
||||||
sound.properties
|
sound.properties
|
||||||
|
|
||||||
PROFILE_4_JRE_OTHER_FILES := \
|
FULL_JRE_OTHER_FILES := \
|
||||||
man/ja_JP.UTF-8/man1/java.1 \
|
man/ja_JP.UTF-8/man1/java.1 \
|
||||||
man/ja_JP.UTF-8/man1/javaws.1 \
|
man/ja_JP.UTF-8/man1/javaws.1 \
|
||||||
man/ja_JP.UTF-8/man1/keytool.1 \
|
man/ja_JP.UTF-8/man1/keytool.1 \
|
||||||
|
@ -246,13 +248,12 @@ PROFILE_4_JRE_OTHER_FILES := \
|
||||||
man/man1/tnameserv.1 \
|
man/man1/tnameserv.1 \
|
||||||
man/man1/unpack200.1
|
man/man1/unpack200.1
|
||||||
|
|
||||||
PROFILE_4_JRE_JAR_FILES := \
|
FULL_JRE_JAR_FILES := \
|
||||||
alt-rt.jar \
|
alt-rt.jar \
|
||||||
charsets.jar \
|
charsets.jar \
|
||||||
ext/cldrdata.jar \
|
ext/cldrdata.jar \
|
||||||
ext/dnsns.jar \
|
ext/dnsns.jar \
|
||||||
ext/sunec.jar \
|
ext/nashorn.jar \
|
||||||
ext/sunpkcs11.jar \
|
|
||||||
ext/zipfs.jar
|
ext/zipfs.jar
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -22,119 +22,55 @@
|
||||||
# or visit www.oracle.com if you need additional information or have any
|
# or visit www.oracle.com if you need additional information or have any
|
||||||
# questions.
|
# questions.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Included or excluded types must take one of two forms
|
||||||
|
# - *.class to indicate all classes; or else
|
||||||
|
# - a full single type name e.g.
|
||||||
|
# com/sun/security/auth/callback/DialogCallbackHandler$$1.class
|
||||||
|
# You can not use arbitrary wildcards like DialogCallbackHandler*.class.
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
# - Nested types must use $$ in place of $ as $ is the make meta-character
|
||||||
|
# - If a package is not listed in any profile's inclusion list then it will
|
||||||
|
# not appear in any profile. But if a package is also missing from the
|
||||||
|
# full JRE's inclusion list then it will still be part of the full JRE.
|
||||||
|
# This is because the full JRE's inclusion lists are only used to define
|
||||||
|
# the exclusion lists for profiles; they are not used to define the full
|
||||||
|
# JRE contents - that is still done with the pre-profile legacy mechanism
|
||||||
|
# (all packagesthat can be found, less those not intended for rt.jar).
|
||||||
|
# This was done to minimize the impact of profiles on the regular
|
||||||
|
# non-profile build.
|
||||||
|
#
|
||||||
PROFILE_1_RTJAR_INCLUDE_PACKAGES := \
|
PROFILE_1_RTJAR_INCLUDE_PACKAGES := \
|
||||||
com/sun/demo/jvmti/hprof \
|
com/sun/demo/jvmti/hprof \
|
||||||
com/sun/java/util/jar/pack \
|
com/sun/java/util/jar/pack \
|
||||||
com/sun/net/ssl \
|
com/sun/net/ssl \
|
||||||
com/sun/net/ssl/internal/www/protocol/https \
|
|
||||||
com/sun/nio/file \
|
com/sun/nio/file \
|
||||||
com/sun/security/cert/internal/x509 \
|
com/sun/security/cert/internal/x509 \
|
||||||
java/io \
|
java/io \
|
||||||
java/lang \
|
java/lang \
|
||||||
java/lang/annotation \
|
|
||||||
java/lang/invoke \
|
|
||||||
java/lang/ref \
|
|
||||||
java/lang/reflect \
|
|
||||||
java/math \
|
java/math \
|
||||||
java/net \
|
java/net \
|
||||||
java/nio \
|
java/nio \
|
||||||
java/nio/channels \
|
|
||||||
java/nio/channels/spi \
|
|
||||||
java/nio/charset \
|
|
||||||
java/nio/charset/spi \
|
|
||||||
java/nio/file \
|
|
||||||
java/nio/file/attribute \
|
|
||||||
java/nio/file/spi \
|
|
||||||
java/security \
|
java/security \
|
||||||
java/security/cert \
|
|
||||||
java/security/interfaces \
|
|
||||||
java/security/spec \
|
|
||||||
java/text \
|
java/text \
|
||||||
java/text/spi \
|
|
||||||
java/time \
|
java/time \
|
||||||
java/util \
|
java/util \
|
||||||
java/util/concurrent \
|
|
||||||
java/util/concurrent/atomic \
|
|
||||||
java/util/concurrent/locks \
|
|
||||||
java/util/function \
|
|
||||||
java/util/jar \
|
|
||||||
java/util/logging \
|
|
||||||
java/util/regex \
|
|
||||||
java/util/spi \
|
|
||||||
java/util/zip \
|
|
||||||
javax/net \
|
javax/net \
|
||||||
javax/net/ssl \
|
javax/security \
|
||||||
javax/security/auth \
|
jdk \
|
||||||
javax/security/auth/callback \
|
|
||||||
javax/security/auth/login \
|
|
||||||
javax/security/auth/spi \
|
|
||||||
javax/security/auth/x500 \
|
|
||||||
javax/security/cert \
|
|
||||||
jdk/internal \
|
|
||||||
sun/invoke \
|
sun/invoke \
|
||||||
sun/invoke/anon \
|
|
||||||
sun/invoke/empty \
|
|
||||||
sun/invoke/util \
|
|
||||||
sun/launcher \
|
sun/launcher \
|
||||||
sun/launcher/resources \
|
|
||||||
sun/misc \
|
sun/misc \
|
||||||
sun/misc/resources \
|
|
||||||
sun/net/ \
|
sun/net/ \
|
||||||
sun/net/idn \
|
|
||||||
sun/net/sdp \
|
|
||||||
sun/net/spi \
|
|
||||||
sun/net/spi/nameservice \
|
|
||||||
sun/net/util \
|
|
||||||
sun/net/www \
|
|
||||||
sun/net/www/http \
|
|
||||||
sun/net/www/protocol/file \
|
|
||||||
sun/net/www/protocol/http/ \
|
|
||||||
sun/net/www/protocol/http/logging \
|
|
||||||
sun/net/www/protocol/https \
|
|
||||||
sun/net/www/protocol/jar \
|
|
||||||
sun/nio \
|
sun/nio \
|
||||||
sun/nio/ch \
|
|
||||||
sun/nio/cs \
|
|
||||||
sun/nio/fs \
|
|
||||||
sun/reflect \
|
sun/reflect \
|
||||||
sun/reflect/annotation \
|
sun/security \
|
||||||
sun/reflect/generics/factory \
|
|
||||||
sun/reflect/generics/parser \
|
|
||||||
sun/reflect/generics/reflectiveObjects \
|
|
||||||
sun/reflect/generics/repository \
|
|
||||||
sun/reflect/generics/scope \
|
|
||||||
sun/reflect/generics/tree \
|
|
||||||
sun/reflect/generics/visitor \
|
|
||||||
sun/reflect/misc \
|
|
||||||
sun/security/action \
|
|
||||||
sun/security/ec \
|
|
||||||
sun/security/jca \
|
|
||||||
sun/security/pkcs \
|
|
||||||
sun/security/pkcs10 \
|
|
||||||
sun/security/pkcs12 \
|
|
||||||
sun/security/provider \
|
|
||||||
sun/security/provider/certpath \
|
|
||||||
sun/security/provider/certpath/ssl \
|
|
||||||
sun/security/rsa \
|
|
||||||
sun/security/timestamp \
|
|
||||||
sun/security/tools \
|
|
||||||
sun/security/tools/keytool \
|
|
||||||
sun/security/util \
|
|
||||||
sun/security/validator \
|
|
||||||
sun/security/x509 \
|
|
||||||
sun/text \
|
sun/text \
|
||||||
sun/text/bidi \
|
|
||||||
sun/text/normalizer \
|
|
||||||
sun/text/resources \
|
|
||||||
sun/usagetracker \
|
sun/usagetracker \
|
||||||
sun/util \
|
sun/util
|
||||||
sun/util/calendar \
|
|
||||||
sun/util/locale \
|
|
||||||
sun/util/logging \
|
|
||||||
sun/util/logging/resources \
|
|
||||||
sun/util/resources
|
|
||||||
|
|
||||||
PROFILE_1_RTJAR_INCLUDE_TYPES :=
|
PROFILE_1_RTJAR_INCLUDE_TYPES :=
|
||||||
|
|
||||||
PROFILE_1_RTJAR_EXCLUDE_TYPES :=
|
PROFILE_1_RTJAR_EXCLUDE_TYPES :=
|
||||||
|
|
||||||
|
@ -144,139 +80,19 @@ PROFILE_1_INCLUDE_METAINF_SERVICES :=
|
||||||
PROFILE_2_RTJAR_INCLUDE_PACKAGES := \
|
PROFILE_2_RTJAR_INCLUDE_PACKAGES := \
|
||||||
com/sun/java_cup/internal/runtime \
|
com/sun/java_cup/internal/runtime \
|
||||||
com/sun/net/httpserver \
|
com/sun/net/httpserver \
|
||||||
com/sun/net/httpserver/spi \
|
com/sun/org/apache \
|
||||||
com/sun/org/apache/bcel/internal \
|
|
||||||
com/sun/org/apache/bcel/internal/classfile \
|
|
||||||
com/sun/org/apache/bcel/internal/generic \
|
|
||||||
com/sun/org/apache/bcel/internal/util \
|
|
||||||
com/sun/org/apache/regexp/internal \
|
|
||||||
com/sun/org/apache/xalan/internal \
|
|
||||||
com/sun/org/apache/xalan/internal/extensions \
|
|
||||||
com/sun/org/apache/xalan/internal/lib \
|
|
||||||
com/sun/org/apache/xalan/internal/res \
|
|
||||||
com/sun/org/apache/xalan/internal/templates \
|
|
||||||
com/sun/org/apache/xalan/internal/utils \
|
|
||||||
com/sun/org/apache/xalan/internal/xslt \
|
|
||||||
com/sun/org/apache/xalan/internal/xsltc \
|
|
||||||
com/sun/org/apache/xalan/internal/xsltc/cmdline \
|
|
||||||
com/sun/org/apache/xalan/internal/xsltc/cmdline/getopt \
|
|
||||||
com/sun/org/apache/xalan/internal/xsltc/compiler \
|
|
||||||
com/sun/org/apache/xalan/internal/xsltc/compiler/util \
|
|
||||||
com/sun/org/apache/xalan/internal/xsltc/dom \
|
|
||||||
com/sun/org/apache/xalan/internal/xsltc/runtime \
|
|
||||||
com/sun/org/apache/xalan/internal/xsltc/runtime/output \
|
|
||||||
com/sun/org/apache/xalan/internal/xsltc/trax \
|
|
||||||
com/sun/org/apache/xalan/internal/xsltc/util \
|
|
||||||
com/sun/org/apache/xerces/internal/dom \
|
|
||||||
com/sun/org/apache/xerces/internal/dom/events \
|
|
||||||
com/sun/org/apache/xerces/internal/impl \
|
|
||||||
com/sun/org/apache/xerces/internal/impl/dtd \
|
|
||||||
com/sun/org/apache/xerces/internal/impl/dtd/models \
|
|
||||||
com/sun/org/apache/xerces/internal/impl/dv \
|
|
||||||
com/sun/org/apache/xerces/internal/impl/dv/dtd \
|
|
||||||
com/sun/org/apache/xerces/internal/impl/dv/util \
|
|
||||||
com/sun/org/apache/xerces/internal/impl/dv/xs \
|
|
||||||
com/sun/org/apache/xerces/internal/impl/io \
|
|
||||||
com/sun/org/apache/xerces/internal/impl/msg \
|
|
||||||
com/sun/org/apache/xerces/internal/impl/validation \
|
|
||||||
com/sun/org/apache/xerces/internal/impl/xpath \
|
|
||||||
com/sun/org/apache/xerces/internal/impl/xpath/regex \
|
|
||||||
com/sun/org/apache/xerces/internal/impl/xs \
|
|
||||||
com/sun/org/apache/xerces/internal/impl/xs/identity \
|
|
||||||
com/sun/org/apache/xerces/internal/impl/xs/models \
|
|
||||||
com/sun/org/apache/xerces/internal/impl/xs/opti \
|
|
||||||
com/sun/org/apache/xerces/internal/impl/xs/traversers \
|
|
||||||
com/sun/org/apache/xerces/internal/impl/xs/util \
|
|
||||||
com/sun/org/apache/xerces/internal/jaxp \
|
|
||||||
com/sun/org/apache/xerces/internal/jaxp/datatype \
|
|
||||||
com/sun/org/apache/xerces/internal/jaxp/validation \
|
|
||||||
com/sun/org/apache/xerces/internal/parsers \
|
|
||||||
com/sun/org/apache/xerces/internal/util \
|
|
||||||
com/sun/org/apache/xerces/internal/utils \
|
|
||||||
com/sun/org/apache/xerces/internal/xinclude \
|
|
||||||
com/sun/org/apache/xerces/internal/xni \
|
|
||||||
com/sun/org/apache/xerces/internal/xni/grammars \
|
|
||||||
com/sun/org/apache/xerces/internal/xni/parser \
|
|
||||||
com/sun/org/apache/xerces/internal/xpointer \
|
|
||||||
com/sun/org/apache/xerces/internal/xs \
|
|
||||||
com/sun/org/apache/xerces/internal/xs/datatypes \
|
|
||||||
com/sun/org/apache/xml/internal/dtm \
|
|
||||||
com/sun/org/apache/xml/internal/dtm/ref \
|
|
||||||
com/sun/org/apache/xml/internal/dtm/ref/dom2dtm \
|
|
||||||
com/sun/org/apache/xml/internal/dtm/ref/sax2dtm \
|
|
||||||
com/sun/org/apache/xml/internal/res \
|
|
||||||
com/sun/org/apache/xml/internal/resolver \
|
|
||||||
com/sun/org/apache/xml/internal/resolver/helpers \
|
|
||||||
com/sun/org/apache/xml/internal/resolver/readers \
|
|
||||||
com/sun/org/apache/xml/internal/resolver/tools \
|
|
||||||
com/sun/org/apache/xml/internal/serialize \
|
|
||||||
com/sun/org/apache/xml/internal/serializer \
|
|
||||||
com/sun/org/apache/xml/internal/serializer/utils \
|
|
||||||
com/sun/org/apache/xml/internal/utils \
|
|
||||||
com/sun/org/apache/xml/internal/utils/res \
|
|
||||||
com/sun/org/apache/xpath/internal \
|
|
||||||
com/sun/org/apache/xpath/internal/axes \
|
|
||||||
com/sun/org/apache/xpath/internal/compiler \
|
|
||||||
com/sun/org/apache/xpath/internal/domapi \
|
|
||||||
com/sun/org/apache/xpath/internal/functions \
|
|
||||||
com/sun/org/apache/xpath/internal/jaxp \
|
|
||||||
com/sun/org/apache/xpath/internal/objects \
|
|
||||||
com/sun/org/apache/xpath/internal/operations \
|
|
||||||
com/sun/org/apache/xpath/internal/patterns \
|
|
||||||
com/sun/org/apache/xpath/internal/res \
|
|
||||||
com/sun/rmi/rmid \
|
com/sun/rmi/rmid \
|
||||||
com/sun/xml/internal/stream/ \
|
com/sun/xml/internal/stream \
|
||||||
com/sun/xml/internal/stream/dtd \
|
|
||||||
com/sun/xml/internal/stream/dtd/nonvalidating \
|
|
||||||
com/sun/xml/internal/stream/events \
|
|
||||||
com/sun/xml/internal/stream/util \
|
|
||||||
com/sun/xml/internal/stream/writers \
|
|
||||||
java/rmi \
|
java/rmi \
|
||||||
java/rmi/activation \
|
|
||||||
java/rmi/dgc \
|
|
||||||
java/rmi/registry \
|
|
||||||
java/rmi/server \
|
|
||||||
java/sql \
|
java/sql \
|
||||||
javax/rmi/ssl \
|
javax/rmi/ssl \
|
||||||
javax/sql \
|
javax/sql \
|
||||||
javax/transaction \
|
javax/transaction \
|
||||||
javax/transaction/xa \
|
|
||||||
javax/xml \
|
javax/xml \
|
||||||
javax/xml/datatype \
|
org/w3c \
|
||||||
javax/xml/namespace \
|
|
||||||
javax/xml/parsers \
|
|
||||||
javax/xml/stream \
|
|
||||||
javax/xml/stream/events \
|
|
||||||
javax/xml/stream/util \
|
|
||||||
javax/xml/transform \
|
|
||||||
javax/xml/transform/dom \
|
|
||||||
javax/xml/transform/sax \
|
|
||||||
javax/xml/transform/stax \
|
|
||||||
javax/xml/transform/stream \
|
|
||||||
javax/xml/validation \
|
|
||||||
javax/xml/xpath \
|
|
||||||
org/w3c/dom \
|
|
||||||
org/w3c/dom/bootstrap \
|
|
||||||
org/w3c/dom/css \
|
|
||||||
org/w3c/dom/events \
|
|
||||||
org/w3c/dom/html \
|
|
||||||
org/w3c/dom/ls \
|
|
||||||
org/w3c/dom/ranges \
|
|
||||||
org/w3c/dom/stylesheets \
|
|
||||||
org/w3c/dom/traversal \
|
|
||||||
org/w3c/dom/views \
|
|
||||||
org/w3c/dom/xpath \
|
|
||||||
org/xml/sax \
|
org/xml/sax \
|
||||||
org/xml/sax/ext \
|
|
||||||
org/xml/sax/helpers \
|
|
||||||
sun/net/httpserver \
|
sun/net/httpserver \
|
||||||
sun/rmi/log \
|
sun/rmi \
|
||||||
sun/rmi/registry \
|
|
||||||
sun/rmi/runtime \
|
|
||||||
sun/rmi/server \
|
|
||||||
sun/rmi/transport \
|
|
||||||
sun/rmi/transport/proxy \
|
|
||||||
sun/rmi/transport/tcp \
|
|
||||||
sun/util/xml
|
sun/util/xml
|
||||||
|
|
||||||
PROFILE_2_RTJAR_INCLUDE_TYPES :=
|
PROFILE_2_RTJAR_INCLUDE_TYPES :=
|
||||||
|
@ -284,287 +100,83 @@ PROFILE_2_RTJAR_INCLUDE_TYPES :=
|
||||||
PROFILE_2_RTJAR_EXCLUDE_TYPES :=
|
PROFILE_2_RTJAR_EXCLUDE_TYPES :=
|
||||||
|
|
||||||
PROFILE_2_INCLUDE_METAINF_SERVICES := \
|
PROFILE_2_INCLUDE_METAINF_SERVICES := \
|
||||||
META-INF/services/sun.util.spi.XmlPropertiesProvider
|
META-INF/services/sun.util.spi.XmlPropertiesProvider
|
||||||
|
|
||||||
|
|
||||||
PROFILE_3_RTJAR_INCLUDE_PACKAGES := \
|
PROFILE_3_RTJAR_INCLUDE_PACKAGES := \
|
||||||
com/sun/jmx/defaults \
|
com/sun/jmx \
|
||||||
com/sun/jmx/interceptor \
|
com/sun/jndi \
|
||||||
com/sun/jmx/mbeanserver \
|
|
||||||
com/sun/jmx/remote/internal \
|
|
||||||
com/sun/jmx/remote/protocol/rmi \
|
|
||||||
com/sun/jmx/remote/security \
|
|
||||||
com/sun/jmx/remote/util \
|
|
||||||
com/sun/jmx/snmp \
|
|
||||||
com/sun/jmx/snmp/IPAcl \
|
|
||||||
com/sun/jmx/snmp/agent \
|
|
||||||
com/sun/jmx/snmp/daemon \
|
|
||||||
com/sun/jmx/snmp/defaults \
|
|
||||||
com/sun/jmx/snmp/internal \
|
|
||||||
com/sun/jmx/snmp/mpm \
|
|
||||||
com/sun/jmx/snmp/tasks \
|
|
||||||
com/sun/jmx/trace \
|
|
||||||
com/sun/jndi/dns \
|
|
||||||
com/sun/jndi/ldap \
|
|
||||||
com/sun/jndi/ldap/ext \
|
|
||||||
com/sun/jndi/ldap/pool \
|
|
||||||
com/sun/jndi/ldap/sasl \
|
|
||||||
com/sun/jndi/rmi/registry \
|
|
||||||
com/sun/jndi/toolkit/ctx \
|
|
||||||
com/sun/jndi/toolkit/dir \
|
|
||||||
com/sun/jndi/toolkit/url \
|
|
||||||
com/sun/jndi/url/dns \
|
|
||||||
com/sun/jndi/url/ldap \
|
|
||||||
com/sun/jndi/url/ldaps \
|
|
||||||
com/sun/jndi/url/rmi \
|
|
||||||
com/sun/management \
|
com/sun/management \
|
||||||
com/sun/management/jmx \
|
|
||||||
com/sun/naming/internal \
|
com/sun/naming/internal \
|
||||||
com/sun/nio/sctp \
|
com/sun/nio/sctp \
|
||||||
com/sun/org/apache/xml/internal/security \
|
com/sun/org/apache/xml/internal/security \
|
||||||
com/sun/org/apache/xml/internal/security/algorithms \
|
|
||||||
com/sun/org/apache/xml/internal/security/algorithms/implementations \
|
|
||||||
com/sun/org/apache/xml/internal/security/c14n \
|
|
||||||
com/sun/org/apache/xml/internal/security/c14n/helper \
|
|
||||||
com/sun/org/apache/xml/internal/security/c14n/implementations \
|
|
||||||
com/sun/org/apache/xml/internal/security/encryption \
|
|
||||||
com/sun/org/apache/xml/internal/security/exceptions \
|
|
||||||
com/sun/org/apache/xml/internal/security/keys \
|
|
||||||
com/sun/org/apache/xml/internal/security/keys/content \
|
|
||||||
com/sun/org/apache/xml/internal/security/keys/content/keyvalues \
|
|
||||||
com/sun/org/apache/xml/internal/security/keys/content/x509 \
|
|
||||||
com/sun/org/apache/xml/internal/security/keys/keyresolver \
|
|
||||||
com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations \
|
|
||||||
com/sun/org/apache/xml/internal/security/keys/storage \
|
|
||||||
com/sun/org/apache/xml/internal/security/keys/storage/implementations \
|
|
||||||
com/sun/org/apache/xml/internal/security/signature \
|
|
||||||
com/sun/org/apache/xml/internal/security/transforms \
|
|
||||||
com/sun/org/apache/xml/internal/security/transforms/implementations \
|
|
||||||
com/sun/org/apache/xml/internal/security/transforms/params \
|
|
||||||
com/sun/org/apache/xml/internal/security/utils \
|
|
||||||
com/sun/org/apache/xml/internal/security/utils/resolver \
|
|
||||||
com/sun/org/apache/xml/internal/security/utils/resolver/implementations \
|
|
||||||
com/sun/rowset \
|
com/sun/rowset \
|
||||||
com/sun/rowset/internal \
|
com/sun/script \
|
||||||
com/sun/rowset/providers \
|
|
||||||
com/sun/script/javascript \
|
|
||||||
com/sun/script/util \
|
|
||||||
com/sun/security/auth \
|
com/sun/security/auth \
|
||||||
com/sun/security/auth/callback \
|
|
||||||
com/sun/security/auth/login \
|
|
||||||
com/sun/security/auth/module \
|
|
||||||
com/sun/security/jgss \
|
com/sun/security/jgss \
|
||||||
com/sun/security/ntlm \
|
com/sun/security/ntlm \
|
||||||
com/sun/security/sasl \
|
com/sun/security/sasl \
|
||||||
com/sun/security/sasl/digest \
|
|
||||||
com/sun/security/sasl/gsskerb \
|
|
||||||
com/sun/security/sasl/ntlm \
|
|
||||||
com/sun/security/sasl/util \
|
|
||||||
com/sun/tracing \
|
com/sun/tracing \
|
||||||
com/sun/tracing/dtrace \
|
|
||||||
java/lang/instrument \
|
java/lang/instrument \
|
||||||
java/lang/management \
|
java/lang/management \
|
||||||
java/security/acl \
|
java/security/acl \
|
||||||
java/util/prefs \
|
java/util/prefs \
|
||||||
javax/annotation/processing \
|
javax/annotation/processing \
|
||||||
javax/lang/model \
|
javax/lang/model \
|
||||||
javax/lang/model/element \
|
|
||||||
javax/lang/model/type \
|
|
||||||
javax/lang/model/util \
|
|
||||||
javax/management \
|
javax/management \
|
||||||
javax/management/loading \
|
|
||||||
javax/management/modelmbean \
|
|
||||||
javax/management/monitor \
|
|
||||||
javax/management/openmbean \
|
|
||||||
javax/management/relation \
|
|
||||||
javax/management/remote \
|
|
||||||
javax/management/remote/rmi \
|
|
||||||
javax/management/timer \
|
|
||||||
javax/naming \
|
javax/naming \
|
||||||
javax/naming/directory \
|
|
||||||
javax/naming/event \
|
|
||||||
javax/naming/ldap \
|
|
||||||
javax/naming/spi \
|
|
||||||
javax/script \
|
javax/script \
|
||||||
javax/security/auth/kerberos \
|
javax/security/auth/kerberos \
|
||||||
javax/security/sasl \
|
javax/security/sasl \
|
||||||
javax/smartcardio \
|
javax/smartcardio \
|
||||||
javax/sql/rowset \
|
javax/sql/rowset \
|
||||||
javax/sql/rowset/serial \
|
|
||||||
javax/sql/rowset/spi \
|
|
||||||
javax/tools \
|
javax/tools \
|
||||||
javax/tools/annotation \
|
|
||||||
javax/xml/crypto \
|
javax/xml/crypto \
|
||||||
javax/xml/crypto/dom \
|
|
||||||
javax/xml/crypto/dsig \
|
|
||||||
javax/xml/crypto/dsig/dom \
|
|
||||||
javax/xml/crypto/dsig/keyinfo \
|
|
||||||
javax/xml/crypto/dsig/spec \
|
|
||||||
org/ietf/jgss \
|
org/ietf/jgss \
|
||||||
org/jcp/xml/dsig/internal \
|
org/jcp/xml \
|
||||||
org/jcp/xml/dsig/internal/dom \
|
|
||||||
sun/instrument \
|
sun/instrument \
|
||||||
sun/management \
|
sun/management \
|
||||||
sun/management/counter \
|
|
||||||
sun/management/counter/perf \
|
|
||||||
sun/management/jmxremote \
|
|
||||||
sun/management/resources \
|
|
||||||
sun/management/snmp \
|
|
||||||
sun/management/snmp/jvminstr \
|
|
||||||
sun/management/snmp/jvmmib \
|
|
||||||
sun/management/snmp/util \
|
|
||||||
sun/net/dns \
|
sun/net/dns \
|
||||||
sun/net/www/protocol/http/ntlm \
|
sun/net/www/protocol/http/ntlm \
|
||||||
sun/net/www/protocol/http/spnego \
|
sun/net/www/protocol/http/spnego \
|
||||||
sun/nio/ch/sctp \
|
sun/nio/ch/sctp \
|
||||||
sun/org/mozilla/classfile/internal \
|
sun/org/mozilla \
|
||||||
sun/org/mozilla/javascript/internal \
|
|
||||||
sun/org/mozilla/javascript/internal/annotations \
|
|
||||||
sun/org/mozilla/javascript/internal/ast \
|
|
||||||
sun/org/mozilla/javascript/internal/debug \
|
|
||||||
sun/org/mozilla/javascript/internal/jdk13 \
|
|
||||||
sun/org/mozilla/javascript/internal/jdk15 \
|
|
||||||
sun/org/mozilla/javascript/internal/json \
|
|
||||||
sun/org/mozilla/javascript/internal/optimizer \
|
|
||||||
sun/org/mozilla/javascript/internal/regexp \
|
|
||||||
sun/org/mozilla/javascript/internal/serialize \
|
|
||||||
sun/org/mozilla/javascript/internal/xml \
|
|
||||||
sun/org/mozilla/javascript/internal/xmlimpl \
|
|
||||||
sun/security/acl \
|
sun/security/acl \
|
||||||
sun/security/jgss \
|
sun/security/jgss \
|
||||||
sun/security/jgss/krb5 \
|
|
||||||
sun/security/jgss/spi \
|
|
||||||
sun/security/jgss/spnego \
|
|
||||||
sun/security/jgss/wrapper \
|
|
||||||
sun/security/krb5 \
|
sun/security/krb5 \
|
||||||
sun/security/krb5/internal \
|
|
||||||
sun/security/krb5/internal/ccache \
|
|
||||||
sun/security/krb5/internal/crypto \
|
|
||||||
sun/security/krb5/internal/crypto/dk \
|
|
||||||
sun/security/krb5/internal/ktab \
|
|
||||||
sun/security/krb5/internal/rcache \
|
|
||||||
sun/security/krb5/internal/util \
|
|
||||||
sun/security/provider/certpath/ldap \
|
sun/security/provider/certpath/ldap \
|
||||||
sun/security/smartcardio \
|
sun/security/smartcardio \
|
||||||
sun/tracing \
|
sun/tracing
|
||||||
sun/tracing/dtrace
|
|
||||||
|
|
||||||
PROFILE_3_RTJAR_INCLUDE_TYPES :=
|
PROFILE_3_RTJAR_INCLUDE_TYPES :=
|
||||||
|
|
||||||
PROFILE_3_RTJAR_EXCLUDE_TYPES := \
|
PROFILE_3_RTJAR_EXCLUDE_TYPES := \
|
||||||
|
com/sun/security/auth/callback/DialogCallbackHandler$$1.class \
|
||||||
|
com/sun/security/auth/callback/DialogCallbackHandler$$2.class \
|
||||||
|
com/sun/security/auth/callback/DialogCallbackHandler$$Action.class \
|
||||||
|
com/sun/security/auth/callback/DialogCallbackHandler$$ConfirmationInfo.class \
|
||||||
|
com/sun/security/auth/callback/DialogCallbackHandler.class \
|
||||||
javax/management/remote/rmi/_RMIConnectionImpl_Tie.class \
|
javax/management/remote/rmi/_RMIConnectionImpl_Tie.class \
|
||||||
javax/management/remote/rmi/_RMIConnection_Stub.class \
|
javax/management/remote/rmi/_RMIConnection_Stub.class \
|
||||||
javax/management/remote/rmi/_RMIServerImpl_Tie.class \
|
javax/management/remote/rmi/_RMIServerImpl_Tie.class \
|
||||||
javax/management/remote/rmi/_RMIServer_Stub.class \
|
javax/management/remote/rmi/_RMIServer_Stub.class
|
||||||
com/sun/security/auth/callback/DialogCallbackHandler.class \
|
|
||||||
com/sun/security/auth/callback/DialogCallbackHandler\$$1.class \
|
|
||||||
com/sun/security/auth/callback/DialogCallbackHandler\$$2.class \
|
|
||||||
com/sun/security/auth/callback/DialogCallbackHandler\$$Action.class \
|
|
||||||
com/sun/security/auth/callback/DialogCallbackHandler\$$ConfirmationInfo.class
|
|
||||||
|
|
||||||
PROFILE_3_INCLUDE_METAINF_SERVICES := \
|
PROFILE_3_INCLUDE_METAINF_SERVICES := \
|
||||||
META-INF/services/javax.script.ScriptEngineFactory
|
META-INF/services/javax.script.ScriptEngineFactory
|
||||||
|
|
||||||
|
|
||||||
PROFILE_4_RTJAR_INCLUDE_PACKAGES := \
|
FULL_JRE_RTJAR_INCLUDE_PACKAGES := \
|
||||||
com/oracle/net \
|
com/oracle \
|
||||||
com/oracle/nio \
|
|
||||||
com/oracle/util \
|
|
||||||
com/sun/accessibility/internal/resources \
|
com/sun/accessibility/internal/resources \
|
||||||
com/sun/activation/registries \
|
com/sun/activation/registries \
|
||||||
com/sun/awt \
|
com/sun/awt \
|
||||||
com/sun/beans \
|
com/sun/beans \
|
||||||
com/sun/beans/decoder \
|
com/sun/corba \
|
||||||
com/sun/beans/finder \
|
|
||||||
com/sun/corba/se/impl/activation \
|
|
||||||
com/sun/corba/se/impl/copyobject \
|
|
||||||
com/sun/corba/se/impl/corba \
|
|
||||||
com/sun/corba/se/impl/dynamicany \
|
|
||||||
com/sun/corba/se/impl/encoding \
|
|
||||||
com/sun/corba/se/impl/interceptors \
|
|
||||||
com/sun/corba/se/impl/io \
|
|
||||||
com/sun/corba/se/impl/ior \
|
|
||||||
com/sun/corba/se/impl/ior/iiop \
|
|
||||||
com/sun/corba/se/impl/javax/rmi \
|
|
||||||
com/sun/corba/se/impl/javax/rmi/CORBA \
|
|
||||||
com/sun/corba/se/impl/legacy/connection \
|
|
||||||
com/sun/corba/se/impl/logging \
|
|
||||||
com/sun/corba/se/impl/monitoring \
|
|
||||||
com/sun/corba/se/impl/naming/cosnaming \
|
|
||||||
com/sun/corba/se/impl/naming/namingutil \
|
|
||||||
com/sun/corba/se/impl/naming/pcosnaming \
|
|
||||||
com/sun/corba/se/impl/oa \
|
|
||||||
com/sun/corba/se/impl/oa/poa \
|
|
||||||
com/sun/corba/se/impl/oa/toa \
|
|
||||||
com/sun/corba/se/impl/orb \
|
|
||||||
com/sun/corba/se/impl/orbutil \
|
|
||||||
com/sun/corba/se/impl/orbutil/closure \
|
|
||||||
com/sun/corba/se/impl/orbutil/concurrent \
|
|
||||||
com/sun/corba/se/impl/orbutil/fsm \
|
|
||||||
com/sun/corba/se/impl/orbutil/graph \
|
|
||||||
com/sun/corba/se/impl/orbutil/threadpool \
|
|
||||||
com/sun/corba/se/impl/presentation/rmi \
|
|
||||||
com/sun/corba/se/impl/protocol \
|
|
||||||
com/sun/corba/se/impl/protocol/giopmsgheaders \
|
|
||||||
com/sun/corba/se/impl/resolver \
|
|
||||||
com/sun/corba/se/impl/transport \
|
|
||||||
com/sun/corba/se/impl/util \
|
|
||||||
com/sun/corba/se/internal/CosNaming \
|
|
||||||
com/sun/corba/se/internal/Interceptors \
|
|
||||||
com/sun/corba/se/internal/POA \
|
|
||||||
com/sun/corba/se/internal/corba \
|
|
||||||
com/sun/corba/se/internal/iiop \
|
|
||||||
com/sun/corba/se/org/omg/CORBA \
|
|
||||||
com/sun/corba/se/pept/broker \
|
|
||||||
com/sun/corba/se/pept/encoding \
|
|
||||||
com/sun/corba/se/pept/protocol \
|
|
||||||
com/sun/corba/se/pept/transport \
|
|
||||||
com/sun/corba/se/spi/activation \
|
|
||||||
com/sun/corba/se/spi/activation/InitialNameServicePackage \
|
|
||||||
com/sun/corba/se/spi/activation/LocatorPackage \
|
|
||||||
com/sun/corba/se/spi/activation/RepositoryPackage \
|
|
||||||
com/sun/corba/se/spi/copyobject \
|
|
||||||
com/sun/corba/se/spi/encoding \
|
|
||||||
com/sun/corba/se/spi/extension \
|
|
||||||
com/sun/corba/se/spi/ior \
|
|
||||||
com/sun/corba/se/spi/ior/iiop \
|
|
||||||
com/sun/corba/se/spi/legacy/connection \
|
|
||||||
com/sun/corba/se/spi/legacy/interceptor \
|
|
||||||
com/sun/corba/se/spi/logging \
|
|
||||||
com/sun/corba/se/spi/monitoring \
|
|
||||||
com/sun/corba/se/spi/oa \
|
|
||||||
com/sun/corba/se/spi/orb \
|
|
||||||
com/sun/corba/se/spi/orbutil/closure \
|
|
||||||
com/sun/corba/se/spi/orbutil/fsm \
|
|
||||||
com/sun/corba/se/spi/orbutil/proxy \
|
|
||||||
com/sun/corba/se/spi/orbutil/threadpool \
|
|
||||||
com/sun/corba/se/spi/presentation/rmi \
|
|
||||||
com/sun/corba/se/spi/protocol \
|
|
||||||
com/sun/corba/se/spi/resolver \
|
|
||||||
com/sun/corba/se/spi/servicecontext \
|
|
||||||
com/sun/corba/se/spi/transport \
|
|
||||||
com/sun/image/codec/jpeg \
|
com/sun/image/codec/jpeg \
|
||||||
com/sun/imageio/plugins/bmp \
|
com/sun/imageio \
|
||||||
com/sun/imageio/plugins/common \
|
com/sun/istack \
|
||||||
com/sun/imageio/plugins/gif \
|
com/sun/java/browser \
|
||||||
com/sun/imageio/plugins/jpeg \
|
|
||||||
com/sun/imageio/plugins/png \
|
|
||||||
com/sun/imageio/plugins/wbmp \
|
|
||||||
com/sun/imageio/spi \
|
|
||||||
com/sun/imageio/stream \
|
|
||||||
com/sun/istack/internal \
|
|
||||||
com/sun/istack/internal/localization \
|
|
||||||
com/sun/istack/internal/logging \
|
|
||||||
com/sun/java/browser/dom \
|
|
||||||
com/sun/java/browser/net \
|
|
||||||
com/sun/java/swing \
|
com/sun/java/swing \
|
||||||
com/sun/java/swing/plaf/gtk \
|
|
||||||
com/sun/java/swing/plaf/gtk/resources \
|
|
||||||
com/sun/java/swing/plaf/motif \
|
|
||||||
com/sun/java/swing/plaf/motif/resources \
|
|
||||||
com/sun/java/swing/plaf/nimbus \
|
|
||||||
com/sun/java/swing/plaf/windows \
|
|
||||||
com/sun/java/swing/plaf/windows/resources \
|
|
||||||
com/sun/jmx/remote/protocol/iiop \
|
com/sun/jmx/remote/protocol/iiop \
|
||||||
com/sun/jndi/cosnaming \
|
com/sun/jndi/cosnaming \
|
||||||
com/sun/jndi/toolkit/corba \
|
com/sun/jndi/toolkit/corba \
|
||||||
|
@ -572,313 +184,40 @@ PROFILE_4_RTJAR_INCLUDE_PACKAGES := \
|
||||||
com/sun/jndi/url/iiop \
|
com/sun/jndi/url/iiop \
|
||||||
com/sun/jndi/url/iiopname \
|
com/sun/jndi/url/iiopname \
|
||||||
com/sun/media/sound \
|
com/sun/media/sound \
|
||||||
com/sun/org/glassfish/external/amx \
|
com/sun/org/glassfish \
|
||||||
com/sun/org/glassfish/external/arc \
|
com/sun/org/omg \
|
||||||
com/sun/org/glassfish/external/probe/provider \
|
com/sun/swing \
|
||||||
com/sun/org/glassfish/external/probe/provider/annotations \
|
|
||||||
com/sun/org/glassfish/external/statistics \
|
|
||||||
com/sun/org/glassfish/external/statistics/annotations \
|
|
||||||
com/sun/org/glassfish/external/statistics/impl \
|
|
||||||
com/sun/org/glassfish/gmbal \
|
|
||||||
com/sun/org/glassfish/gmbal/util \
|
|
||||||
com/sun/org/omg/CORBA \
|
|
||||||
com/sun/org/omg/CORBA/ValueDefPackage \
|
|
||||||
com/sun/org/omg/CORBA/portable \
|
|
||||||
com/sun/org/omg/SendingContext \
|
|
||||||
com/sun/org/omg/SendingContext/CodeBasePackage \
|
|
||||||
com/sun/servicetag \
|
|
||||||
com/sun/swing/internal/plaf/basic/resources \
|
|
||||||
com/sun/swing/internal/plaf/metal/resources \
|
|
||||||
com/sun/swing/internal/plaf/synth/resources \
|
|
||||||
com/sun/xml/internal/bind \
|
com/sun/xml/internal/bind \
|
||||||
com/sun/xml/internal/bind/annotation \
|
|
||||||
com/sun/xml/internal/bind/api \
|
|
||||||
com/sun/xml/internal/bind/api/impl \
|
|
||||||
com/sun/xml/internal/bind/marshaller \
|
|
||||||
com/sun/xml/internal/bind/unmarshaller \
|
|
||||||
com/sun/xml/internal/bind/util \
|
|
||||||
com/sun/xml/internal/bind/v2 \
|
|
||||||
com/sun/xml/internal/bind/v2/bytecode \
|
|
||||||
com/sun/xml/internal/bind/v2/model/annotation \
|
|
||||||
com/sun/xml/internal/bind/v2/model/core \
|
|
||||||
com/sun/xml/internal/bind/v2/model/impl \
|
|
||||||
com/sun/xml/internal/bind/v2/model/nav \
|
|
||||||
com/sun/xml/internal/bind/v2/model/runtime \
|
|
||||||
com/sun/xml/internal/bind/v2/runtime \
|
|
||||||
com/sun/xml/internal/bind/v2/runtime/output \
|
|
||||||
com/sun/xml/internal/bind/v2/runtime/property \
|
|
||||||
com/sun/xml/internal/bind/v2/runtime/reflect \
|
|
||||||
com/sun/xml/internal/bind/v2/runtime/reflect/opt \
|
|
||||||
com/sun/xml/internal/bind/v2/runtime/unmarshaller \
|
|
||||||
com/sun/xml/internal/bind/v2/schemagen \
|
|
||||||
com/sun/xml/internal/bind/v2/schemagen/episode \
|
|
||||||
com/sun/xml/internal/bind/v2/schemagen/xmlschema \
|
|
||||||
com/sun/xml/internal/bind/v2/util \
|
|
||||||
com/sun/xml/internal/fastinfoset \
|
com/sun/xml/internal/fastinfoset \
|
||||||
com/sun/xml/internal/fastinfoset/algorithm \
|
com/sun/xml/internal/messaging \
|
||||||
com/sun/xml/internal/fastinfoset/alphabet \
|
com/sun/xml/internal/org \
|
||||||
com/sun/xml/internal/fastinfoset/dom \
|
|
||||||
com/sun/xml/internal/fastinfoset/org/apache/xerces/util \
|
|
||||||
com/sun/xml/internal/fastinfoset/sax \
|
|
||||||
com/sun/xml/internal/fastinfoset/stax \
|
|
||||||
com/sun/xml/internal/fastinfoset/stax/events \
|
|
||||||
com/sun/xml/internal/fastinfoset/stax/factory \
|
|
||||||
com/sun/xml/internal/fastinfoset/stax/util \
|
|
||||||
com/sun/xml/internal/fastinfoset/tools \
|
|
||||||
com/sun/xml/internal/fastinfoset/util \
|
|
||||||
com/sun/xml/internal/fastinfoset/vocab \
|
|
||||||
com/sun/xml/internal/messaging/saaj \
|
|
||||||
com/sun/xml/internal/messaging/saaj/client/p2p \
|
|
||||||
com/sun/xml/internal/messaging/saaj/packaging/mime \
|
|
||||||
com/sun/xml/internal/messaging/saaj/packaging/mime/internet \
|
|
||||||
com/sun/xml/internal/messaging/saaj/packaging/mime/util \
|
|
||||||
com/sun/xml/internal/messaging/saaj/soap \
|
|
||||||
com/sun/xml/internal/messaging/saaj/soap/dynamic \
|
|
||||||
com/sun/xml/internal/messaging/saaj/soap/impl \
|
|
||||||
com/sun/xml/internal/messaging/saaj/soap/name \
|
|
||||||
com/sun/xml/internal/messaging/saaj/soap/ver1_1 \
|
|
||||||
com/sun/xml/internal/messaging/saaj/soap/ver1_2 \
|
|
||||||
com/sun/xml/internal/messaging/saaj/util \
|
|
||||||
com/sun/xml/internal/messaging/saaj/util/transform \
|
|
||||||
com/sun/xml/internal/org/jvnet/fastinfoset \
|
|
||||||
com/sun/xml/internal/org/jvnet/fastinfoset/sax \
|
|
||||||
com/sun/xml/internal/org/jvnet/fastinfoset/sax/helpers \
|
|
||||||
com/sun/xml/internal/org/jvnet/fastinfoset/stax \
|
|
||||||
com/sun/xml/internal/org/jvnet/mimepull \
|
|
||||||
com/sun/xml/internal/org/jvnet/staxex \
|
|
||||||
com/sun/xml/internal/org/jvnet/ws \
|
|
||||||
com/sun/xml/internal/org/jvnet/ws/databinding \
|
|
||||||
com/sun/xml/internal/org/jvnet/ws/message \
|
|
||||||
com/sun/xml/internal/stream/buffer \
|
com/sun/xml/internal/stream/buffer \
|
||||||
com/sun/xml/internal/stream/buffer/sax \
|
|
||||||
com/sun/xml/internal/stream/buffer/stax \
|
|
||||||
com/sun/xml/internal/txw2 \
|
com/sun/xml/internal/txw2 \
|
||||||
com/sun/xml/internal/txw2/annotation \
|
com/sun/xml/internal/ws \
|
||||||
com/sun/xml/internal/txw2/output \
|
|
||||||
com/sun/xml/internal/ws/addressing \
|
|
||||||
com/sun/xml/internal/ws/addressing/model \
|
|
||||||
com/sun/xml/internal/ws/addressing/policy \
|
|
||||||
com/sun/xml/internal/ws/addressing/v200408 \
|
|
||||||
com/sun/xml/internal/ws/api \
|
|
||||||
com/sun/xml/internal/ws/api/addressing \
|
|
||||||
com/sun/xml/internal/ws/api/client \
|
|
||||||
com/sun/xml/internal/ws/api/config/management \
|
|
||||||
com/sun/xml/internal/ws/api/config/management/policy \
|
|
||||||
com/sun/xml/internal/ws/api/databinding \
|
|
||||||
com/sun/xml/internal/ws/api/fastinfoset \
|
|
||||||
com/sun/xml/internal/ws/api/ha \
|
|
||||||
com/sun/xml/internal/ws/api/handler \
|
|
||||||
com/sun/xml/internal/ws/api/message \
|
|
||||||
com/sun/xml/internal/ws/api/message/saaj \
|
|
||||||
com/sun/xml/internal/ws/api/message/stream \
|
|
||||||
com/sun/xml/internal/ws/api/model \
|
|
||||||
com/sun/xml/internal/ws/api/model/soap \
|
|
||||||
com/sun/xml/internal/ws/api/model/wsdl \
|
|
||||||
com/sun/xml/internal/ws/api/pipe \
|
|
||||||
com/sun/xml/internal/ws/api/pipe/helper \
|
|
||||||
com/sun/xml/internal/ws/api/policy \
|
|
||||||
com/sun/xml/internal/ws/api/policy/subject \
|
|
||||||
com/sun/xml/internal/ws/api/server \
|
|
||||||
com/sun/xml/internal/ws/api/streaming \
|
|
||||||
com/sun/xml/internal/ws/api/wsdl/parser \
|
|
||||||
com/sun/xml/internal/ws/api/wsdl/writer \
|
|
||||||
com/sun/xml/internal/ws/binding \
|
|
||||||
com/sun/xml/internal/ws/client \
|
|
||||||
com/sun/xml/internal/ws/client/dispatch \
|
|
||||||
com/sun/xml/internal/ws/client/sei \
|
|
||||||
com/sun/xml/internal/ws/config/management/policy \
|
|
||||||
com/sun/xml/internal/ws/db \
|
|
||||||
com/sun/xml/internal/ws/db/glassfish \
|
|
||||||
com/sun/xml/internal/ws/developer \
|
|
||||||
com/sun/xml/internal/ws/encoding \
|
|
||||||
com/sun/xml/internal/ws/encoding/fastinfoset \
|
|
||||||
com/sun/xml/internal/ws/encoding/policy \
|
|
||||||
com/sun/xml/internal/ws/encoding/soap \
|
|
||||||
com/sun/xml/internal/ws/encoding/soap/streaming \
|
|
||||||
com/sun/xml/internal/ws/encoding/xml \
|
|
||||||
com/sun/xml/internal/ws/fault \
|
|
||||||
com/sun/xml/internal/ws/handler \
|
|
||||||
com/sun/xml/internal/ws/message \
|
|
||||||
com/sun/xml/internal/ws/message/jaxb \
|
|
||||||
com/sun/xml/internal/ws/message/saaj \
|
|
||||||
com/sun/xml/internal/ws/message/source \
|
|
||||||
com/sun/xml/internal/ws/message/stream \
|
|
||||||
com/sun/xml/internal/ws/model \
|
|
||||||
com/sun/xml/internal/ws/model/soap \
|
|
||||||
com/sun/xml/internal/ws/model/wsdl \
|
|
||||||
com/sun/xml/internal/ws/org/objectweb/asm \
|
|
||||||
com/sun/xml/internal/ws/policy \
|
|
||||||
com/sun/xml/internal/ws/policy/jaxws \
|
|
||||||
com/sun/xml/internal/ws/policy/jaxws/spi \
|
|
||||||
com/sun/xml/internal/ws/policy/privateutil \
|
|
||||||
com/sun/xml/internal/ws/policy/sourcemodel \
|
|
||||||
com/sun/xml/internal/ws/policy/sourcemodel/attach \
|
|
||||||
com/sun/xml/internal/ws/policy/sourcemodel/wspolicy \
|
|
||||||
com/sun/xml/internal/ws/policy/spi \
|
|
||||||
com/sun/xml/internal/ws/policy/subject \
|
|
||||||
com/sun/xml/internal/ws/protocol/soap \
|
|
||||||
com/sun/xml/internal/ws/protocol/xml \
|
|
||||||
com/sun/xml/internal/ws/resources \
|
|
||||||
com/sun/xml/internal/ws/server \
|
|
||||||
com/sun/xml/internal/ws/server/provider \
|
|
||||||
com/sun/xml/internal/ws/server/sei \
|
|
||||||
com/sun/xml/internal/ws/spi \
|
|
||||||
com/sun/xml/internal/ws/spi/db \
|
|
||||||
com/sun/xml/internal/ws/streaming \
|
|
||||||
com/sun/xml/internal/ws/transport \
|
|
||||||
com/sun/xml/internal/ws/transport/http \
|
|
||||||
com/sun/xml/internal/ws/transport/http/client \
|
|
||||||
com/sun/xml/internal/ws/transport/http/server \
|
|
||||||
com/sun/xml/internal/ws/util \
|
|
||||||
com/sun/xml/internal/ws/util/exception \
|
|
||||||
com/sun/xml/internal/ws/util/localization \
|
|
||||||
com/sun/xml/internal/ws/util/pipe \
|
|
||||||
com/sun/xml/internal/ws/util/xml \
|
|
||||||
com/sun/xml/internal/ws/wsdl \
|
|
||||||
com/sun/xml/internal/ws/wsdl/parser \
|
|
||||||
com/sun/xml/internal/ws/wsdl/writer \
|
|
||||||
com/sun/xml/internal/ws/wsdl/writer/document \
|
|
||||||
com/sun/xml/internal/ws/wsdl/writer/document/http \
|
|
||||||
com/sun/xml/internal/ws/wsdl/writer/document/soap \
|
|
||||||
com/sun/xml/internal/ws/wsdl/writer/document/soap12 \
|
|
||||||
com/sun/xml/internal/ws/wsdl/writer/document/xsd \
|
|
||||||
java/applet \
|
java/applet \
|
||||||
java/awt \
|
java/awt \
|
||||||
java/awt/color \
|
|
||||||
java/awt/datatransfer \
|
|
||||||
java/awt/dnd \
|
|
||||||
java/awt/dnd/peer \
|
|
||||||
java/awt/event \
|
|
||||||
java/awt/font \
|
|
||||||
java/awt/geom \
|
|
||||||
java/awt/im \
|
|
||||||
java/awt/im/spi \
|
|
||||||
java/awt/image \
|
|
||||||
java/awt/image/renderable \
|
|
||||||
java/awt/peer \
|
|
||||||
java/awt/print \
|
|
||||||
java/beans \
|
java/beans \
|
||||||
javax/accessibility \
|
javax/accessibility \
|
||||||
javax/activation \
|
javax/activation \
|
||||||
javax/activity \
|
javax/activity \
|
||||||
javax/imageio \
|
javax/imageio \
|
||||||
javax/imageio/event \
|
|
||||||
javax/imageio/metadata \
|
|
||||||
javax/imageio/plugins/bmp \
|
|
||||||
javax/imageio/plugins/jpeg \
|
|
||||||
javax/imageio/spi \
|
|
||||||
javax/imageio/stream \
|
|
||||||
javax/jws \
|
javax/jws \
|
||||||
javax/jws/soap \
|
|
||||||
javax/print \
|
javax/print \
|
||||||
javax/print/attribute \
|
|
||||||
javax/print/attribute/standard \
|
|
||||||
javax/print/event \
|
|
||||||
javax/rmi/CORBA \
|
javax/rmi/CORBA \
|
||||||
javax/sound/midi \
|
javax/sound \
|
||||||
javax/sound/midi/spi \
|
|
||||||
javax/sound/sampled \
|
|
||||||
javax/sound/sampled/spi \
|
|
||||||
javax/swing \
|
javax/swing \
|
||||||
javax/swing/border \
|
|
||||||
javax/swing/colorchooser \
|
|
||||||
javax/swing/event \
|
|
||||||
javax/swing/filechooser \
|
|
||||||
javax/swing/plaf \
|
|
||||||
javax/swing/plaf/basic \
|
|
||||||
javax/swing/plaf/metal \
|
|
||||||
javax/swing/plaf/multi \
|
|
||||||
javax/swing/plaf/nimbus \
|
|
||||||
javax/swing/plaf/synth \
|
|
||||||
javax/swing/table \
|
|
||||||
javax/swing/text \
|
|
||||||
javax/swing/text/html \
|
|
||||||
javax/swing/text/html/parser \
|
|
||||||
javax/swing/text/rtf \
|
|
||||||
javax/swing/tree \
|
|
||||||
javax/swing/undo \
|
|
||||||
javax/xml/bind \
|
javax/xml/bind \
|
||||||
javax/xml/bind/annotation \
|
|
||||||
javax/xml/bind/annotation/adapters \
|
|
||||||
javax/xml/bind/attachment \
|
|
||||||
javax/xml/bind/helpers \
|
|
||||||
javax/xml/bind/util \
|
|
||||||
javax/xml/soap \
|
javax/xml/soap \
|
||||||
javax/xml/ws \
|
javax/xml/ws \
|
||||||
javax/xml/ws/handler \
|
org/omg \
|
||||||
javax/xml/ws/handler/soap \
|
|
||||||
javax/xml/ws/http \
|
|
||||||
javax/xml/ws/soap \
|
|
||||||
javax/xml/ws/spi \
|
|
||||||
javax/xml/ws/spi/http \
|
|
||||||
javax/xml/ws/wsaddressing \
|
|
||||||
org/omg/CORBA \
|
|
||||||
org/omg/CORBA/DynAnyPackage \
|
|
||||||
org/omg/CORBA/ORBPackage \
|
|
||||||
org/omg/CORBA/TypeCodePackage \
|
|
||||||
org/omg/CORBA/portable \
|
|
||||||
org/omg/CORBA_2_3 \
|
|
||||||
org/omg/CORBA_2_3/portable \
|
|
||||||
org/omg/CosNaming \
|
|
||||||
org/omg/CosNaming/NamingContextExtPackage \
|
|
||||||
org/omg/CosNaming/NamingContextPackage \
|
|
||||||
org/omg/Dynamic \
|
|
||||||
org/omg/DynamicAny \
|
|
||||||
org/omg/DynamicAny/DynAnyFactoryPackage \
|
|
||||||
org/omg/DynamicAny/DynAnyPackage \
|
|
||||||
org/omg/IOP \
|
|
||||||
org/omg/IOP/CodecFactoryPackage \
|
|
||||||
org/omg/IOP/CodecPackage \
|
|
||||||
org/omg/Messaging \
|
|
||||||
org/omg/PortableInterceptor \
|
|
||||||
org/omg/PortableInterceptor/ORBInitInfoPackage \
|
|
||||||
org/omg/PortableServer \
|
|
||||||
org/omg/PortableServer/CurrentPackage \
|
|
||||||
org/omg/PortableServer/POAManagerPackage \
|
|
||||||
org/omg/PortableServer/POAPackage \
|
|
||||||
org/omg/PortableServer/ServantLocatorPackage \
|
|
||||||
org/omg/PortableServer/portable \
|
|
||||||
org/omg/SendingContext \
|
|
||||||
org/omg/stub/java/rmi \
|
|
||||||
org/omg/stub/javax/management/remote/rmi \
|
|
||||||
sun/applet \
|
sun/applet \
|
||||||
sun/applet/resources \
|
|
||||||
sun/audio \
|
sun/audio \
|
||||||
sun/awt \
|
sun/awt \
|
||||||
sun/awt/X11 \
|
|
||||||
sun/awt/datatransfer \
|
|
||||||
sun/awt/dnd \
|
|
||||||
sun/awt/event \
|
|
||||||
sun/awt/geom \
|
|
||||||
sun/awt/im \
|
|
||||||
sun/awt/image \
|
|
||||||
sun/awt/image/codec \
|
|
||||||
sun/awt/motif \
|
|
||||||
sun/awt/resources \
|
|
||||||
sun/awt/shell \
|
|
||||||
sun/awt/util \
|
|
||||||
sun/awt/windows \
|
|
||||||
sun/beans/editors \
|
|
||||||
sun/beans/infos \
|
|
||||||
sun/corba \
|
sun/corba \
|
||||||
sun/dc \
|
sun/dc \
|
||||||
sun/dc/path \
|
|
||||||
sun/dc/pr \
|
|
||||||
sun/font \
|
sun/font \
|
||||||
sun/java2d \
|
sun/java2d \
|
||||||
sun/java2d/cmm \
|
|
||||||
sun/java2d/cmm/kcms \
|
|
||||||
sun/java2d/cmm/lcms \
|
|
||||||
sun/java2d/jules \
|
|
||||||
sun/java2d/loops \
|
|
||||||
sun/java2d/opengl \
|
|
||||||
sun/java2d/pipe \
|
|
||||||
sun/java2d/pipe/hw \
|
|
||||||
sun/java2d/pisces \
|
|
||||||
sun/java2d/x11 \
|
|
||||||
sun/java2d/xr \
|
|
||||||
sun/net/ftp \
|
sun/net/ftp \
|
||||||
sun/net/ftp/impl \
|
|
||||||
sun/net/smtp \
|
sun/net/smtp \
|
||||||
sun/net/www/content/audio \
|
sun/net/www/content/audio \
|
||||||
sun/net/www/content/image \
|
sun/net/www/content/image \
|
||||||
|
@ -887,27 +226,26 @@ PROFILE_4_RTJAR_INCLUDE_PACKAGES := \
|
||||||
sun/net/www/protocol/mailto \
|
sun/net/www/protocol/mailto \
|
||||||
sun/net/www/protocol/netdoc \
|
sun/net/www/protocol/netdoc \
|
||||||
sun/print \
|
sun/print \
|
||||||
sun/print/resources \
|
|
||||||
sun/security/tools/policytool \
|
sun/security/tools/policytool \
|
||||||
sun/swing \
|
sun/swing \
|
||||||
sun/swing/icon \
|
sun/tools/jar
|
||||||
sun/swing/plaf \
|
|
||||||
sun/swing/plaf/synth \
|
|
||||||
sun/swing/plaf/windows \
|
|
||||||
sun/swing/table \
|
|
||||||
sun/swing/text \
|
|
||||||
sun/swing/text/html \
|
|
||||||
sun/tools/jar \
|
|
||||||
sun/tools/jar/resources
|
|
||||||
|
|
||||||
PROFILE_4_RTJAR_INCLUDE_TYPES := \
|
FULL_JRE_RTJAR_INCLUDE_TYPES := \
|
||||||
com/sun/xml/internal/ws/*.class \
|
com/sun/security/auth/callback/DialogCallbackHandler$$1.class \
|
||||||
|
com/sun/security/auth/callback/DialogCallbackHandler$$2.class \
|
||||||
|
com/sun/security/auth/callback/DialogCallbackHandler$$Action.class \
|
||||||
|
com/sun/security/auth/callback/DialogCallbackHandler$$ConfirmationInfo.class \
|
||||||
|
com/sun/security/auth/callback/DialogCallbackHandler.class \
|
||||||
javax/annotation/*.class \
|
javax/annotation/*.class \
|
||||||
|
javax/management/remote/rmi/_RMIConnectionImpl_Tie.class \
|
||||||
|
javax/management/remote/rmi/_RMIConnection_Stub.class \
|
||||||
|
javax/management/remote/rmi/_RMIServerImpl_Tie.class \
|
||||||
|
javax/management/remote/rmi/_RMIServer_Stub.class \
|
||||||
javax/rmi/*.class
|
javax/rmi/*.class
|
||||||
|
|
||||||
PROFILE_4_RTJAR_EXCLUDE_TYPES :=
|
FULL_JRE_RTJAR_EXCLUDE_TYPES :=
|
||||||
|
|
||||||
PROFILE_4_INCLUDE_METAINF_SERVICES := \
|
FULL_JRE_INCLUDE_METAINF_SERVICES := \
|
||||||
META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin \
|
META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin \
|
||||||
META-INF/services/com.sun.tools.internal.xjc.Plugin \
|
META-INF/services/com.sun.tools.internal.xjc.Plugin \
|
||||||
META-INF/services/javax.print.PrintServiceLookup \
|
META-INF/services/javax.print.PrintServiceLookup \
|
||||||
|
|
|
@ -83,14 +83,19 @@ public abstract class AquaButtonBorder extends AquaBorder implements Border, UIR
|
||||||
painter.state.set(state);
|
painter.state.set(state);
|
||||||
painter.state.set((state != State.DISABLED && state != State.INACTIVE) && b.isFocusPainted() && isFocused(b) ? Focused.YES : Focused.NO);
|
painter.state.set((state != State.DISABLED && state != State.INACTIVE) && b.isFocusPainted() && isFocused(b) ? Focused.YES : Focused.NO);
|
||||||
|
|
||||||
|
// Full border size of the component.
|
||||||
|
// g.setColor(new Color(0, 255, 0, 70));
|
||||||
|
// g.drawRect(x, y, width - 1, height - 1);
|
||||||
|
|
||||||
final Insets subInsets = sizeVariant.insets;
|
final Insets subInsets = sizeVariant.insets;
|
||||||
x += subInsets.left;
|
x += subInsets.left;
|
||||||
y += subInsets.top;
|
y += subInsets.top;
|
||||||
width -= (subInsets.left + subInsets.right);
|
width -= (subInsets.left + subInsets.right);
|
||||||
height -= (subInsets.top + subInsets.bottom);
|
height -= (subInsets.top + subInsets.bottom);
|
||||||
|
|
||||||
// g.setColor(Color.magenta);
|
// Where the native border should start to paint.
|
||||||
// g.drawRect(x, y, width - 1, height - 1);
|
// g.setColor(new Color(255, 0, 255, 70));
|
||||||
|
// g.drawRect(x, y, width - 1, height - 1);
|
||||||
|
|
||||||
doButtonPaint(b, model, g, x, y, width, height);
|
doButtonPaint(b, model, g, x, y, width, height);
|
||||||
}
|
}
|
||||||
|
|
|
@ -184,30 +184,30 @@ public class AquaButtonExtendedTypes {
|
||||||
new BorderDefinedTypeSpecifier("round", Widget.BUTTON_ROUND, new SizeVariant().alterInsets(2, 0, 0, 0).alterMinSize(28, 28), -3, -3, -3, -3),
|
new BorderDefinedTypeSpecifier("round", Widget.BUTTON_ROUND, new SizeVariant().alterInsets(2, 0, 0, 0).alterMinSize(28, 28), -3, -3, -3, -3),
|
||||||
new BorderDefinedTypeSpecifier("texturedRound", Widget.BUTTON_ROUND_INSET, new SizeVariant().alterInsets(0, 0, 0, 0).alterMinSize(26, 26), -2, -2, 0, 0),
|
new BorderDefinedTypeSpecifier("texturedRound", Widget.BUTTON_ROUND_INSET, new SizeVariant().alterInsets(0, 0, 0, 0).alterMinSize(26, 26), -2, -2, 0, 0),
|
||||||
|
|
||||||
new SegmentedBorderDefinedTypeSpecifier("segmented-first", Widget.BUTTON_SEGMENTED, SegmentPosition.FIRST, new SizeVariant().alterMargins(6, 16, 6, 10).alterInsets(5, 3, 5, 0).alterMinSize(0, 28), 0, -3, 0, -3),
|
new SegmentedBorderDefinedTypeSpecifier("segmented-first", Widget.BUTTON_SEGMENTED, SegmentPosition.FIRST, new SizeVariant().alterMargins(6, 16, 6, 10).alterInsets(2, 3, 2, 0).alterMinSize(0, 28), 0, -3, 0, -3),
|
||||||
new SegmentedBorderDefinedTypeSpecifier("segmented-middle", Widget.BUTTON_SEGMENTED, SegmentPosition.MIDDLE, new SizeVariant().alterMargins(6, 9, 6, 10).alterInsets(5, 0, 5, 0).alterMinSize(0, 28), 0, -3, 0, -3),
|
new SegmentedBorderDefinedTypeSpecifier("segmented-middle", Widget.BUTTON_SEGMENTED, SegmentPosition.MIDDLE, new SizeVariant().alterMargins(6, 9, 6, 10).alterInsets(2, 0, 2, 0).alterMinSize(0, 28), 0, -3, 0, -3),
|
||||||
new SegmentedBorderDefinedTypeSpecifier("segmented-last", Widget.BUTTON_SEGMENTED, SegmentPosition.LAST, new SizeVariant().alterMargins(6, 9, 6, 16).alterInsets(5, 0, 5, 3).alterMinSize(0, 28), 0, -3, 0, -3),
|
new SegmentedBorderDefinedTypeSpecifier("segmented-last", Widget.BUTTON_SEGMENTED, SegmentPosition.LAST, new SizeVariant().alterMargins(6, 9, 6, 16).alterInsets(2, 0, 2, 3).alterMinSize(0, 28), 0, -3, 0, -3),
|
||||||
new SegmentedBorderDefinedTypeSpecifier("segmented-only", Widget.BUTTON_SEGMENTED, SegmentPosition.ONLY, new SizeVariant().alterMargins(6, 16, 6, 16).alterInsets(5, 3, 5, 3).alterMinSize(34, 28), 0, -3, 0, -3),
|
new SegmentedBorderDefinedTypeSpecifier("segmented-only", Widget.BUTTON_SEGMENTED, SegmentPosition.ONLY, new SizeVariant().alterMargins(6, 16, 6, 16).alterInsets(2, 3, 2, 3).alterMinSize(34, 28), 0, -3, 0, -3),
|
||||||
|
|
||||||
new SegmentedBorderDefinedTypeSpecifier("segmentedRoundRect-first", Widget.BUTTON_SEGMENTED_INSET, SegmentPosition.FIRST, new SizeVariant().alterMargins(6, 12, 6, 8).alterInsets(5, 2, 5, 0).alterMinSize(0, 28), 0, -3, 0, -3),
|
new SegmentedBorderDefinedTypeSpecifier("segmentedRoundRect-first", Widget.BUTTON_SEGMENTED_INSET, SegmentPosition.FIRST, new SizeVariant().alterMargins(6, 12, 6, 8).alterInsets(2, 2, 2, 0).alterMinSize(0, 28), 0, -3, 0, -3),
|
||||||
new SegmentedBorderDefinedTypeSpecifier("segmentedRoundRect-middle", Widget.BUTTON_SEGMENTED_INSET, SegmentPosition.MIDDLE, new SizeVariant().alterMargins(6, 8, 6, 8).alterInsets(5, 0, 5, 0).alterMinSize(0, 28), 0, -3, 0, -3),
|
new SegmentedBorderDefinedTypeSpecifier("segmentedRoundRect-middle", Widget.BUTTON_SEGMENTED_INSET, SegmentPosition.MIDDLE, new SizeVariant().alterMargins(6, 8, 6, 8).alterInsets(2, 0, 2, 0).alterMinSize(0, 28), 0, -3, 0, -3),
|
||||||
new SegmentedBorderDefinedTypeSpecifier("segmentedRoundRect-last", Widget.BUTTON_SEGMENTED_INSET, SegmentPosition.LAST, new SizeVariant().alterMargins(6, 8, 6, 12).alterInsets(5, 0, 5, 2).alterMinSize(0, 28), 0, -3, 0, -3),
|
new SegmentedBorderDefinedTypeSpecifier("segmentedRoundRect-last", Widget.BUTTON_SEGMENTED_INSET, SegmentPosition.LAST, new SizeVariant().alterMargins(6, 8, 6, 12).alterInsets(2, 0, 2, 2).alterMinSize(0, 28), 0, -3, 0, -3),
|
||||||
new SegmentedBorderDefinedTypeSpecifier("segmentedRoundRect-only", Widget.BUTTON_SEGMENTED_INSET, SegmentPosition.ONLY, new SizeVariant().alterMargins(6, 12, 6, 12).alterInsets(5, 2, 5, 2).alterMinSize(0, 28), 0, -3, 0, -3),
|
new SegmentedBorderDefinedTypeSpecifier("segmentedRoundRect-only", Widget.BUTTON_SEGMENTED_INSET, SegmentPosition.ONLY, new SizeVariant().alterMargins(6, 12, 6, 12).alterInsets(2, 2, 2, 2).alterMinSize(0, 28), 0, -3, 0, -3),
|
||||||
|
|
||||||
new SegmentedBorderDefinedTypeSpecifier("segmentedTexturedRounded-first", Widget.BUTTON_SEGMENTED_SCURVE, SegmentPosition.FIRST, new SizeVariant().alterMargins(6, 12, 6, 8).alterInsets(5, 2, 5, 0).alterMinSize(0, 28), 0, -3, 0, -3),
|
new SegmentedBorderDefinedTypeSpecifier("segmentedTexturedRounded-first", Widget.BUTTON_SEGMENTED_SCURVE, SegmentPosition.FIRST, new SizeVariant().alterMargins(6, 12, 6, 8).alterInsets(2, 2, 2, 0).alterMinSize(0, 28), 0, -3, 0, -3),
|
||||||
new SegmentedBorderDefinedTypeSpecifier("segmentedTexturedRounded-middle", Widget.BUTTON_SEGMENTED_SCURVE, SegmentPosition.MIDDLE, new SizeVariant().alterMargins(6, 8, 6, 8).alterInsets(5, 0, 5, 0).alterMinSize(0, 28), 0, -3, 0, -3),
|
new SegmentedBorderDefinedTypeSpecifier("segmentedTexturedRounded-middle", Widget.BUTTON_SEGMENTED_SCURVE, SegmentPosition.MIDDLE, new SizeVariant().alterMargins(6, 8, 6, 8).alterInsets(2, 0, 2, 0).alterMinSize(0, 28), 0, -3, 0, -3),
|
||||||
new SegmentedBorderDefinedTypeSpecifier("segmentedTexturedRounded-last", Widget.BUTTON_SEGMENTED_SCURVE, SegmentPosition.LAST, new SizeVariant().alterMargins(6, 8, 6, 12).alterInsets(5, 0, 5, 2).alterMinSize(0, 28), 0, -3, 0, -3),
|
new SegmentedBorderDefinedTypeSpecifier("segmentedTexturedRounded-last", Widget.BUTTON_SEGMENTED_SCURVE, SegmentPosition.LAST, new SizeVariant().alterMargins(6, 8, 6, 12).alterInsets(2, 0, 2, 2).alterMinSize(0, 28), 0, -3, 0, -3),
|
||||||
new SegmentedBorderDefinedTypeSpecifier("segmentedTexturedRounded-only", Widget.BUTTON_SEGMENTED_SCURVE, SegmentPosition.ONLY, new SizeVariant().alterMargins(6, 12, 6, 12).alterInsets(5, 2, 5, 2).alterMinSize(0, 28), 0, -3, 0, -3),
|
new SegmentedBorderDefinedTypeSpecifier("segmentedTexturedRounded-only", Widget.BUTTON_SEGMENTED_SCURVE, SegmentPosition.ONLY, new SizeVariant().alterMargins(6, 12, 6, 12).alterInsets(2, 2, 2, 2).alterMinSize(0, 28), 0, -3, 0, -3),
|
||||||
|
|
||||||
new SegmentedBorderDefinedTypeSpecifier("segmentedTextured-first", Widget.BUTTON_SEGMENTED_TEXTURED, SegmentPosition.FIRST, new SizeVariant().alterMargins(6, 12, 6, 8).alterInsets(6, 3, 6, 0).alterMinSize(0, 28), 0, -3, 0, -3),
|
new SegmentedBorderDefinedTypeSpecifier("segmentedTextured-first", Widget.BUTTON_SEGMENTED_TEXTURED, SegmentPosition.FIRST, new SizeVariant().alterMargins(6, 12, 6, 8).alterInsets(2, 3, 2, 0).alterMinSize(0, 28), 0, -3, 0, -3),
|
||||||
new SegmentedBorderDefinedTypeSpecifier("segmentedTextured-middle", Widget.BUTTON_SEGMENTED_TEXTURED, SegmentPosition.MIDDLE, new SizeVariant().alterMargins(6, 8, 6, 8).alterInsets(6, 0, 6, 0).alterMinSize(0, 28), 0, -3, 0, -3),
|
new SegmentedBorderDefinedTypeSpecifier("segmentedTextured-middle", Widget.BUTTON_SEGMENTED_TEXTURED, SegmentPosition.MIDDLE, new SizeVariant().alterMargins(6, 8, 6, 8).alterInsets(2, 0, 2, 0).alterMinSize(0, 28), 0, -3, 0, -3),
|
||||||
new SegmentedBorderDefinedTypeSpecifier("segmentedTextured-last", Widget.BUTTON_SEGMENTED_TEXTURED, SegmentPosition.LAST, new SizeVariant().alterMargins(6, 8, 6, 12).alterInsets(6, 0, 6, 3).alterMinSize(0, 28), 0, -3, 0, -3),
|
new SegmentedBorderDefinedTypeSpecifier("segmentedTextured-last", Widget.BUTTON_SEGMENTED_TEXTURED, SegmentPosition.LAST, new SizeVariant().alterMargins(6, 8, 6, 12).alterInsets(2, 0, 2, 3).alterMinSize(0, 28), 0, -3, 0, -3),
|
||||||
new SegmentedBorderDefinedTypeSpecifier("segmentedTextured-only", Widget.BUTTON_SEGMENTED_TEXTURED, SegmentPosition.ONLY, new SizeVariant().alterMargins(6, 12, 6, 12).alterInsets(6, 3, 6, 3).alterMinSize(0, 28), 0, -3, 0, -3),
|
new SegmentedBorderDefinedTypeSpecifier("segmentedTextured-only", Widget.BUTTON_SEGMENTED_TEXTURED, SegmentPosition.ONLY, new SizeVariant().alterMargins(6, 12, 6, 12).alterInsets(2, 3, 2, 3).alterMinSize(0, 28), 0, -3, 0, -3),
|
||||||
|
|
||||||
new SegmentedBorderDefinedTypeSpecifier("segmentedCapsule-first", Widget.BUTTON_SEGMENTED_TOOLBAR, SegmentPosition.FIRST, new SizeVariant().alterMargins(6, 12, 6, 8).alterInsets(5, 2, 5, 0).alterMinSize(0, 28), 0, 0, 0, 0),
|
new SegmentedBorderDefinedTypeSpecifier("segmentedCapsule-first", Widget.BUTTON_SEGMENTED_TOOLBAR, SegmentPosition.FIRST, new SizeVariant().alterMargins(6, 12, 6, 8).alterInsets(2, 2, 2, 0).alterMinSize(0, 28), 0, 0, 0, 0),
|
||||||
new SegmentedBorderDefinedTypeSpecifier("segmentedCapsule-middle", Widget.BUTTON_SEGMENTED_TOOLBAR, SegmentPosition.MIDDLE, new SizeVariant().alterMargins(6, 8, 6, 8).alterInsets(5, 0, 5, 0).alterMinSize(0, 28), 0, 0, 0, 0),
|
new SegmentedBorderDefinedTypeSpecifier("segmentedCapsule-middle", Widget.BUTTON_SEGMENTED_TOOLBAR, SegmentPosition.MIDDLE, new SizeVariant().alterMargins(6, 8, 6, 8).alterInsets(2, 0, 2, 0).alterMinSize(0, 28), 0, 0, 0, 0),
|
||||||
new SegmentedBorderDefinedTypeSpecifier("segmentedCapsule-last", Widget.BUTTON_SEGMENTED_TOOLBAR, SegmentPosition.LAST, new SizeVariant().alterMargins(6, 8, 6, 12).alterInsets(5, 0, 5, 2).alterMinSize(0, 28), 0, 0, 0, 0),
|
new SegmentedBorderDefinedTypeSpecifier("segmentedCapsule-last", Widget.BUTTON_SEGMENTED_TOOLBAR, SegmentPosition.LAST, new SizeVariant().alterMargins(6, 8, 6, 12).alterInsets(2, 0, 2, 2).alterMinSize(0, 28), 0, 0, 0, 0),
|
||||||
new SegmentedBorderDefinedTypeSpecifier("segmentedCapsule-only", Widget.BUTTON_SEGMENTED_TOOLBAR, SegmentPosition.ONLY, new SizeVariant().alterMargins(6, 12, 6, 12).alterInsets(5, 2, 5, 2).alterMinSize(34, 28), 0, 0, 0, 0),
|
new SegmentedBorderDefinedTypeSpecifier("segmentedCapsule-only", Widget.BUTTON_SEGMENTED_TOOLBAR, SegmentPosition.ONLY, new SizeVariant().alterMargins(6, 12, 6, 12).alterInsets(2, 2, 2, 2).alterMinSize(34, 28), 0, 0, 0, 0),
|
||||||
|
|
||||||
new BorderDefinedTypeSpecifier("segmentedGradient-first", Widget.BUTTON_BEVEL_INSET, new SizeVariant(18, 18).alterMargins(4, 5, 4, 5).replaceInsets(new Insets(-2,-0,-2,-0))),
|
new BorderDefinedTypeSpecifier("segmentedGradient-first", Widget.BUTTON_BEVEL_INSET, new SizeVariant(18, 18).alterMargins(4, 5, 4, 5).replaceInsets(new Insets(-2,-0,-2,-0))),
|
||||||
new BorderDefinedTypeSpecifier("segmentedGradient-middle", Widget.BUTTON_BEVEL_INSET, new SizeVariant(18, 18).alterMargins(4, 5, 4, 5).replaceInsets(new Insets(-2,-1,-2,-0))),
|
new BorderDefinedTypeSpecifier("segmentedGradient-middle", Widget.BUTTON_BEVEL_INSET, new SizeVariant(18, 18).alterMargins(4, 5, 4, 5).replaceInsets(new Insets(-2,-1,-2,-0))),
|
||||||
|
|
|
@ -32,11 +32,13 @@ import java.text.spi.DateFormatSymbolsProvider;
|
||||||
import java.text.spi.DecimalFormatSymbolsProvider;
|
import java.text.spi.DecimalFormatSymbolsProvider;
|
||||||
import java.text.spi.NumberFormatProvider;
|
import java.text.spi.NumberFormatProvider;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
import java.util.Calendar;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.ResourceBundle.Control;
|
import java.util.ResourceBundle.Control;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import java.util.TimeZone;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.concurrent.ConcurrentMap;
|
import java.util.concurrent.ConcurrentMap;
|
||||||
import java.util.concurrent.atomic.AtomicReferenceArray;
|
import java.util.concurrent.atomic.AtomicReferenceArray;
|
||||||
|
@ -45,6 +47,7 @@ import java.util.spi.CalendarNameProvider;
|
||||||
import java.util.spi.CurrencyNameProvider;
|
import java.util.spi.CurrencyNameProvider;
|
||||||
import java.util.spi.LocaleNameProvider;
|
import java.util.spi.LocaleNameProvider;
|
||||||
import java.util.spi.TimeZoneNameProvider;
|
import java.util.spi.TimeZoneNameProvider;
|
||||||
|
import sun.util.spi.CalendarProvider;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* LocaleProviderAdapter implementation for the Mac OS X locale data
|
* LocaleProviderAdapter implementation for the Mac OS X locale data
|
||||||
|
@ -94,17 +97,56 @@ public class HostLocaleProviderAdapterImpl {
|
||||||
|
|
||||||
private static final Set<Locale> supportedLocaleSet;
|
private static final Set<Locale> supportedLocaleSet;
|
||||||
static {
|
static {
|
||||||
Set<Locale> tmpSet = new HashSet<Locale>();
|
Set<Locale> tmpSet = new HashSet<>();
|
||||||
// Assuming the default locales do not include any extensions, so
|
// Assuming the default locales do not include any extensions, so
|
||||||
// no stripping is needed here.
|
// no stripping is needed here.
|
||||||
Locale l = Locale.forLanguageTag(getDefaultLocale(CAT_FORMAT).replaceAll("_","-"));
|
Locale l = convertMacOSXLocaleToJavaLocale(getDefaultLocale(CAT_FORMAT));
|
||||||
tmpSet.addAll(Control.getNoFallbackControl(Control.FORMAT_DEFAULT).getCandidateLocales("", l));
|
tmpSet.addAll(Control.getNoFallbackControl(Control.FORMAT_DEFAULT).getCandidateLocales("", l));
|
||||||
l = Locale.forLanguageTag(getDefaultLocale(CAT_DISPLAY).replaceAll("_","-"));
|
l = convertMacOSXLocaleToJavaLocale(getDefaultLocale(CAT_DISPLAY));
|
||||||
tmpSet.addAll(Control.getNoFallbackControl(Control.FORMAT_DEFAULT).getCandidateLocales("", l));
|
tmpSet.addAll(Control.getNoFallbackControl(Control.FORMAT_DEFAULT).getCandidateLocales("", l));
|
||||||
supportedLocaleSet = Collections.unmodifiableSet(tmpSet);
|
supportedLocaleSet = Collections.unmodifiableSet(tmpSet);
|
||||||
}
|
}
|
||||||
private final static Locale[] supportedLocale = supportedLocaleSet.toArray(new Locale[0]);
|
private final static Locale[] supportedLocale = supportedLocaleSet.toArray(new Locale[0]);
|
||||||
|
|
||||||
|
@SuppressWarnings("fallthrough")
|
||||||
|
private static Locale convertMacOSXLocaleToJavaLocale(String macosxloc) {
|
||||||
|
// MacOSX may return ICU notation, here is the quote from CFLocale doc:
|
||||||
|
// "The corresponding value is a CFString containing the POSIX locale
|
||||||
|
// identifier as used by ICU, such as "ja_JP". If you have a variant
|
||||||
|
// locale or a different currency or calendar, it can be as complex as
|
||||||
|
// "en_US_POSIX@calendar=japanese;currency=EUR" or
|
||||||
|
// "az_Cyrl_AZ@calendar=buddhist;currency=JPY".
|
||||||
|
String[] tmp = macosxloc.split("@");
|
||||||
|
String langTag = tmp[0].replace('_', '-');
|
||||||
|
if (tmp.length > 1) {
|
||||||
|
String[] ext = tmp[1].split(";");
|
||||||
|
for (String keyval : ext) {
|
||||||
|
// We are only interested in "calendar" value for now.
|
||||||
|
if (keyval.startsWith("calendar=")) {
|
||||||
|
String calid = keyval.substring(keyval.indexOf('=')+1);
|
||||||
|
switch (calid) {
|
||||||
|
case "gregorian":
|
||||||
|
langTag += "-u-ca-gregory";
|
||||||
|
break;
|
||||||
|
case "japanese":
|
||||||
|
// Tweak for ja_JP_JP
|
||||||
|
if (tmp[0].equals("ja_JP")) {
|
||||||
|
return JRELocaleConstants.JA_JP_JP;
|
||||||
|
}
|
||||||
|
|
||||||
|
// fall through
|
||||||
|
|
||||||
|
default:
|
||||||
|
langTag += "-u-ca-" + calid;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return Locale.forLanguageTag(langTag);
|
||||||
|
}
|
||||||
|
|
||||||
public static DateFormatProvider getDateFormatProvider() {
|
public static DateFormatProvider getDateFormatProvider() {
|
||||||
return new DateFormatProvider() {
|
return new DateFormatProvider() {
|
||||||
|
|
||||||
|
@ -170,9 +212,8 @@ public class HostLocaleProviderAdapterImpl {
|
||||||
if (isSupportedLocale(Locale.getDefault(Locale.Category.FORMAT))) {
|
if (isSupportedLocale(Locale.getDefault(Locale.Category.FORMAT))) {
|
||||||
return supportedLocale;
|
return supportedLocale;
|
||||||
}
|
}
|
||||||
|
return new Locale[0];
|
||||||
return new Locale[0];
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupportedLocale(Locale locale) {
|
public boolean isSupportedLocale(Locale locale) {
|
||||||
|
@ -362,6 +403,30 @@ public class HostLocaleProviderAdapterImpl {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static CalendarProvider getCalendarProvider() {
|
||||||
|
return new CalendarProvider() {
|
||||||
|
@Override
|
||||||
|
public Locale[] getAvailableLocales() {
|
||||||
|
return getSupportedCalendarLocales();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isSupportedLocale(Locale locale) {
|
||||||
|
return isSupportedCalendarLocale(locale);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Calendar getInstance(TimeZone zone, Locale locale) {
|
||||||
|
return new Calendar.Builder()
|
||||||
|
.setLocale(locale)
|
||||||
|
.setCalendarType(getCalendarID(locale.toLanguageTag()))
|
||||||
|
.setTimeZone(zone)
|
||||||
|
.setInstant(System.currentTimeMillis())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
public static CurrencyNameProvider getCurrencyNameProvider() {
|
public static CurrencyNameProvider getCurrencyNameProvider() {
|
||||||
return new CurrencyNameProvider() {
|
return new CurrencyNameProvider() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -455,23 +520,20 @@ public class HostLocaleProviderAdapterImpl {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean isSupportedCalendarLocale(Locale locale) {
|
private static boolean isSupportedCalendarLocale(Locale locale) {
|
||||||
// special case for ja_JP_JP
|
|
||||||
if (JRELocaleConstants.JA_JP_JP.equals(locale)) {
|
|
||||||
return isJapaneseCalendar();
|
|
||||||
}
|
|
||||||
|
|
||||||
Locale base = locale.stripExtensions();
|
Locale base = locale.stripExtensions();
|
||||||
if (!supportedLocaleSet.contains(base)) {
|
if (!supportedLocaleSet.contains(base)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
String caltype = locale.getUnicodeLocaleType("ca");
|
String requestedCalType = locale.getUnicodeLocaleType("ca");
|
||||||
if (caltype == null) {
|
String nativeCalType =
|
||||||
return true;
|
getCalendarID(locale.toLanguageTag()).replaceFirst("gregorian", "gregory");
|
||||||
}
|
|
||||||
|
|
||||||
return caltype.replaceFirst("gregory", "gregorian").equals(
|
if (requestedCalType == null) {
|
||||||
getCalendarID(locale.toLanguageTag()));
|
return Calendar.getAvailableCalendarTypes().contains(nativeCalType);
|
||||||
|
} else {
|
||||||
|
return requestedCalType.equals(nativeCalType);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean isJapaneseCalendar() {
|
private static boolean isJapaneseCalendar() {
|
||||||
|
@ -479,18 +541,15 @@ public class HostLocaleProviderAdapterImpl {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Locale getCalendarLocale(Locale locale) {
|
private static Locale getCalendarLocale(Locale locale) {
|
||||||
Locale.Builder lb = new Locale.Builder().setLocale(locale);
|
String nativeCalType = getCalendarID(locale.toLanguageTag())
|
||||||
String calid = getCalendarID(locale.toLanguageTag());
|
.replaceFirst("gregorian", "gregory");
|
||||||
switch (calid) {
|
if (Calendar.getAvailableCalendarTypes().contains(nativeCalType)) {
|
||||||
case "gregorian":
|
return new Locale.Builder()
|
||||||
calid = "gregory";
|
.setLocale(locale)
|
||||||
// FALL THROUGH!
|
.setUnicodeLocaleKeyword("ca", nativeCalType)
|
||||||
case "japanese":
|
.build();
|
||||||
case "buddhist":
|
} else {
|
||||||
lb.setUnicodeLocaleKeyword("ca", calid);
|
return locale;
|
||||||
return lb.build();
|
|
||||||
default:
|
|
||||||
return locale;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,42 @@ static int getBPPFromModeString(CFStringRef mode)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static BOOL isValidDisplayMode(CGDisplayModeRef mode){
|
||||||
|
return (1 < CGDisplayModeGetWidth(mode) && 1 < CGDisplayModeGetHeight(mode));
|
||||||
|
}
|
||||||
|
|
||||||
|
static CFMutableArrayRef getAllValidDisplayModes(jint displayID){
|
||||||
|
CFArrayRef allModes = CGDisplayCopyAllDisplayModes(displayID, NULL);
|
||||||
|
|
||||||
|
CFIndex numModes = CFArrayGetCount(allModes);
|
||||||
|
CFMutableArrayRef validModes = CFArrayCreateMutable(kCFAllocatorDefault, numModes + 1, NULL);
|
||||||
|
|
||||||
|
CFIndex n;
|
||||||
|
for (n=0; n < numModes; n++) {
|
||||||
|
CGDisplayModeRef cRef = (CGDisplayModeRef) CFArrayGetValueAtIndex(allModes, n);
|
||||||
|
if (cRef != NULL && isValidDisplayMode(cRef)) {
|
||||||
|
CFArrayAppendValue(validModes, cRef);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
CGDisplayModeRef currentMode = CGDisplayCopyDisplayMode(displayID);
|
||||||
|
|
||||||
|
BOOL containsCurrentMode = NO;
|
||||||
|
numModes = CFArrayGetCount(validModes);
|
||||||
|
for (n=0; n < numModes; n++) {
|
||||||
|
if(CFArrayGetValueAtIndex(validModes, n) == currentMode){
|
||||||
|
containsCurrentMode = YES;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!containsCurrentMode) {
|
||||||
|
CFArrayAppendValue(validModes, currentMode);
|
||||||
|
}
|
||||||
|
|
||||||
|
return validModes;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Find the best possible match in the list of display modes that we can switch to based on
|
* Find the best possible match in the list of display modes that we can switch to based on
|
||||||
* the provided parameters.
|
* the provided parameters.
|
||||||
|
@ -198,28 +234,30 @@ Java_sun_awt_CGraphicsDevice_nativeSetDisplayMode
|
||||||
(JNIEnv *env, jclass class, jint displayID, jint w, jint h, jint bpp, jint refrate)
|
(JNIEnv *env, jclass class, jint displayID, jint w, jint h, jint bpp, jint refrate)
|
||||||
{
|
{
|
||||||
JNF_COCOA_ENTER(env);
|
JNF_COCOA_ENTER(env);
|
||||||
CFArrayRef allModes = CGDisplayCopyAllDisplayModes(displayID, NULL);
|
CFArrayRef allModes = getAllValidDisplayModes(displayID);
|
||||||
|
|
||||||
CGDisplayModeRef closestMatch = getBestModeForParameters(allModes, (int)w, (int)h, (int)bpp, (int)refrate);
|
CGDisplayModeRef closestMatch = getBestModeForParameters(allModes, (int)w, (int)h, (int)bpp, (int)refrate);
|
||||||
|
__block CGError retCode = kCGErrorSuccess;
|
||||||
if (closestMatch != NULL) {
|
if (closestMatch != NULL) {
|
||||||
[JNFRunLoop performOnMainThreadWaiting:YES withBlock:^(){
|
[JNFRunLoop performOnMainThreadWaiting:YES withBlock:^(){
|
||||||
CGDisplayConfigRef config;
|
CGDisplayConfigRef config;
|
||||||
CGError retCode = CGBeginDisplayConfiguration(&config);
|
retCode = CGBeginDisplayConfiguration(&config);
|
||||||
if (retCode == kCGErrorSuccess) {
|
if (retCode == kCGErrorSuccess) {
|
||||||
CGConfigureDisplayWithDisplayMode(config, displayID, closestMatch, NULL);
|
CGConfigureDisplayWithDisplayMode(config, displayID, closestMatch, NULL);
|
||||||
CGCompleteDisplayConfiguration(config, kCGConfigureForAppOnly);
|
retCode = CGCompleteDisplayConfiguration(config, kCGConfigureForAppOnly);
|
||||||
if (config != NULL) {
|
|
||||||
CFRelease(config);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}];
|
}];
|
||||||
} else {
|
} else {
|
||||||
[JNFException raise:env as:kIllegalArgumentException reason:"Invalid display mode"];
|
[JNFException raise:env as:kIllegalArgumentException reason:"Invalid display mode"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (retCode != kCGErrorSuccess){
|
||||||
|
[JNFException raise:env as:kIllegalArgumentException reason:"Unable to set display mode!"];
|
||||||
|
}
|
||||||
|
|
||||||
CFRelease(allModes);
|
CFRelease(allModes);
|
||||||
JNF_COCOA_EXIT(env);
|
JNF_COCOA_EXIT(env);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Class: sun_awt_CGraphicsDevice
|
* Class: sun_awt_CGraphicsDevice
|
||||||
* Method: nativeGetDisplayMode
|
* Method: nativeGetDisplayMode
|
||||||
|
@ -247,7 +285,8 @@ Java_sun_awt_CGraphicsDevice_nativeGetDisplayModes
|
||||||
{
|
{
|
||||||
jobjectArray jreturnArray = NULL;
|
jobjectArray jreturnArray = NULL;
|
||||||
JNF_COCOA_ENTER(env);
|
JNF_COCOA_ENTER(env);
|
||||||
CFArrayRef allModes = CGDisplayCopyAllDisplayModes(displayID, NULL);
|
CFArrayRef allModes = getAllValidDisplayModes(displayID);
|
||||||
|
|
||||||
CFIndex numModes = CFArrayGetCount(allModes);
|
CFIndex numModes = CFArrayGetCount(allModes);
|
||||||
static JNF_CLASS_CACHE(jc_DisplayMode, "java/awt/DisplayMode");
|
static JNF_CLASS_CACHE(jc_DisplayMode, "java/awt/DisplayMode");
|
||||||
|
|
||||||
|
|
|
@ -32,8 +32,11 @@ import javax.security.auth.spi.*;
|
||||||
import javax.naming.*;
|
import javax.naming.*;
|
||||||
import javax.naming.directory.*;
|
import javax.naming.directory.*;
|
||||||
|
|
||||||
|
import java.security.AccessController;
|
||||||
|
import java.security.PrivilegedAction;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
|
import java.util.ResourceBundle;
|
||||||
|
|
||||||
import com.sun.security.auth.UnixPrincipal;
|
import com.sun.security.auth.UnixPrincipal;
|
||||||
import com.sun.security.auth.UnixNumericUserPrincipal;
|
import com.sun.security.auth.UnixNumericUserPrincipal;
|
||||||
|
@ -150,8 +153,14 @@ import com.sun.security.auth.UnixNumericGroupPrincipal;
|
||||||
*/
|
*/
|
||||||
public class JndiLoginModule implements LoginModule {
|
public class JndiLoginModule implements LoginModule {
|
||||||
|
|
||||||
static final java.util.ResourceBundle rb =
|
private static final ResourceBundle rb = AccessController.doPrivileged(
|
||||||
java.util.ResourceBundle.getBundle("sun.security.util.AuthResources");
|
new PrivilegedAction<ResourceBundle>() {
|
||||||
|
public ResourceBundle run() {
|
||||||
|
return ResourceBundle.getBundle(
|
||||||
|
"sun.security.util.AuthResources");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
/** JNDI Provider */
|
/** JNDI Provider */
|
||||||
public final String USER_PROVIDER = "user.provider.url";
|
public final String USER_PROVIDER = "user.provider.url";
|
||||||
|
|
|
@ -30,22 +30,11 @@ import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.security.AuthProvider;
|
import java.security.*;
|
||||||
import java.security.GeneralSecurityException;
|
|
||||||
import java.security.Key;
|
|
||||||
import java.security.KeyStore;
|
|
||||||
import java.security.KeyStoreException;
|
|
||||||
import java.security.NoSuchAlgorithmException;
|
|
||||||
import java.security.NoSuchProviderException;
|
|
||||||
import java.security.PrivateKey;
|
|
||||||
import java.security.Provider;
|
|
||||||
import java.security.UnrecoverableKeyException;
|
|
||||||
import java.security.cert.*;
|
import java.security.cert.*;
|
||||||
|
import java.security.cert.Certificate;
|
||||||
import java.security.cert.X509Certificate;
|
import java.security.cert.X509Certificate;
|
||||||
import java.util.Arrays;
|
import java.util.*;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.LinkedList;
|
|
||||||
import java.util.Map;
|
|
||||||
import javax.security.auth.Destroyable;
|
import javax.security.auth.Destroyable;
|
||||||
import javax.security.auth.DestroyFailedException;
|
import javax.security.auth.DestroyFailedException;
|
||||||
import javax.security.auth.Subject;
|
import javax.security.auth.Subject;
|
||||||
|
@ -123,8 +112,14 @@ import sun.security.util.Password;
|
||||||
*/
|
*/
|
||||||
public class KeyStoreLoginModule implements LoginModule {
|
public class KeyStoreLoginModule implements LoginModule {
|
||||||
|
|
||||||
static final java.util.ResourceBundle rb =
|
private static final ResourceBundle rb = AccessController.doPrivileged(
|
||||||
java.util.ResourceBundle.getBundle("sun.security.util.AuthResources");
|
new PrivilegedAction<ResourceBundle>() {
|
||||||
|
public ResourceBundle run() {
|
||||||
|
return ResourceBundle.getBundle(
|
||||||
|
"sun.security.util.AuthResources");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
/* -- Fields -- */
|
/* -- Fields -- */
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,8 @@
|
||||||
package com.sun.security.auth.module;
|
package com.sun.security.auth.module;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
import java.security.AccessController;
|
||||||
|
import java.security.PrivilegedAction;
|
||||||
import java.text.MessageFormat;
|
import java.text.MessageFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
|
@ -429,8 +431,14 @@ public class Krb5LoginModule implements LoginModule {
|
||||||
|
|
||||||
private static final String NAME = "javax.security.auth.login.name";
|
private static final String NAME = "javax.security.auth.login.name";
|
||||||
private static final String PWD = "javax.security.auth.login.password";
|
private static final String PWD = "javax.security.auth.login.password";
|
||||||
static final java.util.ResourceBundle rb =
|
private static final ResourceBundle rb = AccessController.doPrivileged(
|
||||||
java.util.ResourceBundle.getBundle("sun.security.util.AuthResources");
|
new PrivilegedAction<ResourceBundle>() {
|
||||||
|
public ResourceBundle run() {
|
||||||
|
return ResourceBundle.getBundle(
|
||||||
|
"sun.security.util.AuthResources");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize this <code>LoginModule</code>.
|
* Initialize this <code>LoginModule</code>.
|
||||||
|
|
|
@ -1,176 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
*
|
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation. Oracle designates this
|
|
||||||
* particular file as subject to the "Classpath" exception as provided
|
|
||||||
* by Oracle in the LICENSE file that accompanied this code.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.sun.servicetag;
|
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
|
||||||
import java.lang.reflect.Method;
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.net.URI;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* BrowserSupport class.
|
|
||||||
*
|
|
||||||
* The implementation of the com.sun.servicetag API needs to be
|
|
||||||
* compiled with JDK 5 as well since the consumer of this API
|
|
||||||
* may require to support JDK 5 (e.g. NetBeans).
|
|
||||||
*
|
|
||||||
* The Desktop.browse() method can be backported in this class
|
|
||||||
* if needed. The current implementation only supports JDK 6.
|
|
||||||
*/
|
|
||||||
class BrowserSupport {
|
|
||||||
private static boolean isBrowseSupported = false;
|
|
||||||
private static Method browseMethod = null;
|
|
||||||
private static Object desktop = null;
|
|
||||||
private static volatile Boolean result = false;
|
|
||||||
|
|
||||||
|
|
||||||
private static void initX() {
|
|
||||||
if (desktop != null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
boolean supported = false;
|
|
||||||
Method browseM = null;
|
|
||||||
Object desktopObj = null;
|
|
||||||
try {
|
|
||||||
// Determine if java.awt.Desktop is supported
|
|
||||||
Class<?> desktopCls = Class.forName("java.awt.Desktop", true, null);
|
|
||||||
Method getDesktopM = desktopCls.getMethod("getDesktop");
|
|
||||||
browseM = desktopCls.getMethod("browse", URI.class);
|
|
||||||
|
|
||||||
Class<?> actionCls = Class.forName("java.awt.Desktop$Action", true, null);
|
|
||||||
final Method isDesktopSupportedMethod = desktopCls.getMethod("isDesktopSupported");
|
|
||||||
Method isSupportedMethod = desktopCls.getMethod("isSupported", actionCls);
|
|
||||||
Field browseField = actionCls.getField("BROWSE");
|
|
||||||
// isDesktopSupported calls getDefaultToolkit which can block
|
|
||||||
// infinitely, see 6636099 for details, to workaround we call
|
|
||||||
// in a thread and time it out, noting that the issue is specific
|
|
||||||
// to X11, it does not hurt for Windows.
|
|
||||||
Thread xthread = new Thread() {
|
|
||||||
public void run() {
|
|
||||||
try {
|
|
||||||
// support only if Desktop.isDesktopSupported() and
|
|
||||||
// Desktop.isSupported(Desktop.Action.BROWSE) return true.
|
|
||||||
result = (Boolean) isDesktopSupportedMethod.invoke(null);
|
|
||||||
} catch (IllegalAccessException e) {
|
|
||||||
// should never reach here
|
|
||||||
throw new InternalError("Desktop.getDesktop() method not found", e);
|
|
||||||
} catch (InvocationTargetException e) {
|
|
||||||
// browser not supported
|
|
||||||
if (Util.isVerbose()) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
// set it to daemon, so that the vm will exit.
|
|
||||||
xthread.setDaemon(true);
|
|
||||||
xthread.start();
|
|
||||||
try {
|
|
||||||
xthread.join(5 * 1000);
|
|
||||||
} catch (InterruptedException ie) {
|
|
||||||
// ignore the exception
|
|
||||||
}
|
|
||||||
if (result.booleanValue()) {
|
|
||||||
desktopObj = getDesktopM.invoke(null);
|
|
||||||
result = (Boolean) isSupportedMethod.invoke(desktopObj, browseField.get(null));
|
|
||||||
supported = result.booleanValue();
|
|
||||||
}
|
|
||||||
} catch (IllegalAccessException e) {
|
|
||||||
// should never reach here
|
|
||||||
throw new InternalError("Desktop.getDesktop() method not found", e);
|
|
||||||
} catch (ReflectiveOperationException e) {
|
|
||||||
// browser not supported
|
|
||||||
if (Util.isVerbose()) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
isBrowseSupported = supported;
|
|
||||||
browseMethod = browseM;
|
|
||||||
desktop = desktopObj;
|
|
||||||
}
|
|
||||||
|
|
||||||
static boolean isSupported() {
|
|
||||||
initX();
|
|
||||||
return isBrowseSupported;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Launches the default browser to display a {@code URI}.
|
|
||||||
* If the default browser is not able to handle the specified
|
|
||||||
* {@code URI}, the application registered for handling
|
|
||||||
* {@code URIs} of the specified type is invoked. The application
|
|
||||||
* is determined from the protocol and path of the {@code URI}, as
|
|
||||||
* defined by the {@code URI} class.
|
|
||||||
* <p>
|
|
||||||
* This method calls the Desktop.getDesktop().browse() method.
|
|
||||||
* <p>
|
|
||||||
* @param uri the URI to be displayed in the user default browser
|
|
||||||
*
|
|
||||||
* @throws NullPointerException if {@code uri} is {@code null}
|
|
||||||
* @throws UnsupportedOperationException if the current platform
|
|
||||||
* does not support the {@link Desktop.Action#BROWSE} action
|
|
||||||
* @throws IOException if the user default browser is not found,
|
|
||||||
* or it fails to be launched, or the default handler application
|
|
||||||
* failed to be launched
|
|
||||||
* @throws IllegalArgumentException if the necessary permissions
|
|
||||||
* are not available and the URI can not be converted to a {@code URL}
|
|
||||||
*/
|
|
||||||
static void browse(URI uri) throws IOException {
|
|
||||||
if (uri == null) {
|
|
||||||
throw new NullPointerException("null uri");
|
|
||||||
}
|
|
||||||
if (!isSupported()) {
|
|
||||||
throw new UnsupportedOperationException("Browse operation is not supported");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Call Desktop.browse() method
|
|
||||||
try {
|
|
||||||
if (Util.isVerbose()) {
|
|
||||||
System.out.println("desktop: " + desktop + ":browsing..." + uri);
|
|
||||||
}
|
|
||||||
browseMethod.invoke(desktop, uri);
|
|
||||||
} catch (IllegalAccessException e) {
|
|
||||||
// should never reach here
|
|
||||||
throw new InternalError("Desktop.getDesktop() method not found", e);
|
|
||||||
} catch (InvocationTargetException e) {
|
|
||||||
Throwable x = e.getCause();
|
|
||||||
if (x != null) {
|
|
||||||
if (x instanceof UnsupportedOperationException) {
|
|
||||||
throw (UnsupportedOperationException) x;
|
|
||||||
} else if (x instanceof IllegalArgumentException) {
|
|
||||||
throw (IllegalArgumentException) x;
|
|
||||||
} else if (x instanceof IOException) {
|
|
||||||
throw (IOException) x;
|
|
||||||
} else if (x instanceof SecurityException) {
|
|
||||||
throw (SecurityException) x;
|
|
||||||
} else {
|
|
||||||
// ignore
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,937 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
*
|
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation. Oracle designates this
|
|
||||||
* particular file as subject to the "Classpath" exception as provided
|
|
||||||
* by Oracle in the LICENSE file that accompanied this code.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.sun.servicetag;
|
|
||||||
|
|
||||||
import java.io.*;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Locale;
|
|
||||||
import java.util.Properties;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import static com.sun.servicetag.Util.*;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Service Tag Installer for Java SE.
|
|
||||||
*/
|
|
||||||
public class Installer {
|
|
||||||
// System properties for testing
|
|
||||||
private static String SVCTAG_DIR_PATH =
|
|
||||||
"servicetag.dir.path";
|
|
||||||
private static String SVCTAG_ENABLE_REGISTRATION =
|
|
||||||
"servicetag.registration.enabled";
|
|
||||||
private final static String ORACLE = "Oracle";
|
|
||||||
private final static String SUN = "Sun Microsystems";
|
|
||||||
private final static String REGISTRATION_XML = "registration.xml";
|
|
||||||
private final static String SERVICE_TAG_FILE = "servicetag";
|
|
||||||
private final static String REGISTRATION_HTML_NAME = "register";
|
|
||||||
|
|
||||||
private final static Locale[] knownSupportedLocales =
|
|
||||||
new Locale[] { Locale.ENGLISH,
|
|
||||||
Locale.JAPANESE,
|
|
||||||
Locale.SIMPLIFIED_CHINESE};
|
|
||||||
|
|
||||||
private final static String javaHome = System.getProperty("java.home");
|
|
||||||
private static File svcTagDir;
|
|
||||||
private static File serviceTagFile;
|
|
||||||
private static File regXmlFile;
|
|
||||||
private static RegistrationData registration;
|
|
||||||
private static boolean supportRegistration;
|
|
||||||
private static String registerHtmlParent;
|
|
||||||
private static Set<Locale> supportedLocales = new HashSet<>();
|
|
||||||
private static Properties svcTagProps = null;
|
|
||||||
private static String[] jreArchs = null;
|
|
||||||
static {
|
|
||||||
String dir = System.getProperty(SVCTAG_DIR_PATH);
|
|
||||||
if (dir == null) {
|
|
||||||
svcTagDir = new File(getJrePath(), "lib" + File.separator + SERVICE_TAG_FILE);
|
|
||||||
} else {
|
|
||||||
svcTagDir = new File(dir);
|
|
||||||
}
|
|
||||||
serviceTagFile = new File(svcTagDir, SERVICE_TAG_FILE);
|
|
||||||
regXmlFile = new File(svcTagDir, REGISTRATION_XML);
|
|
||||||
if (System.getProperty(SVCTAG_ENABLE_REGISTRATION) == null) {
|
|
||||||
supportRegistration = isJdk();
|
|
||||||
} else {
|
|
||||||
supportRegistration = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private Installer() {
|
|
||||||
}
|
|
||||||
|
|
||||||
// Implementation of ServiceTag.getJavaServiceTag(String) method
|
|
||||||
static ServiceTag getJavaServiceTag(String source) throws IOException {
|
|
||||||
String vendor = System.getProperty("java.vendor", "");
|
|
||||||
if (!vendor.startsWith(SUN) && !vendor.startsWith(ORACLE)) {
|
|
||||||
// Products bundling this implementation may run on
|
|
||||||
// Mac OS which is not a Sun/Oracle JDK
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
boolean cleanup = false;
|
|
||||||
try {
|
|
||||||
// Check if we have the swordfish entries for this JRE version
|
|
||||||
if (loadServiceTagProps() == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
ServiceTag st = getJavaServiceTag();
|
|
||||||
// Check if the service tag created by this bundle owner
|
|
||||||
if (st != null && st.getSource().equals(source)) {
|
|
||||||
// Install the system service tag if supported
|
|
||||||
// stclient may be installed after the service tag creation
|
|
||||||
if (Registry.isSupported()) {
|
|
||||||
installSystemServiceTag();
|
|
||||||
}
|
|
||||||
return st;
|
|
||||||
}
|
|
||||||
|
|
||||||
// in case any exception thrown during the cleanup
|
|
||||||
cleanup = true;
|
|
||||||
|
|
||||||
// re-create a new one for this bundle owner
|
|
||||||
// first delete the registration data
|
|
||||||
deleteRegistrationData();
|
|
||||||
cleanup = false;
|
|
||||||
|
|
||||||
// create service tag and generate new register.html pages
|
|
||||||
return createServiceTag(source);
|
|
||||||
} finally {
|
|
||||||
if (cleanup) {
|
|
||||||
if (regXmlFile.exists()) {
|
|
||||||
regXmlFile.delete();
|
|
||||||
}
|
|
||||||
if (serviceTagFile.exists()) {
|
|
||||||
serviceTagFile.delete();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the Java SE registration data located in
|
|
||||||
* the <JRE>/lib/servicetag/registration.xml by default.
|
|
||||||
*
|
|
||||||
* @throws IllegalArgumentException if the registration data
|
|
||||||
* is of invalid format.
|
|
||||||
*/
|
|
||||||
private static synchronized RegistrationData getRegistrationData()
|
|
||||||
throws IOException {
|
|
||||||
if (registration != null) {
|
|
||||||
return registration;
|
|
||||||
}
|
|
||||||
if (regXmlFile.exists()) {
|
|
||||||
try (BufferedInputStream in =
|
|
||||||
new BufferedInputStream(new FileInputStream(regXmlFile)))
|
|
||||||
{
|
|
||||||
registration = RegistrationData.loadFromXML(in);
|
|
||||||
} catch (IllegalArgumentException ex) {
|
|
||||||
System.err.println("Error: Bad registration data \"" +
|
|
||||||
regXmlFile + "\":" + ex.getMessage());
|
|
||||||
throw ex;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
registration = new RegistrationData();
|
|
||||||
}
|
|
||||||
return registration;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Write the registration data to the registration.xml file.
|
|
||||||
*
|
|
||||||
* The offline registration page has to be regenerated with
|
|
||||||
* the new registration data.
|
|
||||||
*
|
|
||||||
* @throws java.io.IOException
|
|
||||||
*/
|
|
||||||
private static synchronized void writeRegistrationXml()
|
|
||||||
throws IOException {
|
|
||||||
if (!svcTagDir.exists()) {
|
|
||||||
// This check is for NetBeans or other products that
|
|
||||||
// bundles this com.sun.servicetag implementation for
|
|
||||||
// pre-6u5 release.
|
|
||||||
if (!svcTagDir.mkdir()) {
|
|
||||||
throw new IOException("Failed to create directory: " + svcTagDir);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// regenerate the new offline registration page
|
|
||||||
deleteRegistrationHtmlPage();
|
|
||||||
getRegistrationHtmlPage();
|
|
||||||
|
|
||||||
try (BufferedOutputStream out =
|
|
||||||
new BufferedOutputStream(new FileOutputStream(regXmlFile)))
|
|
||||||
{
|
|
||||||
getRegistrationData().storeToXML(out);
|
|
||||||
} catch (IllegalArgumentException ex) {
|
|
||||||
System.err.println("Error: Bad registration data \"" +
|
|
||||||
regXmlFile + "\":" + ex.getMessage());
|
|
||||||
throw ex;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the instance urn(s) stored in the servicetag file
|
|
||||||
* or empty set if file not exists.
|
|
||||||
*/
|
|
||||||
private static Set<String> getInstalledURNs() throws IOException {
|
|
||||||
Set<String> urnSet = new HashSet<>();
|
|
||||||
if (serviceTagFile.exists()) {
|
|
||||||
try (BufferedReader in = new BufferedReader(new FileReader(serviceTagFile))) {
|
|
||||||
String urn;
|
|
||||||
while ((urn = in.readLine()) != null) {
|
|
||||||
urn = urn.trim();
|
|
||||||
if (urn.length() > 0) {
|
|
||||||
urnSet.add(urn);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return urnSet;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return the Java SE service tag(s) if it exists.
|
|
||||||
* Typically only one Java SE service tag but it could have two for
|
|
||||||
* Solaris 32-bit and 64-bit on the same install directory.
|
|
||||||
*
|
|
||||||
* @return the service tag(s) for Java SE
|
|
||||||
*/
|
|
||||||
private static ServiceTag[] getJavaServiceTagArray() throws IOException {
|
|
||||||
RegistrationData regData = getRegistrationData();
|
|
||||||
Set<ServiceTag> svcTags = regData.getServiceTags();
|
|
||||||
Set<ServiceTag> result = new HashSet<>();
|
|
||||||
|
|
||||||
Properties props = loadServiceTagProps();
|
|
||||||
String jdkUrn = props.getProperty("servicetag.jdk.urn");
|
|
||||||
String jreUrn = props.getProperty("servicetag.jre.urn");
|
|
||||||
for (ServiceTag st : svcTags) {
|
|
||||||
if (st.getProductURN().equals(jdkUrn) ||
|
|
||||||
st.getProductURN().equals(jreUrn)) {
|
|
||||||
result.add(st);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result.toArray(new ServiceTag[0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the Java SE service tag for this running platform;
|
|
||||||
* or null if not exist.
|
|
||||||
* This method will return the 64-bit service tag if the JDK
|
|
||||||
* supports both 32-bit and 64-bit if already created.
|
|
||||||
*/
|
|
||||||
private static ServiceTag getJavaServiceTag() throws IOException {
|
|
||||||
String definedId = getProductDefinedId();
|
|
||||||
for (ServiceTag st : getJavaServiceTagArray()) {
|
|
||||||
if (st.getProductDefinedInstanceID().equals(definedId)) {
|
|
||||||
return st;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a service tag for Java SE and install in the system
|
|
||||||
* service tag registry if supported.
|
|
||||||
*
|
|
||||||
* A registration data <JRE>/lib/servicetag/registration.xml
|
|
||||||
* will be created to storeToXML the XML entry for Java SE service tag.
|
|
||||||
* If the system supports service tags, this method will install
|
|
||||||
* the Java SE service tag in the system service tag registry and
|
|
||||||
* its <tt>instance_urn</tt> will be stored to <JRE>/lib/servicetag/servicetag.
|
|
||||||
*
|
|
||||||
* If <JRE>/lib/servicetag/registration.xml exists but is not installed
|
|
||||||
* in the system service tag registry (i.e. servicetag doesn't exist),
|
|
||||||
* this method will install it as described above.
|
|
||||||
*
|
|
||||||
* If the system supports service tag, stclient will be used
|
|
||||||
* to create the Java SE service tag.
|
|
||||||
*
|
|
||||||
* A Solaris 32-bit and 64-bit JDK will be installed in the same
|
|
||||||
* directory but the registration.xml will have 2 service tags.
|
|
||||||
* The servicetag file will also contain 2 instance_urns for that case.
|
|
||||||
*/
|
|
||||||
private static ServiceTag createServiceTag(String svcTagSource)
|
|
||||||
throws IOException {
|
|
||||||
// determine if a new service tag is needed to be created
|
|
||||||
ServiceTag newSvcTag = null;
|
|
||||||
if (getJavaServiceTag() == null) {
|
|
||||||
newSvcTag = newServiceTag(svcTagSource);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add the new service tag in the registration data
|
|
||||||
if (newSvcTag != null) {
|
|
||||||
RegistrationData regData = getRegistrationData();
|
|
||||||
|
|
||||||
// Add the service tag to the registration data in JDK/JRE
|
|
||||||
newSvcTag = regData.addServiceTag(newSvcTag);
|
|
||||||
|
|
||||||
// add if there is a service tag for the OS
|
|
||||||
ServiceTag osTag = SolarisServiceTag.getServiceTag();
|
|
||||||
if (osTag != null && regData.getServiceTag(osTag.getInstanceURN()) == null) {
|
|
||||||
regData.addServiceTag(osTag);
|
|
||||||
}
|
|
||||||
// write to the registration.xml
|
|
||||||
writeRegistrationXml();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Install the system service tag if supported
|
|
||||||
if (Registry.isSupported()) {
|
|
||||||
installSystemServiceTag();
|
|
||||||
}
|
|
||||||
return newSvcTag;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void installSystemServiceTag() throws IOException {
|
|
||||||
// only install the service tag in the registry if
|
|
||||||
// it has permission to write the servicetag file.
|
|
||||||
if ((!serviceTagFile.exists() && !svcTagDir.canWrite()) ||
|
|
||||||
(serviceTagFile.exists() && !serviceTagFile.canWrite())) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Set<String> urns = getInstalledURNs();
|
|
||||||
ServiceTag[] javaSvcTags = getJavaServiceTagArray();
|
|
||||||
if (urns.size() < javaSvcTags.length) {
|
|
||||||
for (ServiceTag st : javaSvcTags) {
|
|
||||||
// Add the service tag in the system service tag registry
|
|
||||||
// if not installed
|
|
||||||
String instanceURN = st.getInstanceURN();
|
|
||||||
if (!urns.contains(instanceURN)) {
|
|
||||||
Registry.getSystemRegistry().addServiceTag(st);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
writeInstalledUrns();
|
|
||||||
}
|
|
||||||
|
|
||||||
private static ServiceTag newServiceTag(String svcTagSource) throws IOException {
|
|
||||||
Properties props = loadServiceTagProps();
|
|
||||||
|
|
||||||
// Determine the product URN and name
|
|
||||||
String productURN;
|
|
||||||
String productName;
|
|
||||||
|
|
||||||
if (isJdk()) {
|
|
||||||
// <HOME>/jre exists which implies it's a JDK
|
|
||||||
productURN = props.getProperty("servicetag.jdk.urn");
|
|
||||||
productName = props.getProperty("servicetag.jdk.name");
|
|
||||||
} else {
|
|
||||||
// Otherwise, it's a JRE
|
|
||||||
productURN = props.getProperty("servicetag.jre.urn");
|
|
||||||
productName = props.getProperty("servicetag.jre.name");
|
|
||||||
}
|
|
||||||
|
|
||||||
return ServiceTag.newInstance(ServiceTag.generateInstanceURN(),
|
|
||||||
productName,
|
|
||||||
System.getProperty("java.version"),
|
|
||||||
productURN,
|
|
||||||
props.getProperty("servicetag.parent.name"),
|
|
||||||
props.getProperty("servicetag.parent.urn"),
|
|
||||||
getProductDefinedId(),
|
|
||||||
System.getProperty("java.vendor"),
|
|
||||||
System.getProperty("os.arch"),
|
|
||||||
getZoneName(),
|
|
||||||
svcTagSource);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Delete the registration data, the offline registration pages and
|
|
||||||
* the service tags in the system service tag registry if installed.
|
|
||||||
*
|
|
||||||
* The registration.xml and servicetag file will be removed.
|
|
||||||
*/
|
|
||||||
private static synchronized void deleteRegistrationData()
|
|
||||||
throws IOException {
|
|
||||||
try {
|
|
||||||
// delete the offline registration page
|
|
||||||
deleteRegistrationHtmlPage();
|
|
||||||
|
|
||||||
// Remove the service tag from the system ST registry if exists
|
|
||||||
Set<String> urns = getInstalledURNs();
|
|
||||||
if (urns.size() > 0 && Registry.isSupported()) {
|
|
||||||
for (String u : urns) {
|
|
||||||
Registry.getSystemRegistry().removeServiceTag(u);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
registration = null;
|
|
||||||
} finally {
|
|
||||||
// Delete the registration.xml and servicetag files if exists
|
|
||||||
if (regXmlFile.exists()) {
|
|
||||||
if (!regXmlFile.delete()) {
|
|
||||||
throw new IOException("Failed to delete " + regXmlFile);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (serviceTagFile.exists()) {
|
|
||||||
if (!serviceTagFile.delete()) {
|
|
||||||
throw new IOException("Failed to delete " + serviceTagFile);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Updates the registration data to contain one single service tag
|
|
||||||
* for the running Java runtime.
|
|
||||||
*/
|
|
||||||
private static synchronized void updateRegistrationData(String svcTagSource)
|
|
||||||
throws IOException {
|
|
||||||
RegistrationData regData = getRegistrationData();
|
|
||||||
ServiceTag curSvcTag = newServiceTag(svcTagSource);
|
|
||||||
|
|
||||||
ServiceTag[] javaSvcTags = getJavaServiceTagArray();
|
|
||||||
Set<String> urns = getInstalledURNs();
|
|
||||||
for (ServiceTag st : javaSvcTags) {
|
|
||||||
if (!st.getProductDefinedInstanceID().equals(curSvcTag.getProductDefinedInstanceID())) {
|
|
||||||
String instanceURN = st.getInstanceURN();
|
|
||||||
regData.removeServiceTag(instanceURN);
|
|
||||||
|
|
||||||
// remove it from the system service tag registry if exists
|
|
||||||
if (urns.contains(instanceURN) && Registry.isSupported()) {
|
|
||||||
Registry.getSystemRegistry().removeServiceTag(instanceURN);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
writeRegistrationXml();
|
|
||||||
writeInstalledUrns();
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void writeInstalledUrns() throws IOException {
|
|
||||||
// if the Registry is not supported,
|
|
||||||
// remove the servicetag file
|
|
||||||
if (!Registry.isSupported() && serviceTagFile.exists()) {
|
|
||||||
serviceTagFile.delete();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
try (PrintWriter out = new PrintWriter(serviceTagFile)) {
|
|
||||||
ServiceTag[] javaSvcTags = getJavaServiceTagArray();
|
|
||||||
for (ServiceTag st : javaSvcTags) {
|
|
||||||
// Write the instance_run to the servicetag file
|
|
||||||
String instanceURN = st.getInstanceURN();
|
|
||||||
out.println(instanceURN);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Load the properties for generating Java SE service tags.
|
|
||||||
*
|
|
||||||
* @param version Version of Java SE
|
|
||||||
*/
|
|
||||||
private static synchronized Properties loadServiceTagProps() throws IOException {
|
|
||||||
if (svcTagProps != null) {
|
|
||||||
return svcTagProps;
|
|
||||||
}
|
|
||||||
|
|
||||||
// For Java SE 8 and later releases, JDK and JRE both use
|
|
||||||
// the same product number. The sworRDFish metadata were
|
|
||||||
// for legacy Sun part number.
|
|
||||||
String filename = "/com/sun/servicetag/resources/javase_servicetag.properties";
|
|
||||||
try (InputStream in = Installer.class.getResourceAsStream(filename)) {
|
|
||||||
svcTagProps = new Properties();
|
|
||||||
svcTagProps.load(in);
|
|
||||||
}
|
|
||||||
return svcTagProps;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the product defined instance ID for Java SE.
|
|
||||||
* It is a list of comma-separated name/value pairs:
|
|
||||||
* "id=<full-version> <arch> [<arch>]*"
|
|
||||||
* "dir=<java.home system property value>"
|
|
||||||
*
|
|
||||||
* where <full-version> is the full version string of the JRE,
|
|
||||||
* <arch> is the architecture that the runtime supports
|
|
||||||
* (i.e. "sparc", "sparcv9", "i386", "amd64" (ISA list))
|
|
||||||
*
|
|
||||||
* For Solaris, it can be dual mode that can support both
|
|
||||||
* 32-bit and 64-bit. the "id" will be set to
|
|
||||||
* "1.6.0_03-b02 sparc sparcv9"
|
|
||||||
*
|
|
||||||
* The "dir" property is included in the service tag to enable
|
|
||||||
* the Service Tag software to determine if a service tag for
|
|
||||||
* Java SE is invalid and perform appropriate service tag
|
|
||||||
* cleanup if necessary. See RFE# 6574781 Service Tags Enhancement.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
private static String getProductDefinedId() {
|
|
||||||
StringBuilder definedId = new StringBuilder();
|
|
||||||
definedId.append("id=");
|
|
||||||
definedId.append(System.getProperty("java.runtime.version"));
|
|
||||||
|
|
||||||
String[] archs = getJreArchs();
|
|
||||||
for (String name : archs) {
|
|
||||||
definedId.append(" " + name);
|
|
||||||
}
|
|
||||||
|
|
||||||
String location = ",dir=" + javaHome;
|
|
||||||
if ((definedId.length() + location.length()) < 256) {
|
|
||||||
definedId.append(",dir=");
|
|
||||||
definedId.append(javaHome);
|
|
||||||
} else {
|
|
||||||
// if it exceeds the limit, we will not include the location
|
|
||||||
if (isVerbose()) {
|
|
||||||
System.err.println("Warning: Product defined instance ID exceeds the field limit:");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return definedId.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the architectures that the runtime supports
|
|
||||||
* (i.e. "sparc", "sparcv9", "i386", "amd64" (ISA list))
|
|
||||||
* The directory name where libjava.so is located.
|
|
||||||
*
|
|
||||||
* On Windows, returns the "os.arch" system property value.
|
|
||||||
*/
|
|
||||||
private synchronized static String[] getJreArchs() {
|
|
||||||
if (jreArchs != null) {
|
|
||||||
return jreArchs;
|
|
||||||
}
|
|
||||||
|
|
||||||
Set<String> archs = new HashSet<>();
|
|
||||||
|
|
||||||
String os = System.getProperty("os.name");
|
|
||||||
if (os.equals("SunOS") || os.equals("Linux")) {
|
|
||||||
// Traverse the directories under <JRE>/lib.
|
|
||||||
// If <JRE>/lib/<arch>/libjava.so exists, add <arch>
|
|
||||||
// to the product defined ID
|
|
||||||
File dir = new File(getJrePath() + File.separator + "lib");
|
|
||||||
if (dir.isDirectory()) {
|
|
||||||
String[] children = dir.list();
|
|
||||||
for (String name : children) {
|
|
||||||
File f = new File(dir, name + File.separator + "libjava.so");
|
|
||||||
if (f.exists()) {
|
|
||||||
archs.add(name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// Windows - append the os.arch
|
|
||||||
archs.add(System.getProperty("os.arch"));
|
|
||||||
}
|
|
||||||
jreArchs = archs.toArray(new String[0]);
|
|
||||||
return jreArchs;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return the zonename if zone is supported; otherwise, return
|
|
||||||
* "global".
|
|
||||||
*/
|
|
||||||
private static String getZoneName() throws IOException {
|
|
||||||
String zonename = "global";
|
|
||||||
|
|
||||||
String command = "/usr/bin/zonename";
|
|
||||||
File f = new File(command);
|
|
||||||
// com.sun.servicetag package has to be compiled with JDK 5 as well
|
|
||||||
// JDK 5 doesn't support the File.canExecute() method.
|
|
||||||
// Risk not checking isExecute() for the zonename command is very low.
|
|
||||||
if (f.exists()) {
|
|
||||||
ProcessBuilder pb = new ProcessBuilder(command);
|
|
||||||
Process p = pb.start();
|
|
||||||
String output = commandOutput(p);
|
|
||||||
if (p.exitValue() == 0) {
|
|
||||||
zonename = output.trim();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
return zonename;
|
|
||||||
}
|
|
||||||
|
|
||||||
private synchronized static String getRegisterHtmlParent() throws IOException {
|
|
||||||
if (registerHtmlParent == null) {
|
|
||||||
File htmlDir; // register.html is put under the JDK directory
|
|
||||||
if (getJrePath().endsWith(File.separator + "jre")) {
|
|
||||||
htmlDir = new File(getJrePath(), "..");
|
|
||||||
} else {
|
|
||||||
// j2se non-image build
|
|
||||||
htmlDir = new File(getJrePath());
|
|
||||||
}
|
|
||||||
|
|
||||||
// initialize the supported locales
|
|
||||||
initSupportedLocales(htmlDir);
|
|
||||||
|
|
||||||
// Determine the location of the offline registration page
|
|
||||||
String path = System.getProperty(SVCTAG_DIR_PATH);
|
|
||||||
if (path == null) {
|
|
||||||
// Default is <JDK>/register.html
|
|
||||||
registerHtmlParent = htmlDir.getCanonicalPath();
|
|
||||||
} else {
|
|
||||||
File f = new File(path);
|
|
||||||
registerHtmlParent = f.getCanonicalPath();
|
|
||||||
if (!f.isDirectory()) {
|
|
||||||
throw new InternalError("Path " + path + " set in \"" +
|
|
||||||
SVCTAG_DIR_PATH + "\" property is not a directory");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return registerHtmlParent;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the File object of the offline registration page localized
|
|
||||||
* for the default locale in the JDK directory.
|
|
||||||
*/
|
|
||||||
static synchronized File getRegistrationHtmlPage() throws IOException {
|
|
||||||
if (!supportRegistration) {
|
|
||||||
// No register.html page generated if JRE
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
String parent = getRegisterHtmlParent();
|
|
||||||
|
|
||||||
// check if the offline registration page is already generated
|
|
||||||
File f = new File(parent, REGISTRATION_HTML_NAME + ".html");
|
|
||||||
if (!f.exists()) {
|
|
||||||
// Generate the localized version of the offline registration Page
|
|
||||||
generateRegisterHtml(parent);
|
|
||||||
}
|
|
||||||
|
|
||||||
String name = REGISTRATION_HTML_NAME;
|
|
||||||
Locale locale = getDefaultLocale();
|
|
||||||
if (!locale.equals(Locale.ENGLISH) && supportedLocales.contains(locale)) {
|
|
||||||
// if the locale is not English and is supported by JDK
|
|
||||||
// set to the appropriate offline registration page;
|
|
||||||
// otherwise,set to register.html.
|
|
||||||
name = REGISTRATION_HTML_NAME + "_" + locale.toString();
|
|
||||||
}
|
|
||||||
File htmlFile = new File(parent, name + ".html");
|
|
||||||
if (isVerbose()) {
|
|
||||||
System.out.print("Offline registration page: " + htmlFile);
|
|
||||||
System.out.println((htmlFile.exists() ?
|
|
||||||
"" : " not exist. Use register.html"));
|
|
||||||
}
|
|
||||||
if (htmlFile.exists()) {
|
|
||||||
return htmlFile;
|
|
||||||
} else {
|
|
||||||
return new File(parent,
|
|
||||||
REGISTRATION_HTML_NAME + ".html");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static Locale getDefaultLocale() {
|
|
||||||
List<Locale> candidateLocales = getCandidateLocales(Locale.getDefault());
|
|
||||||
for (Locale l : candidateLocales) {
|
|
||||||
if (supportedLocales.contains(l)) {
|
|
||||||
return l;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return Locale.getDefault();
|
|
||||||
}
|
|
||||||
|
|
||||||
private static List<Locale> getCandidateLocales(Locale locale) {
|
|
||||||
String language = locale.getLanguage();
|
|
||||||
String country = locale.getCountry();
|
|
||||||
String variant = locale.getVariant();
|
|
||||||
|
|
||||||
List<Locale> locales = new ArrayList<>(3);
|
|
||||||
if (variant.length() > 0) {
|
|
||||||
locales.add(locale);
|
|
||||||
}
|
|
||||||
if (country.length() > 0) {
|
|
||||||
locales.add((locales.isEmpty()) ?
|
|
||||||
locale : new Locale(language, country, ""));
|
|
||||||
}
|
|
||||||
if (language.length() > 0) {
|
|
||||||
locales.add((locales.isEmpty()) ?
|
|
||||||
locale : new Locale(language, "", ""));
|
|
||||||
}
|
|
||||||
return locales;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Remove the offline registration pages
|
|
||||||
private static void deleteRegistrationHtmlPage() throws IOException {
|
|
||||||
String parent = getRegisterHtmlParent();
|
|
||||||
if (parent == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (Locale locale : supportedLocales) {
|
|
||||||
String name = REGISTRATION_HTML_NAME;
|
|
||||||
if (!locale.equals(Locale.ENGLISH)) {
|
|
||||||
name += "_" + locale.toString();
|
|
||||||
}
|
|
||||||
File f = new File(parent, name + ".html");
|
|
||||||
if (f.exists()) {
|
|
||||||
if (!f.delete()) {
|
|
||||||
throw new IOException("Failed to delete " + f);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void initSupportedLocales(File jdkDir) {
|
|
||||||
if (supportedLocales.isEmpty()) {
|
|
||||||
// initialize with the known supported locales
|
|
||||||
for (Locale l : knownSupportedLocales) {
|
|
||||||
supportedLocales.add(l);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Determine unknown supported locales if any
|
|
||||||
// by finding the localized version of README.html
|
|
||||||
// This prepares if a new locale in JDK is supported in
|
|
||||||
// e.g. in the OpenSource world
|
|
||||||
FilenameFilter ff = new FilenameFilter() {
|
|
||||||
public boolean accept(File dir, String name) {
|
|
||||||
String fname = name.toLowerCase();
|
|
||||||
if (fname.startsWith("readme") && fname.endsWith(".html")) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
String[] readmes = jdkDir.list(ff);
|
|
||||||
for (String name : readmes) {
|
|
||||||
String basename = name.substring(0, name.length() - ".html".length());
|
|
||||||
String[] ss = basename.split("_");
|
|
||||||
switch (ss.length) {
|
|
||||||
case 1:
|
|
||||||
// English version
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
supportedLocales.add(new Locale(ss[1]));
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
supportedLocales.add(new Locale(ss[1], ss[2]));
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
// ignore
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (isVerbose()) {
|
|
||||||
System.out.println("Supported locales: ");
|
|
||||||
for (Locale l : supportedLocales) {
|
|
||||||
System.out.println(l);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static final String JDK_HEADER_PNG_KEY = "@@JDK_HEADER_PNG@@";
|
|
||||||
private static final String JDK_VERSION_KEY = "@@JDK_VERSION@@";
|
|
||||||
private static final String REGISTRATION_URL_KEY = "@@REGISTRATION_URL@@";
|
|
||||||
private static final String REGISTRATION_PAYLOAD_KEY = "@@REGISTRATION_PAYLOAD@@";
|
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
private static void generateRegisterHtml(String parent) throws IOException {
|
|
||||||
int version = Util.getJdkVersion();
|
|
||||||
int update = Util.getUpdateVersion();
|
|
||||||
String jdkVersion = "Version " + version;
|
|
||||||
if (update > 0) {
|
|
||||||
// product name is not translated
|
|
||||||
jdkVersion += " Update " + update;
|
|
||||||
}
|
|
||||||
RegistrationData regData = getRegistrationData();
|
|
||||||
// Make sure it uses the canonical path before getting the URI.
|
|
||||||
File img = new File(svcTagDir.getCanonicalPath(), "jdk_header.png");
|
|
||||||
String headerImageSrc = img.toURI().toString();
|
|
||||||
|
|
||||||
// Format the registration data in one single line
|
|
||||||
StringBuilder payload = new StringBuilder();
|
|
||||||
String xml = regData.toString().replaceAll("\"", "%22");
|
|
||||||
try (BufferedReader reader = new BufferedReader(new StringReader(xml))) {
|
|
||||||
String line = null;
|
|
||||||
while ((line = reader.readLine()) != null) {
|
|
||||||
payload.append(line.trim());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
String resourceFilename = "/com/sun/servicetag/resources/register";
|
|
||||||
for (Locale locale : supportedLocales) {
|
|
||||||
String name = REGISTRATION_HTML_NAME;
|
|
||||||
String resource = resourceFilename;
|
|
||||||
if (!locale.equals(Locale.ENGLISH)) {
|
|
||||||
name += "_" + locale.toString();
|
|
||||||
resource += "_" + locale.toString();
|
|
||||||
}
|
|
||||||
File f = new File(parent, name + ".html");
|
|
||||||
InputStream in = null;
|
|
||||||
BufferedReader br = null;
|
|
||||||
PrintWriter pw = null;
|
|
||||||
String registerURL = SunConnection.
|
|
||||||
getRegistrationURL(regData.getRegistrationURN(),
|
|
||||||
locale,
|
|
||||||
String.valueOf(version)).toString();
|
|
||||||
try {
|
|
||||||
in = Installer.class.getResourceAsStream(resource + ".html");
|
|
||||||
if (in == null) {
|
|
||||||
// if the resource file is missing
|
|
||||||
if (isVerbose()) {
|
|
||||||
System.out.println("Missing resouce file: " + resource + ".html");
|
|
||||||
}
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (isVerbose()) {
|
|
||||||
System.out.println("Generating " + f + " from " + resource + ".html");
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
br = new BufferedReader(new InputStreamReader(in, "UTF-8"));
|
|
||||||
pw = new PrintWriter(f, "UTF-8");
|
|
||||||
String line = null;
|
|
||||||
while ((line = br.readLine()) != null) {
|
|
||||||
String output = line;
|
|
||||||
if (line.contains(JDK_VERSION_KEY)) {
|
|
||||||
output = line.replace(JDK_VERSION_KEY, jdkVersion);
|
|
||||||
} else if (line.contains(JDK_HEADER_PNG_KEY)) {
|
|
||||||
output = line.replace(JDK_HEADER_PNG_KEY, headerImageSrc);
|
|
||||||
} else if (line.contains(REGISTRATION_URL_KEY)) {
|
|
||||||
output = line.replace(REGISTRATION_URL_KEY, registerURL);
|
|
||||||
} else if (line.contains(REGISTRATION_PAYLOAD_KEY)) {
|
|
||||||
output = line.replace(REGISTRATION_PAYLOAD_KEY, payload.toString());
|
|
||||||
}
|
|
||||||
pw.println(output);
|
|
||||||
}
|
|
||||||
f.setReadOnly();
|
|
||||||
pw.flush();
|
|
||||||
} finally {
|
|
||||||
// It's safe for this finally block to have two close statements
|
|
||||||
// consecutively as PrintWriter.close doesn't throw IOException.
|
|
||||||
if (pw != null) {
|
|
||||||
pw.close();
|
|
||||||
}
|
|
||||||
if (br!= null) {
|
|
||||||
br.close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} finally {
|
|
||||||
if (in != null) {
|
|
||||||
in.close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static final int MAX_SOURCE_LEN = 63;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A utility class to create a service tag for Java SE.
|
|
||||||
* <p>
|
|
||||||
* <b>Usage:</b><br>
|
|
||||||
* <blockquote><tt>
|
|
||||||
* <JAVA_HOME>/bin/java com.sun.servicetag.Installer
|
|
||||||
* </tt></blockquote>
|
|
||||||
* <p>
|
|
||||||
*/
|
|
||||||
public static void main(String[] args) {
|
|
||||||
String source = "Manual ";
|
|
||||||
String runtimeName = System.getProperty("java.runtime.name");
|
|
||||||
if (runtimeName.startsWith("OpenJDK")) {
|
|
||||||
source = "OpenJDK ";
|
|
||||||
}
|
|
||||||
source += System.getProperty("java.runtime.version");
|
|
||||||
if (source.length() > MAX_SOURCE_LEN) {
|
|
||||||
source = source.substring(0, MAX_SOURCE_LEN);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Parse the options (arguments starting with "-" )
|
|
||||||
boolean delete = false;
|
|
||||||
boolean update = false;
|
|
||||||
boolean register = false;
|
|
||||||
int count = 0;
|
|
||||||
while (count < args.length) {
|
|
||||||
String arg = args[count];
|
|
||||||
if (arg.trim().length() == 0) {
|
|
||||||
// skip empty arguments
|
|
||||||
count++;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (arg.equals("-source")) {
|
|
||||||
source = args[++count];
|
|
||||||
} else if (arg.equals("-delete")) {
|
|
||||||
delete = true;
|
|
||||||
} else if (arg.equals("-register")) {
|
|
||||||
register = true;
|
|
||||||
} else {
|
|
||||||
usage();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
count++;
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
if (delete) {
|
|
||||||
deleteRegistrationData();
|
|
||||||
} else {
|
|
||||||
ServiceTag[] javaSvcTags = getJavaServiceTagArray();
|
|
||||||
String[] archs = getJreArchs();
|
|
||||||
if (javaSvcTags.length > archs.length) {
|
|
||||||
// 64-bit has been uninstalled
|
|
||||||
// so remove the service tag
|
|
||||||
updateRegistrationData(source);
|
|
||||||
} else {
|
|
||||||
// create the service tag
|
|
||||||
createServiceTag(source);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (register) {
|
|
||||||
// Registration is only supported by JDK
|
|
||||||
// For testing purpose, override with a "servicetag.enable.registration" property
|
|
||||||
|
|
||||||
RegistrationData regData = getRegistrationData();
|
|
||||||
if (supportRegistration && !regData.getServiceTags().isEmpty()) {
|
|
||||||
SunConnection.register(regData,
|
|
||||||
getDefaultLocale(),
|
|
||||||
String.valueOf(Util.getJdkVersion()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
System.exit(0);
|
|
||||||
} catch (IOException e) {
|
|
||||||
System.err.println("I/O Error: " + e.getMessage());
|
|
||||||
if (isVerbose()) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
} catch (IllegalArgumentException ex) {
|
|
||||||
if (isVerbose()) {
|
|
||||||
ex.printStackTrace();
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
System.err.println("Error: " + e.getMessage());
|
|
||||||
if (isVerbose()) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
System.exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void usage() {
|
|
||||||
System.out.println("Usage:");
|
|
||||||
System.out.print(" " + Installer.class.getName());
|
|
||||||
System.out.println(" [-delete|-source <source>|-register]");
|
|
||||||
System.out.println(" to create a service tag for the Java platform");
|
|
||||||
System.out.println("");
|
|
||||||
System.out.println("Internal Options:");
|
|
||||||
System.out.println(" -source: to specify the source of the service tag to be created");
|
|
||||||
System.out.println(" -delete: to delete the service tag ");
|
|
||||||
System.out.println(" -register: to register the JDK");
|
|
||||||
System.out.println(" -help: to print this help message");
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,193 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
*
|
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation. Oracle designates this
|
|
||||||
* particular file as subject to the "Classpath" exception as provided
|
|
||||||
* by Oracle in the LICENSE file that accompanied this code.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.sun.servicetag;
|
|
||||||
|
|
||||||
// This class is a copy of the com.sun.scn.servicetags.LinuxSystemEnvironment
|
|
||||||
// class from the Sun Connection source.
|
|
||||||
//
|
|
||||||
// The Service Tags team maintains the latest version of the implementation
|
|
||||||
// for system environment data collection. JDK will include a copy of
|
|
||||||
// the most recent released version for a JDK release. We rename
|
|
||||||
// the package to com.sun.servicetag so that the Sun Connection
|
|
||||||
// product always uses the latest version from the com.sun.scn.servicetags
|
|
||||||
// package. JDK and users of the com.sun.servicetag API
|
|
||||||
// (e.g. NetBeans and SunStudio) will use the version in JDK.
|
|
||||||
//
|
|
||||||
// So we keep this class in src/share/classes instead of src/<os>/classes.
|
|
||||||
|
|
||||||
import java.io.*;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Linux implementation of the SystemEnvironment class.
|
|
||||||
*/
|
|
||||||
class LinuxSystemEnvironment extends SystemEnvironment {
|
|
||||||
LinuxSystemEnvironment() {
|
|
||||||
setHostId(getLinuxHostId());
|
|
||||||
setSystemModel(getCommandOutput("/bin/uname", "-i"));
|
|
||||||
setSystemManufacturer(getLinuxSystemManufacturer());
|
|
||||||
setCpuManufacturer(getLinuxCpuManufacturer());
|
|
||||||
setSerialNumber(getLinuxSN());
|
|
||||||
}
|
|
||||||
private String dmiInfo = null;
|
|
||||||
|
|
||||||
private static final int SN = 1;
|
|
||||||
private static final int SYS = 2;
|
|
||||||
private static final int CPU = 3;
|
|
||||||
|
|
||||||
private String getLinuxHostId() {
|
|
||||||
String output = getCommandOutput("/usr/bin/hostid");
|
|
||||||
// trim off the leading 0x
|
|
||||||
if (output.startsWith("0x")) {
|
|
||||||
output = output.substring(2);
|
|
||||||
}
|
|
||||||
return output;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Tries to obtain and return the cpu manufacturer.
|
|
||||||
* @return The cpu manufacturer (an empty string if not found or an error occurred)
|
|
||||||
*/
|
|
||||||
private String getLinuxCpuManufacturer() {
|
|
||||||
String tmp = getLinuxPSNInfo(CPU);
|
|
||||||
if (tmp.length() > 0) {
|
|
||||||
return tmp;
|
|
||||||
}
|
|
||||||
|
|
||||||
String contents = getFileContent("/proc/cpuinfo");
|
|
||||||
for (String line : contents.split("\n")) {
|
|
||||||
if (line.contains("vendor_id")) {
|
|
||||||
String[] ss = line.split(":", 2);
|
|
||||||
if (ss.length > 1) {
|
|
||||||
return ss[1].trim();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// returns an empty string if it can't be found or an error happened
|
|
||||||
return getLinuxDMIInfo("dmi type 4", "manufacturer");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Tries to obtain and return the system manufacturer.
|
|
||||||
* @return The system manufacturer (an empty string if not found or an error occurred)
|
|
||||||
*/
|
|
||||||
private String getLinuxSystemManufacturer() {
|
|
||||||
String tmp = getLinuxPSNInfo(SYS);
|
|
||||||
if (tmp.length() > 0) {
|
|
||||||
return tmp;
|
|
||||||
}
|
|
||||||
|
|
||||||
// returns an empty string if it can't be found or an error happened
|
|
||||||
return getLinuxDMIInfo("dmi type 1", "manufacturer");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Tries to obtain and return the serial number of the system.
|
|
||||||
* @return The serial number (an empty string if not found or an error occurred)
|
|
||||||
*/
|
|
||||||
private String getLinuxSN() {
|
|
||||||
String tmp = getLinuxPSNInfo(SN);
|
|
||||||
if (tmp.length() > 0) {
|
|
||||||
return tmp;
|
|
||||||
}
|
|
||||||
|
|
||||||
// returns an empty string if it can't be found or an error happened
|
|
||||||
return getLinuxDMIInfo("dmi type 1", "serial number");
|
|
||||||
}
|
|
||||||
|
|
||||||
private String getLinuxPSNInfo(int target) {
|
|
||||||
// try to read from the psn file if it exists
|
|
||||||
String contents = getFileContent("/var/run/psn");
|
|
||||||
String[] ss = contents.split("\n");
|
|
||||||
if (target <= ss.length) {
|
|
||||||
return ss[target-1];
|
|
||||||
}
|
|
||||||
|
|
||||||
// default case is to return ""
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
// reads from dmidecode with the given type and target
|
|
||||||
// returns an empty string if nothing was found or an error occurred
|
|
||||||
//
|
|
||||||
// Sample output segment:
|
|
||||||
// Handle 0x0001
|
|
||||||
// DMI type 1, 25 bytes.
|
|
||||||
// System Information
|
|
||||||
// Manufacturer: System manufacturer
|
|
||||||
// Product Name: System Product Name
|
|
||||||
// Version: System Version
|
|
||||||
// Serial Number: System Serial Number
|
|
||||||
// UUID: 3091D719-B25B-D911-959D-6D1B12C7686E
|
|
||||||
// Wake-up Type: Power Switch
|
|
||||||
|
|
||||||
private synchronized String getLinuxDMIInfo(String dmiType, String target) {
|
|
||||||
// only try to get dmidecode information once, after that, we can
|
|
||||||
// reuse the output
|
|
||||||
if (dmiInfo == null) {
|
|
||||||
Thread dmidecodeThread = new Thread() {
|
|
||||||
public void run() {
|
|
||||||
dmiInfo = getCommandOutput("/usr/sbin/dmidecode");
|
|
||||||
}
|
|
||||||
};
|
|
||||||
dmidecodeThread.start();
|
|
||||||
|
|
||||||
try {
|
|
||||||
dmidecodeThread.join(2000);
|
|
||||||
if (dmidecodeThread.isAlive()) {
|
|
||||||
dmidecodeThread.interrupt();
|
|
||||||
dmiInfo = "";
|
|
||||||
}
|
|
||||||
} catch (InterruptedException ie) {
|
|
||||||
dmidecodeThread.interrupt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dmiInfo.length() == 0) {
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
boolean dmiFlag = false;
|
|
||||||
for (String s : dmiInfo.split("\n")) {
|
|
||||||
String line = s.toLowerCase();
|
|
||||||
if (dmiFlag) {
|
|
||||||
if (line.contains(target)) {
|
|
||||||
String key = target + ":";
|
|
||||||
int indx = line.indexOf(key) + key.length();
|
|
||||||
if (line.contains(key) && indx < line.length()) {
|
|
||||||
return line.substring(indx).trim();
|
|
||||||
}
|
|
||||||
String[] ss = line.split(":");
|
|
||||||
return ss[ss.length-1];
|
|
||||||
}
|
|
||||||
} else if (line.contains(dmiType)) {
|
|
||||||
dmiFlag = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,475 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
*
|
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation. Oracle designates this
|
|
||||||
* particular file as subject to the "Classpath" exception as provided
|
|
||||||
* by Oracle in the LICENSE file that accompanied this code.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.sun.servicetag;
|
|
||||||
|
|
||||||
import java.io.*;
|
|
||||||
import java.net.UnknownHostException;
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.LinkedHashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import static com.sun.servicetag.RegistrationDocument.*;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A {@code RegistrationData} object is a container of one or more
|
|
||||||
* {@link #getServiceTags service tags} that identify the
|
|
||||||
* components for product registration.
|
|
||||||
* Each {@code RegistrationData} object has a {@link #getRegistrationURN
|
|
||||||
* uniform resource name} (URN) as its identifier.
|
|
||||||
* <a name="EnvMap"></a>
|
|
||||||
* It also has an <i>environment map</i> with
|
|
||||||
* the following elements:
|
|
||||||
* <blockquote>
|
|
||||||
* <table border=0>
|
|
||||||
* <tr>
|
|
||||||
* <td><tt>hostname</tt></td>
|
|
||||||
* <td>Hostname of the system</td>
|
|
||||||
* <td>e.g. woody</td>
|
|
||||||
* </tr>
|
|
||||||
* <tr>
|
|
||||||
* <td><tt>hostId</tt></td>
|
|
||||||
* <td>Host ID of the system</td>
|
|
||||||
* <td>e.g. 83abc1ab</td>
|
|
||||||
* </tr>
|
|
||||||
* <tr>
|
|
||||||
* <td><tt>osName</tt></td>
|
|
||||||
* <td>Operating system name</td>
|
|
||||||
* <td> e.g. SunOS</td>
|
|
||||||
* </tr>
|
|
||||||
* <tr>
|
|
||||||
* <td><tt>osVersion</tt></td>
|
|
||||||
* <td>Operating system version</td>
|
|
||||||
* <td> e.g. 5.10</td>
|
|
||||||
* </tr>
|
|
||||||
* <tr>
|
|
||||||
* <td><tt>osArchitecture</tt></td>
|
|
||||||
* <td>Operating system architecture</td>
|
|
||||||
* <td> e.g. sparc</td>
|
|
||||||
* </tr>
|
|
||||||
* <tr>
|
|
||||||
* <td><tt>systemModel</tt></td>
|
|
||||||
* <td>System model</td>
|
|
||||||
* <td> e.g. SUNW,Sun-Fire-V440</td>
|
|
||||||
* </tr>
|
|
||||||
* <tr>
|
|
||||||
* <td><tt>systemManufacturer</tt></td>
|
|
||||||
* <td>System manufacturer</td>
|
|
||||||
* <td> e.g. Oracle Corporation</td>
|
|
||||||
* </tr>
|
|
||||||
* <tr>
|
|
||||||
* <td><tt>cpuManufacturer</tt></td>
|
|
||||||
* <td>CPU manufacturer</td>
|
|
||||||
* <td> e.g. Oracle Corporation</td>
|
|
||||||
* </tr>
|
|
||||||
* <tr>
|
|
||||||
* <td><tt>serialNumber</tt></td>
|
|
||||||
* <td>System serial number</td>
|
|
||||||
* <td> e.g. BEL078932</td>
|
|
||||||
* </tr>
|
|
||||||
* </table>
|
|
||||||
* </blockquote>
|
|
||||||
* The <tt>hostname</tt> and <tt>osName</tt> element must have a non-empty value.
|
|
||||||
* If an element is not available on a system and their value will be
|
|
||||||
* empty.
|
|
||||||
* <p>
|
|
||||||
* <a name="XMLSchema">
|
|
||||||
* <b>Registration XML Schema</b></a>
|
|
||||||
* <p>
|
|
||||||
* A {@code RegistrationData} object can be {@link #loadFromXML loaded} from
|
|
||||||
* and {@link #storeToXML stored} into an XML file in the format described
|
|
||||||
* by the
|
|
||||||
* <a href="https://sn-tools.central.sun.com/twiki/pub/ServiceTags/RegistrationRelayService/product_registration.xsd">
|
|
||||||
* registration data schema</a>. The registration data schema is defined by the
|
|
||||||
* Service Tags Technology.
|
|
||||||
* <p>
|
|
||||||
* Typically the registration data is constructed at installation time
|
|
||||||
* and stored in an XML file for later service tag lookup or registration.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Example Usage</b>
|
|
||||||
* <p>
|
|
||||||
* The examples below show how the {@code RegistrationData} can be
|
|
||||||
* used for product registration.
|
|
||||||
* Exception handling is not shown in these examples for clarity.
|
|
||||||
* <ol>
|
|
||||||
* <li>This example shows how the JDK creates a JDK service tag, installs it
|
|
||||||
* in the system service tag registry and adds it to the registration data.
|
|
||||||
* <br>
|
|
||||||
* <blockquote><pre>
|
|
||||||
* // create a service tag object with an instance_urn
|
|
||||||
* ServiceTag st = ServiceTag.newInstance(ServiceTag.generateInstanceURN(),
|
|
||||||
* ....);
|
|
||||||
* // Adds to the system service tag registry if supported
|
|
||||||
* if (Registry.isSupported()) {
|
|
||||||
* Registry.getSystemRegistry().addServiceTag(st);
|
|
||||||
* }
|
|
||||||
*
|
|
||||||
* // add to the registration data
|
|
||||||
* RegistrationData registration = new RegistrationData();
|
|
||||||
* registration.addServiceTag(st);
|
|
||||||
* </pre></blockquote>
|
|
||||||
* </li>
|
|
||||||
* <li>At this point, the registration data is ready to
|
|
||||||
* send to Sun Connection for registration. This example shows how to register
|
|
||||||
* the JDK via the <i>Registration Relay Service</i>.
|
|
||||||
* <p>
|
|
||||||
* There are several registration services for Sun Connection. For example,
|
|
||||||
* the <a href="https://sn-tools.central.sun.com/twiki/bin/view/ServiceTags/RegistrationRelayService">
|
|
||||||
* Registration Relay Service</a> is a web application interface that
|
|
||||||
* processes the registration data payload sent via HTTP post
|
|
||||||
* and hosts the registration user interface for a specified
|
|
||||||
* registration URL. Refer to the
|
|
||||||
* Registration Relay Service Specification for details.
|
|
||||||
* <p>
|
|
||||||
* <blockquote><pre>
|
|
||||||
* // Open the connection to the URL of the registration service
|
|
||||||
* HttpsURLConnection con = (HttpsURLConnection) url.openConnection();
|
|
||||||
* con.setDoInput(true);
|
|
||||||
* con.setDoOutput(true);
|
|
||||||
* con.setUseCaches(false);
|
|
||||||
* con.setAllowUserInteraction(false);
|
|
||||||
* con.setRequestMethod("POST");
|
|
||||||
* con.setRequestProperty("Content-Type", "text/xml;charset=\"utf-8\"");
|
|
||||||
* con.connect();
|
|
||||||
*
|
|
||||||
* // send the registration data to the registration service
|
|
||||||
* OutputStream out = con.getOutputStream();
|
|
||||||
* registration.storeToXML(out);
|
|
||||||
* out.close();
|
|
||||||
* </pre></blockquote>
|
|
||||||
* </li>
|
|
||||||
* <li>This example shows how to store the registration data in an XML file.
|
|
||||||
* for later service tag lookup or registration.
|
|
||||||
* <br>
|
|
||||||
* <blockquote><pre>
|
|
||||||
* BufferedOutputStream out = new BufferedOutputStream(
|
|
||||||
* new FileOutputStream(""<JAVA_HOME>/lib/servicetag/registration.xml"));
|
|
||||||
* registration.storeToXML(out);
|
|
||||||
* out.close();
|
|
||||||
* </pre></blockquote>
|
|
||||||
* </li>
|
|
||||||
* <li>This example shows how to install service tags that are in the
|
|
||||||
* registration data in the system service tag registry when determined
|
|
||||||
* to be available. The system service tag registry might not have existed
|
|
||||||
* when the registration data was constructed.
|
|
||||||
* <br>
|
|
||||||
* <blockquote><pre>
|
|
||||||
* if (Registry.isSupported()) {
|
|
||||||
* Set<ServiceTag> svctags = registration.getServiceTags();
|
|
||||||
* for (ServiceTag st : svctags) {
|
|
||||||
* Registry.getSystemRegistry().addServiceTag(st);
|
|
||||||
* }
|
|
||||||
* }
|
|
||||||
* </pre></blockquote>
|
|
||||||
* </li>
|
|
||||||
* </ol>
|
|
||||||
*
|
|
||||||
* @see <a href="https://sunconnection.sun.com/inventory">Sun Connection Inventory Channel</a>
|
|
||||||
*/
|
|
||||||
public class RegistrationData {
|
|
||||||
private final Map<String, String> environment = initEnvironment();
|
|
||||||
private final Map<String, ServiceTag> svcTagMap =
|
|
||||||
new LinkedHashMap<String, ServiceTag>();
|
|
||||||
private final String urn;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a {@code RegistrationData} object with a generated
|
|
||||||
* {@link #getRegistrationURN registration URN}.
|
|
||||||
* The following keys in the {@link #getEnvironmentMap environment map}
|
|
||||||
* will be initialized for the configuration of the
|
|
||||||
* running system:
|
|
||||||
* <blockquote>
|
|
||||||
* <tt>hostname</tt>, <tt>osName</tt>, <tt>osVersion</tt> and
|
|
||||||
* <tt>osArchitecture</tt>
|
|
||||||
* </blockquote>
|
|
||||||
* and the value of other keys may be empty.
|
|
||||||
*/
|
|
||||||
public RegistrationData() {
|
|
||||||
this(Util.generateURN());
|
|
||||||
SystemEnvironment sysEnv = SystemEnvironment.getSystemEnvironment();
|
|
||||||
setEnvironment(ST_NODE_HOSTNAME, sysEnv.getHostname());
|
|
||||||
setEnvironment(ST_NODE_HOST_ID, sysEnv.getHostId());
|
|
||||||
setEnvironment(ST_NODE_OS_NAME, sysEnv.getOsName());
|
|
||||||
setEnvironment(ST_NODE_OS_VERSION, sysEnv.getOsVersion());
|
|
||||||
setEnvironment(ST_NODE_OS_ARCH, sysEnv.getOsArchitecture());
|
|
||||||
setEnvironment(ST_NODE_SYSTEM_MODEL, sysEnv.getSystemModel());
|
|
||||||
setEnvironment(ST_NODE_SYSTEM_MANUFACTURER, sysEnv.getSystemManufacturer());
|
|
||||||
setEnvironment(ST_NODE_CPU_MANUFACTURER, sysEnv.getCpuManufacturer());
|
|
||||||
setEnvironment(ST_NODE_SERIAL_NUMBER, sysEnv.getSerialNumber());
|
|
||||||
}
|
|
||||||
|
|
||||||
// package private
|
|
||||||
RegistrationData(String urn) {
|
|
||||||
this.urn = urn;
|
|
||||||
}
|
|
||||||
|
|
||||||
private Map<String, String> initEnvironment() {
|
|
||||||
Map<String, String> map = new LinkedHashMap<String, String>();
|
|
||||||
map.put(ST_NODE_HOSTNAME, "");
|
|
||||||
map.put(ST_NODE_HOST_ID, "");
|
|
||||||
map.put(ST_NODE_OS_NAME, "");
|
|
||||||
map.put(ST_NODE_OS_VERSION, "");
|
|
||||||
map.put(ST_NODE_OS_ARCH, "");
|
|
||||||
map.put(ST_NODE_SYSTEM_MODEL, "");
|
|
||||||
map.put(ST_NODE_SYSTEM_MANUFACTURER, "");
|
|
||||||
map.put(ST_NODE_CPU_MANUFACTURER, "");
|
|
||||||
map.put(ST_NODE_SERIAL_NUMBER, "");
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the uniform resource name of this registration data
|
|
||||||
* in this format:
|
|
||||||
* <tt>urn:st:<32-char {@link java.util.UUID uuid}></tt>
|
|
||||||
*
|
|
||||||
* @return the URN of this registration data.
|
|
||||||
*/
|
|
||||||
public String getRegistrationURN() {
|
|
||||||
return urn;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a map containing the environment information for this
|
|
||||||
* registration data. See the set of <a href="#EnvMap">keys</a>
|
|
||||||
* in the environment map. Subsequent update to the environment
|
|
||||||
* map via the {@link #setEnvironment setEnvironment} method will not be reflected
|
|
||||||
* in the returned map.
|
|
||||||
*
|
|
||||||
* @return an environment map for this registration data.
|
|
||||||
*/
|
|
||||||
public Map<String, String> getEnvironmentMap() {
|
|
||||||
return new LinkedHashMap<String,String>(environment);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets an element of the specified {@code name} in the environment map
|
|
||||||
* with the given {@code value}.
|
|
||||||
*
|
|
||||||
* @throws IllegalArgumentException if {@code name} is not a valid key
|
|
||||||
* in the environment map, or {@code value} is not valid.
|
|
||||||
*/
|
|
||||||
public void setEnvironment(String name, String value) {
|
|
||||||
if (name == null) {
|
|
||||||
throw new NullPointerException("name is null");
|
|
||||||
}
|
|
||||||
if (value == null) {
|
|
||||||
throw new NullPointerException("value is null");
|
|
||||||
}
|
|
||||||
if (environment.containsKey(name)) {
|
|
||||||
if (name.equals(ST_NODE_HOSTNAME) || name.equals(ST_NODE_OS_NAME)) {
|
|
||||||
if (value.length() == 0) {
|
|
||||||
throw new IllegalArgumentException("\"" +
|
|
||||||
name + "\" requires non-empty value.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
environment.put(name, value);
|
|
||||||
} else {
|
|
||||||
throw new IllegalArgumentException("\"" +
|
|
||||||
name + "\" is not an environment element.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns all service tags in this registration data.
|
|
||||||
*
|
|
||||||
* @return a {@link Set Set} of the service tags
|
|
||||||
* in this registration data.
|
|
||||||
*/
|
|
||||||
public Set<ServiceTag> getServiceTags() {
|
|
||||||
return new HashSet<ServiceTag>(svcTagMap.values());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds a service tag to this registration data.
|
|
||||||
* If the given service tag has an empty <tt>instance_urn</tt>,
|
|
||||||
* this method will generate a URN and place it in the copy
|
|
||||||
* of the service tag in this registration data.
|
|
||||||
* This method will return the {@code ServiceTag} object
|
|
||||||
* added to this registration data.
|
|
||||||
*
|
|
||||||
* @param st {@code ServiceTag} object to be added.
|
|
||||||
* @return a {@code ServiceTag} object added to this registration data.
|
|
||||||
*
|
|
||||||
* @throws IllegalArgumentException if
|
|
||||||
* a service tag of the same {@link ServiceTag#getInstanceURN
|
|
||||||
* <tt>instance_urn</tt>} already exists in the registry.
|
|
||||||
*/
|
|
||||||
public synchronized ServiceTag addServiceTag(ServiceTag st) {
|
|
||||||
ServiceTag svcTag = ServiceTag.newInstanceWithUrnTimestamp(st);
|
|
||||||
|
|
||||||
String instanceURN = svcTag.getInstanceURN();
|
|
||||||
if (svcTagMap.containsKey(instanceURN)) {
|
|
||||||
throw new IllegalArgumentException("Instance_urn = " + instanceURN +
|
|
||||||
" already exists in the registration data.");
|
|
||||||
} else {
|
|
||||||
svcTagMap.put(instanceURN, svcTag);
|
|
||||||
}
|
|
||||||
return svcTag;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a service tag of the given <tt>instance_urn</tt> in this registration
|
|
||||||
* data.
|
|
||||||
*
|
|
||||||
* @param instanceURN the <tt>instance_urn</tt> of the service tag
|
|
||||||
* @return the {@code ServiceTag} object of the given <tt>instance_urn</tt>
|
|
||||||
* if exists; otherwise return {@code null}.
|
|
||||||
*/
|
|
||||||
public synchronized ServiceTag getServiceTag(String instanceURN) {
|
|
||||||
if (instanceURN == null) {
|
|
||||||
throw new NullPointerException("instanceURN is null");
|
|
||||||
}
|
|
||||||
return svcTagMap.get(instanceURN);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Removes a service tag of the given <tt>instance_urn</tt> from this
|
|
||||||
* registration data.
|
|
||||||
*
|
|
||||||
* @param instanceURN the <tt>instance_urn</tt> of
|
|
||||||
* the service tag to be removed.
|
|
||||||
*
|
|
||||||
* @return the removed {@code ServiceTag} object;
|
|
||||||
* or {@code null} if the service tag does not exist in this
|
|
||||||
* registration data.
|
|
||||||
*/
|
|
||||||
public synchronized ServiceTag removeServiceTag(String instanceURN) {
|
|
||||||
if (instanceURN == null) {
|
|
||||||
throw new NullPointerException("instanceURN is null");
|
|
||||||
}
|
|
||||||
|
|
||||||
ServiceTag svcTag = null;
|
|
||||||
if (svcTagMap.containsKey(instanceURN)) {
|
|
||||||
svcTag = svcTagMap.remove(instanceURN);
|
|
||||||
}
|
|
||||||
return svcTag;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Updates the <tt>product_defined_instance_id</tt> in the service tag
|
|
||||||
* of the given <tt>instance_urn</tt> in this registration data.
|
|
||||||
*
|
|
||||||
* @param instanceURN the <tt>instance_urn</tt> of the service tag to be updated.
|
|
||||||
* @param productDefinedInstanceID the value of the
|
|
||||||
* <tt>product_defined_instance_id</tt> to be set.
|
|
||||||
*
|
|
||||||
* @return the updated {@code ServiceTag} object;
|
|
||||||
* or {@code null} if the service tag does not exist in this
|
|
||||||
* registration data.
|
|
||||||
*/
|
|
||||||
public synchronized ServiceTag updateServiceTag(String instanceURN,
|
|
||||||
String productDefinedInstanceID) {
|
|
||||||
ServiceTag svcTag = getServiceTag(instanceURN);
|
|
||||||
if (svcTag == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
svcTag = ServiceTag.newInstanceWithUrnTimestamp(svcTag);
|
|
||||||
// update the product defined instance ID field
|
|
||||||
svcTag.setProductDefinedInstanceID(productDefinedInstanceID);
|
|
||||||
svcTagMap.put(instanceURN, svcTag);
|
|
||||||
return svcTag;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reads the registration data from the XML document on the
|
|
||||||
* specified input stream. The XML document must be
|
|
||||||
* in the format described by the <a href="#XMLSchema">
|
|
||||||
* registration data schema</a>.
|
|
||||||
* The specified stream is closed after this method returns.
|
|
||||||
*
|
|
||||||
* @param in the input stream from which to read the XML document.
|
|
||||||
* @return a {@code RegistrationData} object read from the input
|
|
||||||
* stream.
|
|
||||||
*
|
|
||||||
* @throws IllegalArgumentException if the input stream
|
|
||||||
* contains an invalid registration data.
|
|
||||||
*
|
|
||||||
* @throws IOException if an error occurred when reading from the input stream.
|
|
||||||
*/
|
|
||||||
public static RegistrationData loadFromXML(InputStream in) throws IOException {
|
|
||||||
try {
|
|
||||||
return RegistrationDocument.load(in);
|
|
||||||
} finally {
|
|
||||||
in.close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Writes the registration data to the specified output stream
|
|
||||||
* in the format described by the <a href="#XMLSchema">
|
|
||||||
* registration data schema</a> with "UTF-8" encoding.
|
|
||||||
* The specified stream remains open after this method returns.
|
|
||||||
*
|
|
||||||
* @param os the output stream on which to write the XML document.
|
|
||||||
*
|
|
||||||
* @throws IOException if an error occurred when writing to the output stream.
|
|
||||||
*/
|
|
||||||
public void storeToXML(OutputStream os) throws IOException {
|
|
||||||
RegistrationDocument.store(os, this);
|
|
||||||
os.flush();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a newly allocated byte array containing the registration
|
|
||||||
* data in XML format.
|
|
||||||
*
|
|
||||||
* @return a newly allocated byte array containing the registration
|
|
||||||
* data in XML format.
|
|
||||||
*/
|
|
||||||
public byte[] toXML() {
|
|
||||||
try {
|
|
||||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
|
||||||
storeToXML(out);
|
|
||||||
return out.toByteArray();
|
|
||||||
} catch (IOException e) {
|
|
||||||
// should not reach here
|
|
||||||
return new byte[0];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a string representation of this registration data in XML
|
|
||||||
* format.
|
|
||||||
*
|
|
||||||
* @return a string representation of this registration data in XML
|
|
||||||
* format.
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
try {
|
|
||||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
|
||||||
storeToXML(out);
|
|
||||||
return out.toString("UTF-8");
|
|
||||||
} catch (IOException e) {
|
|
||||||
// should not reach here
|
|
||||||
return "Error creating the return string.";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue