Merge
diff --git a/make/common/Defs-solaris.gmk b/make/common/Defs-solaris.gmk
index 5c272be..b14b9b2 100644
--- a/make/common/Defs-solaris.gmk
+++ b/make/common/Defs-solaris.gmk
@@ -99,6 +99,9 @@
# variable names because the incoming option value can be overridden
# in some situations, e.g., a VARIANT != OPT build.
+ADD_GNU_DEBUGLINK = $(ABS_BUILDTOOLBINDIR)/add_gnu_debuglink
+FIX_EMPTY_SEC_HDR_FLAGS = $(ABS_BUILDTOOLBINDIR)/fix_empty_sec_hdr_flags
+
ifeq ($(VARIANT), OPT)
FULL_DEBUG_SYMBOLS ?= 1
ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
@@ -113,26 +116,11 @@
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
# Default OBJCOPY comes from the SUNWbinutils package:
DEF_OBJCOPY=/usr/sfw/bin/gobjcopy
- ifeq ($(PLATFORM)-$(LIBARCH), solaris-amd64)
- # On Solaris AMD64/X64, gobjcopy is not happy and fails:
- #
- # usr/sfw/bin/gobjcopy --add-gnu-debuglink=<lib>.debuginfo <lib>.so
- # BFD: stKPaiop: Not enough room for program headers, try linking with -N
- # /usr/sfw/bin/gobjcopy: stKPaiop: Bad value
- # BFD: stKPaiop: Not enough room for program headers, try linking with -N
- # /usr/sfw/bin/gobjcopy: libsaproc.debuginfo: Bad value
- # BFD: stKPaiop: Not enough room for program headers, try linking with -N
- # /usr/sfw/bin/gobjcopy: stKPaiop: Bad value
- _JUNK_ := $(shell \
- echo >&2 "INFO: $(DEF_OBJCOPY) is not working on Solaris AMD64/X64")
- OBJCOPY=
- else
- OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
- ifneq ($(ALT_OBJCOPY),)
- _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")
- # disable .debuginfo support by setting ALT_OBJCOPY to a non-existent path
- OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
- endif
+ OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
+ ifneq ($(ALT_OBJCOPY),)
+ _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")
+ # disable .debuginfo support by setting ALT_OBJCOPY to a non-existent path
+ OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
endif
# Setting ENABLE_FULL_DEBUG_SYMBOLS=1 (and OBJCOPY) above enables the
diff --git a/make/common/Defs.gmk b/make/common/Defs.gmk
index e92eed9..70ce778 100644
--- a/make/common/Defs.gmk
+++ b/make/common/Defs.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1995, 2012, 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
@@ -297,6 +297,7 @@
ABS_BUILDTOOLJARDIR = $(ABS_OUTPUTDIR)/btjars
# for generated tool class files
BUILDTOOLBINDIR = $(OUTPUTDIR)/btbins
+ABS_BUILDTOOLBINDIR = $(ABS_OUTPUTDIR)/btbins
# for generated java source files
GENSRCDIR = $(OUTPUTDIR)/gensrc
# for generated C source files (not javah)
diff --git a/make/common/Library.gmk b/make/common/Library.gmk
index 2583e83..7b47adf 100644
--- a/make/common/Library.gmk
+++ b/make/common/Library.gmk
@@ -245,6 +245,12 @@
ARFLAGS = -r
endif
+ifeq ($(PLATFORM), solaris)
+ ifeq ($(LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS),1)
+$(ACTUAL_LIBRARY):: $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS)
+ endif
+endif
+
$(ACTUAL_LIBRARY):: $(COMPILE_FILES_o) $(FILES_m) $(FILES_reorder)
@$(prep-target)
@$(ECHO) "STATS: LIBRARY=$(LIBRARY), PRODUCT=$(PRODUCT), OPTIMIZATION_LEVEL=$(OPTIMIZATION_LEVEL)"
@@ -260,11 +266,29 @@
ifneq ($(PLATFORM), macosx)
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
ifeq ($(LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS),1)
+ ifeq ($(PLATFORM), solaris)
+# gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
+# Use $(FIX_EMPTY_SEC_HDR_FLAGS) to clear the SHF_ALLOC flag (if set) from
+# empty section headers until a fixed $(OBJCOPY) is available.
+# An empty section header has sh_addr == 0 and sh_size == 0.
+# This problem has only been seen on Solaris X64, but we call this tool
+# on all Solaris builds just in case.
+#
+# $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
+# Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
(set -e ; \
$(CD) $(@D) ; \
- $(OBJCOPY) --only-keep-debug $(@F) $(LIBRARY).debuginfo ; \
- $(OBJCOPY) --add-gnu-debuglink=$(LIBRARY).debuginfo $(@F) ; \
+ $(FIX_EMPTY_SEC_HDR_FLAGS) $(@F) ; \
+ $(OBJCOPY) --only-keep-debug $(@F) $(LIB_PREFIX)$(LIBRARY).debuginfo ; \
+ $(ADD_GNU_DEBUGLINK) $(LIB_PREFIX)$(LIBRARY).debuginfo $(@F) ; \
)
+ else # PLATFORM != solaris
+ (set -e ; \
+ $(CD) $(@D) ; \
+ $(OBJCOPY) --only-keep-debug $(@F) $(LIB_PREFIX)$(LIBRARY).debuginfo ; \
+ $(OBJCOPY) --add-gnu-debuglink=$(LIB_PREFIX)$(LIBRARY).debuginfo $(@F) ; \
+ )
+ endif # PLATFORM == solaris
ifeq ($(STRIP_POLICY),all_strip)
$(STRIP) $@
else
@@ -281,8 +305,8 @@
ifeq ($(ZIP_DEBUGINFO_FILES),1)
(set -e ; \
$(CD) $(@D) ; \
- $(ZIPEXE) -q $(LIBRARY).diz $(LIBRARY).debuginfo ; \
- $(RM) $(LIBRARY).debuginfo ; \
+ $(ZIPEXE) -q $(LIB_PREFIX)$(LIBRARY).diz $(LIB_PREFIX)$(LIBRARY).debuginfo ; \
+ $(RM) $(LIB_PREFIX)$(LIBRARY).debuginfo ; \
)
endif
endif # LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS
diff --git a/make/common/Program.gmk b/make/common/Program.gmk
index 4e211d8..f6228d4 100644
--- a/make/common/Program.gmk
+++ b/make/common/Program.gmk
@@ -230,6 +230,13 @@
#
# This rule only applies on unix. It supports quantify and its ilk.
#
+
+ ifeq ($(PLATFORM), solaris)
+ ifeq ($(PROGRAM_SUPPORTS_FULL_DEBUG_SYMBOLS),1)
+ $(ACTUAL_PROGRAM):: $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS)
+ endif
+ endif
+
$(ACTUAL_PROGRAM):: $(FILES_o)
@$(prep-target)
@set -- $?; \
@@ -244,11 +251,29 @@
ifneq ($(PLATFORM), macosx)
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
ifeq ($(PROGRAM_SUPPORTS_FULL_DEBUG_SYMBOLS),1)
+ ifeq ($(PLATFORM), solaris)
+# gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
+# Use $(FIX_EMPTY_SEC_HDR_FLAGS) to clear the SHF_ALLOC flag (if set) from
+# empty section headers until a fixed $(OBJCOPY) is available.
+# An empty section header has sh_addr == 0 and sh_size == 0.
+# This problem has only been seen on Solaris X64, but we call this tool
+# on all Solaris builds just in case.
+#
+# $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
+# Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
+ (set -e ; \
+ $(CD) $(@D) ; \
+ $(FIX_EMPTY_SEC_HDR_FLAGS) $(@F) ; \
+ $(OBJCOPY) --only-keep-debug $(@F) $(@F).debuginfo ; \
+ $(ADD_GNU_DEBUGLINK) $(@F).debuginfo $(@F) ; \
+ )
+ else # PLATFORM != solaris
(set -e ; \
$(CD) $(@D) ; \
$(OBJCOPY) --only-keep-debug $(@F) $(@F).debuginfo ; \
$(OBJCOPY) --add-gnu-debuglink=$(@F).debuginfo $(@F) ; \
)
+ endif # PLATFORM == solaris
ifeq ($(STRIP_POLICY),all_strip)
$(STRIP) $@
else
diff --git a/make/netbeans/jconsole/build.xml b/make/netbeans/jconsole/build.xml
index a696067..9c1fc95 100644
--- a/make/netbeans/jconsole/build.xml
+++ b/make/netbeans/jconsole/build.xml
@@ -50,6 +50,7 @@
<fileset dir="${classes.dir}">
<include name="sun/tools/jconsole/**/*.class"/>
<include name="com/sun/tools/jconsole/**/*.class"/>
+ <include name="sun/tools/jconsole/resources/*.properties"/>
<include name="sun/tools/jconsole/resources/*.gif"/>
<include name="sun/tools/jconsole/resources/*.png"/>
</fileset>
diff --git a/make/sun/jconsole/FILES.gmk b/make/sun/jconsole/FILES.gmk
index 61085e6..8fc34ac 100644
--- a/make/sun/jconsole/FILES.gmk
+++ b/make/sun/jconsole/FILES.gmk
@@ -30,17 +30,22 @@
MANIFEST = sun/tools/jconsole/manifest
PNG_FILES = \
- sun/tools/jconsole/resources/brandlogo.png \
- sun/tools/jconsole/resources/collapse-winlf.png \
- sun/tools/jconsole/resources/connected16.png \
- sun/tools/jconsole/resources/connected24.png \
- sun/tools/jconsole/resources/disconnected16.png \
- sun/tools/jconsole/resources/disconnected24.png \
- sun/tools/jconsole/resources/expand-winlf.png \
- sun/tools/jconsole/resources/masthead-left.png \
- sun/tools/jconsole/resources/masthead-right.png
+ sun/tools/jconsole/resources/brandlogo.png \
+ sun/tools/jconsole/resources/collapse-winlf.png \
+ sun/tools/jconsole/resources/connected16.png \
+ sun/tools/jconsole/resources/connected24.png \
+ sun/tools/jconsole/resources/disconnected16.png \
+ sun/tools/jconsole/resources/disconnected24.png \
+ sun/tools/jconsole/resources/expand-winlf.png \
+ sun/tools/jconsole/resources/masthead-left.png \
+ sun/tools/jconsole/resources/masthead-right.png
GIF_FILES = \
- sun/tools/jconsole/resources/mbean.gif \
- sun/tools/jconsole/resources/mbeanserverdelegate.gif \
- sun/tools/jconsole/resources/xobject.gif
+ sun/tools/jconsole/resources/mbean.gif \
+ sun/tools/jconsole/resources/mbeanserverdelegate.gif \
+ sun/tools/jconsole/resources/xobject.gif
+
+PROP_FILES = \
+ sun/tools/jconsole/resources/messages.properties \
+ sun/tools/jconsole/resources/messages_ja.properties \
+ sun/tools/jconsole/resources/messages_zh_CN.properties
diff --git a/make/sun/jconsole/Makefile b/make/sun/jconsole/Makefile
index da0200d..c2651ce 100644
--- a/make/sun/jconsole/Makefile
+++ b/make/sun/jconsole/Makefile
@@ -53,21 +53,21 @@
FILES_png = $(PNG_FILES:%.png=$(CLASSBINDIR)/%.png)
FILES_gif = $(GIF_FILES:%.gif=$(CLASSBINDIR)/%.gif)
-
+FILES_prop = $(PROP_FILES:%.properties=$(CLASSBINDIR)/%.properties)
build: $(GENSRCDIR)/sun/tools/jconsole/Version.java
#
# Resources
#
LOCALE_SET_DEFINITION = jdk
-RESOURCE_BUNDLES_JAVA = $(PKGDIR)/resources/JConsoleResources.java
+RESOURCE_BUNDLES_UNCOMPILED_PROPERTIES = $(PKGDIR)/resources/messages.properties
#
# Rules.
#
include $(BUILDDIR)/common/Classes.gmk
-build: $(FILES_png) $(FILES_gif) $(TEMPDIR)/manifest $(JARFILE)
+build: $(FILES_png) $(FILES_gif) $(FILES_prop) $(TEMPDIR)/manifest $(JARFILE)
$(GENSRCDIR)/sun/tools/jconsole/Version.java: \
$(SHARE_SRC)/classes/sun/tools/jconsole/Version.java.template
@@ -85,7 +85,7 @@
# Extra rule to build jconsole.jar
#
-$(JARFILE): $(LIBDIR) $(FILES_class) $(FILES_png) $(FILES_gif) $(TEMPDIR)/manifest
+$(JARFILE): $(LIBDIR) $(FILES_class) $(FILES_png) $(FILES_gif) $(FILES_prop) $(TEMPDIR)/manifest
$(BOOT_JAR_CMD) -cfm $(JARFILE) $(TEMPDIR)/manifest \
-C $(CLASSBINDIR) sun/tools/jconsole \
-C $(CLASSBINDIR) com/sun/tools/jconsole \
diff --git a/make/tools/Makefile b/make/tools/Makefile
index ad30894..f3af119 100644
--- a/make/tools/Makefile
+++ b/make/tools/Makefile
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1998, 2012, 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
@@ -58,6 +58,11 @@
SUBDIRS += generate_nimbus
endif
+ifeq ($(PLATFORM), solaris)
+ # temporary tools to work around gobjcopy bugs
+ SUBDIRS += add_gnu_debuglink fix_empty_sec_hdr_flags
+endif
+
include $(BUILDDIR)/common/Subdirs.gmk
all build clean clobber::
diff --git a/make/tools/add_gnu_debuglink/Makefile b/make/tools/add_gnu_debuglink/Makefile
new file mode 100644
index 0000000..37b53cf
--- /dev/null
+++ b/make/tools/add_gnu_debuglink/Makefile
@@ -0,0 +1,46 @@
+#
+# Copyright (c) 2012, 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.
+#
+#
+
+# Rules to build add_gnu_debuglink, used by various Makefiles on Solaris
+
+BUILDDIR = ../..
+include $(BUILDDIR)/common/Defs.gmk
+
+# Default name
+PROGRAM = add_gnu_debuglink
+ADD_GNU_DEBUGLINK_PROG = $(ABS_BUILDTOOLBINDIR)/$(PROGRAM)
+
+ADD_GNU_DEBUGLINK_SRC = add_gnu_debuglink.c
+ADD_GNU_DEBUGLINK_FLAGS =
+LIBS_ADD_GNU_DEBUGLINK += -lelf
+
+all: $(ADD_GNU_DEBUGLINK)
+
+$(ADD_GNU_DEBUGLINK_PROG): $(ADD_GNU_DEBUGLINK_SRC)
+ $(MKDIR) -p $(BUILDTOOLBINDIR)
+ $(CC) -g -o $@ $< $(ADD_GNU_DEBUGLINK_FLAGS) $(LIBS_ADD_GNU_DEBUGLINK)
+
+clean::
+ $(RM) $(ADD_GNU_DEBUGLINK_PROG)
+
diff --git a/make/tools/add_gnu_debuglink/add_gnu_debuglink.c b/make/tools/add_gnu_debuglink/add_gnu_debuglink.c
new file mode 100644
index 0000000..3cb2dc4
--- /dev/null
+++ b/make/tools/add_gnu_debuglink/add_gnu_debuglink.c
@@ -0,0 +1,285 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ */
+
+/*
+ * Name: add_gnu_debuglink.c
+ *
+ * Description: Add a ".gnu_debuglink" section that refers to the specified
+ * debug_info_path to the specified ELF object.
+ *
+ * This program is adapted from the example program shown on the
+ * elf(3elf) man page and from code from the Solaris compiler
+ * driver.
+ */
+
+/*
+ * needed to define SHF_EXCLUDE
+ */
+#define ELF_TARGET_ALL
+
+#include <fcntl.h>
+#include <stdio.h>
+#include <libelf.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+static void failure(void);
+static unsigned int gnu_debuglink_crc32(unsigned int crc, unsigned char *buf,
+ size_t len);
+
+void
+main(int argc, char ** argv) {
+ /* new ELF section name */
+ static char SEC_NAME[] = ".gnu_debuglink";
+
+ unsigned char buffer[8 * 1024]; /* I/O buffer */
+ int buffer_len; /* buffer length */
+ char * debug_info_path; /* debug info path */
+ void * ehdr; /* ELF header */
+ Elf * elf; /* ELF descriptor */
+ char * elf_ident; /* ELF identity string */
+ char * elf_obj; /* elf_obj file */
+ int fd; /* descriptor for files */
+ unsigned int file_crc = 0; /* CRC for debug info file */
+ int is_elfclass64; /* is an ELFCLASS64 file? */
+ Elf_Data * link_dat; /* ELF data for new debug info link */
+ Elf_Data * name_dat; /* ELF data for new section name */
+ Elf_Scn * new_scn; /* new ELF section descriptor */
+ void * new_shdr; /* new ELF section header */
+ Elf_Scn * scn; /* ELF section descriptor */
+ void * shdr; /* ELF section header */
+
+ if (argc != 3) {
+ (void) fprintf(stderr, "Usage: %s debug_info_path elf_obj\n", argv[0]);
+ exit(2);
+ }
+
+ debug_info_path = argv[1]; /* save for later */
+ if ((fd = open(debug_info_path, O_RDONLY)) == -1) {
+ (void) fprintf(stderr, "%s: cannot open file.\n", debug_info_path);
+ exit(3);
+ }
+
+ (void) printf("Computing CRC for '%s'\n", debug_info_path);
+ (void) fflush(stdout);
+ /* compute CRC for the debug info file */
+ for (;;) {
+ int len = read(fd, buffer, sizeof buffer);
+ if (len <= 0) {
+ break;
+ }
+ file_crc = gnu_debuglink_crc32(file_crc, buffer, len);
+ }
+ (void) close(fd);
+
+ /* open the elf_obj */
+ elf_obj = argv[2];
+ if ((fd = open(elf_obj, O_RDWR)) == -1) {
+ (void) fprintf(stderr, "%s: cannot open file.\n", elf_obj);
+ exit(4);
+ }
+
+ (void) printf("Opening '%s' for update\n", elf_obj);
+ (void) fflush(stdout);
+ (void) elf_version(EV_CURRENT); /* coordinate ELF versions */
+
+ /* obtain the ELF descriptors from the input file */
+ if ((elf = elf_begin(fd, ELF_C_RDWR, NULL)) == NULL) {
+ failure();
+ }
+
+ /* determine if ELFCLASS64 or not? */
+ elf_ident = elf_getident(elf, NULL);
+ is_elfclass64 = (elf_ident[EI_CLASS] == ELFCLASS64);
+
+ /* get the ELF header */
+ if (is_elfclass64) {
+ ehdr = elf64_getehdr(elf);
+ } else {
+ ehdr = elf32_getehdr(elf);
+ }
+ if (ehdr == NULL) {
+ failure();
+ }
+
+ /* get the ELF section descriptor */
+ if (is_elfclass64) {
+ scn = elf_getscn(elf, ((Elf64_Ehdr *) ehdr)->e_shstrndx);
+ } else {
+ scn = elf_getscn(elf, ((Elf32_Ehdr *) ehdr)->e_shstrndx);
+ }
+ if (scn == NULL) {
+ failure();
+ }
+
+ /* get the section header */
+ if (is_elfclass64) {
+ shdr = elf64_getshdr(scn);
+ } else {
+ shdr = elf32_getshdr(scn);
+ }
+ if (shdr == NULL) {
+ failure();
+ }
+
+ (void) printf("Adding ELF data for new section name\n");
+ (void) fflush(stdout);
+ name_dat = elf_newdata(scn);
+ name_dat->d_buf = (void *) SEC_NAME;
+ if (is_elfclass64) {
+ name_dat->d_off = ((Elf64_Shdr *) shdr)->sh_size + 1;
+ } else {
+ name_dat->d_off = ((Elf32_Shdr *) shdr)->sh_size + 1;
+ }
+ name_dat->d_align = 1;
+ name_dat->d_size = strlen(SEC_NAME) + 1;
+
+ new_scn = elf_newscn(elf);
+
+ if (is_elfclass64) {
+ new_shdr = elf64_getshdr(new_scn);
+ ((Elf64_Shdr *) new_shdr)->sh_flags = SHF_EXCLUDE;
+ ((Elf64_Shdr *) new_shdr)->sh_type = SHT_PROGBITS;
+ ((Elf64_Shdr *) new_shdr)->sh_name = ((Elf64_Shdr *) shdr)->sh_size;
+ ((Elf64_Shdr *) new_shdr)->sh_addralign = 1;
+ ((Elf64_Shdr *) shdr)->sh_size += (strlen(SEC_NAME) + 1);
+ } else {
+ new_shdr = elf32_getshdr(new_scn);
+ ((Elf32_Shdr *) new_shdr)->sh_flags = SHF_EXCLUDE;
+ ((Elf32_Shdr *) new_shdr)->sh_type = SHT_PROGBITS;
+ ((Elf32_Shdr *) new_shdr)->sh_name = ((Elf32_Shdr *) shdr)->sh_size;
+ ((Elf32_Shdr *) new_shdr)->sh_addralign = 1;
+ ((Elf32_Shdr *) shdr)->sh_size += (strlen(SEC_NAME) + 1);
+ }
+
+ (void) printf("Adding ELF data for debug_info_path value\n");
+ (void) fflush(stdout);
+ (void) memset(buffer, 0, sizeof buffer);
+ buffer_len = strlen(debug_info_path) + 1; /* +1 for NUL */
+ (void) strncpy((char *) buffer, debug_info_path, buffer_len);
+ if (buffer_len % 4 != 0) {
+ /* not on a 4 byte boundary so pad to the next one */
+ buffer_len += (4 - buffer_len % 4);
+ }
+ /* save the CRC */
+ (void) memcpy(&buffer[buffer_len], &file_crc, sizeof file_crc);
+ buffer_len += sizeof file_crc;
+
+ link_dat = elf_newdata(new_scn);
+ link_dat->d_type = ELF_T_BYTE;
+ link_dat->d_size = buffer_len;
+ link_dat->d_buf = buffer;
+ link_dat->d_align = 1;
+
+ (void) printf("Saving updates to '%s'\n", elf_obj);
+ (void) fflush(stdout);
+ (void) elf_update(elf, ELF_C_NULL); /* recalc ELF memory structures */
+ (void) elf_update(elf, ELF_C_WRITE); /* write out changes to ELF obj */
+ (void) elf_end(elf); /* done with ELF obj */
+ (void) close(fd);
+
+ (void) printf("Done updating '%s'\n", elf_obj);
+ (void) fflush(stdout);
+ exit(0);
+} /* end main */
+
+
+static void
+failure() {
+ (void) fprintf(stderr, "%s\n", elf_errmsg(elf_errno()));
+ exit(5);
+}
+
+
+/*
+ * The CRC used in gnu_debuglink, retrieved from
+ * http://sourceware.org/gdb/current/onlinedocs/gdb/Separate-Debug-Files.html#Separate-Debug-Files.
+ */
+
+static unsigned int
+gnu_debuglink_crc32(unsigned int crc, unsigned char *buf, size_t len) {
+ static const unsigned int crc32_table[256] = {
+ 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419,
+ 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4,
+ 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07,
+ 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de,
+ 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856,
+ 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9,
+ 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4,
+ 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
+ 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3,
+ 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a,
+ 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599,
+ 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
+ 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190,
+ 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f,
+ 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e,
+ 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
+ 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed,
+ 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,
+ 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3,
+ 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2,
+ 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a,
+ 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5,
+ 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010,
+ 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
+ 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17,
+ 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6,
+ 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615,
+ 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8,
+ 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344,
+ 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb,
+ 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a,
+ 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
+ 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1,
+ 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c,
+ 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef,
+ 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
+ 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe,
+ 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31,
+ 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c,
+ 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
+ 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b,
+ 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242,
+ 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1,
+ 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c,
+ 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278,
+ 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7,
+ 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66,
+ 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
+ 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605,
+ 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8,
+ 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b,
+ 0x2d02ef8d
+ };
+
+ unsigned char *end;
+
+ crc = ~crc & 0xffffffff;
+ for (end = buf + len; buf < end; ++buf) {
+ crc = crc32_table[(crc ^ *buf) & 0xff] ^ (crc >> 8);
+ }
+ return ~crc & 0xffffffff;
+}
diff --git a/make/tools/fix_empty_sec_hdr_flags/Makefile b/make/tools/fix_empty_sec_hdr_flags/Makefile
new file mode 100644
index 0000000..0ed6b43
--- /dev/null
+++ b/make/tools/fix_empty_sec_hdr_flags/Makefile
@@ -0,0 +1,46 @@
+#
+# Copyright (c) 2012, 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.
+#
+#
+
+# Rules to build fix_empty_sec_hdr_flags, used by various Makefiles on Solaris
+
+BUILDDIR = ../..
+include $(BUILDDIR)/common/Defs.gmk
+
+# Default name
+PROGRAM = fix_empty_sec_hdr_flags
+FIX_EMPTY_SEC_HDR_FLAGS_PROG = $(ABS_BUILDTOOLBINDIR)/$(PROGRAM)
+
+FIX_EMPTY_SEC_HDR_FLAGS_SRC = fix_empty_sec_hdr_flags.c
+FIX_EMPTY_SEC_HDR_FLAGS_FLAGS =
+LIBS_FIX_EMPTY_SEC_HDR_FLAGS += -lelf
+
+all: $(FIX_EMPTY_SEC_HDR_FLAGS)
+
+$(FIX_EMPTY_SEC_HDR_FLAGS_PROG): $(FIX_EMPTY_SEC_HDR_FLAGS_SRC)
+ $(MKDIR) -p $(BUILDTOOLBINDIR)
+ $(CC) -g -o $@ $< $(FIX_EMPTY_SEC_HDR_FLAGS_FLAGS) $(LIBS_FIX_EMPTY_SEC_HDR_FLAGS)
+
+clean::
+ $(RM) $(FIX_EMPTY_SEC_HDR_FLAGS_PROG)
+
diff --git a/make/tools/fix_empty_sec_hdr_flags/fix_empty_sec_hdr_flags.c b/make/tools/fix_empty_sec_hdr_flags/fix_empty_sec_hdr_flags.c
new file mode 100644
index 0000000..6582d95
--- /dev/null
+++ b/make/tools/fix_empty_sec_hdr_flags/fix_empty_sec_hdr_flags.c
@@ -0,0 +1,181 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ */
+
+/*
+ * Name: fix_empty_sec_hdr_flags.c
+ *
+ * Description: Remove the SHF_ALLOC flag from "empty" section headers.
+ * An "empty" section header has sh_addr == 0 and sh_size == 0.
+ *
+ * This program is adapted from the example program shown on the
+ * elf(3elf) man page and from code from the Solaris compiler
+ * driver.
+ */
+
+#include <fcntl.h>
+#include <stdio.h>
+#include <libelf.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+static void failure(void);
+
+void
+main(int argc, char ** argv) {
+ void * ehdr; /* ELF header */
+ unsigned int i; /* section counter */
+ int fd; /* descriptor for file */
+ Elf * elf; /* ELF descriptor */
+ char * elf_ident; /* ELF identity string */
+ char * elf_obj; /* elf_obj file */
+ int fix_count; /* number of flags fixed */
+ int is_elfclass64; /* is an ELFCLASS64 file? */
+ Elf_Scn * scn; /* ELF section descriptor */
+ void * shdr; /* ELF section header */
+ Elf_Data * shstrtab; /* ELF section header string table */
+
+ if (argc != 2) {
+ (void) fprintf(stderr, "Usage: %s elf_obj\n", argv[0]);
+ exit(2);
+ }
+
+ /* open the elf_obj */
+ elf_obj = argv[1];
+ if ((fd = open(elf_obj, O_RDWR)) == -1) {
+ (void) fprintf(stderr, "%s: cannot open file.\n", elf_obj);
+ exit(3);
+ }
+
+ (void) printf("Opening '%s' for update\n", elf_obj);
+ (void) fflush(stdout);
+ (void) elf_version(EV_CURRENT); /* coordinate ELF versions */
+
+ /* obtain the ELF descriptors from the input file */
+ if ((elf = elf_begin(fd, ELF_C_RDWR, NULL)) == NULL) {
+ failure();
+ }
+
+ /* determine if ELFCLASS64 or not? */
+ elf_ident = elf_getident(elf, NULL);
+ is_elfclass64 = (elf_ident[EI_CLASS] == ELFCLASS64);
+
+ /* get the ELF header */
+ if (is_elfclass64) {
+ ehdr = elf64_getehdr(elf);
+ } else {
+ ehdr = elf32_getehdr(elf);
+ }
+ if (ehdr == NULL) {
+ failure();
+ }
+
+ /* get the ELF section descriptor */
+ if (is_elfclass64) {
+ scn = elf_getscn(elf, ((Elf64_Ehdr *) ehdr)->e_shstrndx);
+ } else {
+ scn = elf_getscn(elf, ((Elf32_Ehdr *) ehdr)->e_shstrndx);
+ }
+ if (scn == NULL) {
+ failure();
+ }
+
+ /* get the section header string table */
+ shstrtab = elf_getdata(scn, NULL);
+ if (shstrtab == NULL) {
+ failure();
+ }
+
+ fix_count = 0;
+
+ /* traverse the sections of the input file */
+ for (i = 1, scn = NULL; scn = elf_nextscn(elf, scn); i++) {
+ int has_flag_set; /* is SHF_ALLOC flag set? */
+ int is_empty; /* is section empty? */
+ char * name; /* short hand pointer */
+
+ /* get the section header */
+ if (is_elfclass64) {
+ shdr = elf64_getshdr(scn);
+ } else {
+ shdr = elf32_getshdr(scn);
+ }
+ if (shdr == NULL) {
+ failure();
+ }
+
+ if (is_elfclass64) {
+ name = (char *)shstrtab->d_buf + ((Elf64_Shdr *) shdr)->sh_name;
+ } else {
+ name = (char *)shstrtab->d_buf + ((Elf32_Shdr *) shdr)->sh_name;
+ }
+
+ if (is_elfclass64) {
+ has_flag_set = ((Elf64_Shdr *) shdr)->sh_flags & SHF_ALLOC;
+ is_empty = ((Elf64_Shdr *) shdr)->sh_addr == 0 &&
+ ((Elf64_Shdr *) shdr)->sh_size == 0;
+ } else {
+ has_flag_set = ((Elf32_Shdr *) shdr)->sh_flags & SHF_ALLOC;
+ is_empty = ((Elf32_Shdr *) shdr)->sh_addr == 0 &&
+ ((Elf32_Shdr *) shdr)->sh_size == 0;
+ }
+
+ if (is_empty && has_flag_set) {
+ (void) printf("section[%u] '%s' is empty, "
+ "but SHF_ALLOC flag is set.\n", i, name);
+ (void) printf("Clearing the SHF_ALLOC flag.\n");
+
+ if (is_elfclass64) {
+ ((Elf64_Shdr *) shdr)->sh_flags &= ~SHF_ALLOC;
+ } else {
+ ((Elf32_Shdr *) shdr)->sh_flags &= ~SHF_ALLOC;
+ }
+ fix_count++;
+ }
+ } /* end for each ELF section */
+
+ if (fix_count > 0) {
+ (void) printf("Saving %d updates to '%s'\n", fix_count, elf_obj);
+ (void) fflush(stdout);
+ (void) elf_update(elf, ELF_C_NULL); /* recalc ELF memory structures */
+ (void) elf_update(elf, ELF_C_WRITE); /* write out changes to ELF obj */
+ } else {
+ (void) printf("No SHF_ALLOC flags needed to be cleared.\n");
+ }
+
+ (void) elf_end(elf); /* done with ELF obj */
+ (void) close(fd);
+
+ (void) printf("Done %s '%s'\n",
+ (fix_count > 0) ? "updating" : "with", elf_obj);
+ (void) fflush(stdout);
+ exit(0);
+} /* end main */
+
+
+static void
+failure() {
+ (void) fprintf(stderr, "%s\n", elf_errmsg(elf_errno()));
+ exit(6);
+}
diff --git a/src/share/classes/java/lang/IllegalArgumentException.java b/src/share/classes/java/lang/IllegalArgumentException.java
index 13ffbf1..c29a9d5 100644
--- a/src/share/classes/java/lang/IllegalArgumentException.java
+++ b/src/share/classes/java/lang/IllegalArgumentException.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1994, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2012, 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
@@ -30,7 +30,6 @@
* inappropriate argument.
*
* @author unascribed
- * @see java.lang.Thread#setPriority(int)
* @since JDK1.0
*/
public
diff --git a/src/share/classes/java/lang/NumberFormatException.java b/src/share/classes/java/lang/NumberFormatException.java
index c1d19de..ea1ec9f 100644
--- a/src/share/classes/java/lang/NumberFormatException.java
+++ b/src/share/classes/java/lang/NumberFormatException.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1994, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2012, 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
@@ -31,7 +31,7 @@
* have the appropriate format.
*
* @author unascribed
- * @see java.lang.Integer#toString()
+ * @see java.lang.Integer#parseInt(String)
* @since JDK1.0
*/
public
diff --git a/src/share/classes/java/text/AttributedCharacterIterator.java b/src/share/classes/java/text/AttributedCharacterIterator.java
index 86597bf..3c6ed68 100644
--- a/src/share/classes/java/text/AttributedCharacterIterator.java
+++ b/src/share/classes/java/text/AttributedCharacterIterator.java
@@ -97,7 +97,7 @@
private String name;
// table of all instances in this class, used by readResolve
- private static final Map instanceMap = new HashMap(7);
+ private static final Map<String, Attribute> instanceMap = new HashMap<>(7);
/**
* Constructs an {@code Attribute} with the given name.
@@ -150,7 +150,7 @@
throw new InvalidObjectException("subclass didn't correctly implement readResolve");
}
- Attribute instance = (Attribute) instanceMap.get(getName());
+ Attribute instance = instanceMap.get(getName());
if (instance != null) {
return instance;
} else {
diff --git a/src/share/classes/java/text/AttributedString.java b/src/share/classes/java/text/AttributedString.java
index c7c1f05..7e06e42 100644
--- a/src/share/classes/java/text/AttributedString.java
+++ b/src/share/classes/java/text/AttributedString.java
@@ -61,8 +61,8 @@
int runArraySize; // current size of the arrays
int runCount; // actual number of runs, <= runArraySize
int runStarts[]; // start index for each run
- Vector runAttributes[]; // vector of attribute keys for each run
- Vector runAttributeValues[]; // parallel vector of attribute values for each run
+ Vector<Attribute> runAttributes[]; // vector of attribute keys for each run
+ Vector<Object> runAttributeValues[]; // parallel vector of attribute values for each run
/**
* Constructs an AttributedString instance with the given
@@ -92,7 +92,7 @@
// Determine the runs, creating a new run when the attributes
// differ.
int offset = 0;
- Map last = null;
+ Map<Attribute,Object> last = null;
for (int counter = 0; counter < iterators.length; counter++) {
AttributedCharacterIterator iterator = iterators[counter];
@@ -103,7 +103,7 @@
while (index < end) {
iterator.setIndex(index);
- Map attrs = iterator.getAttributes();
+ Map<Attribute,Object> attrs = iterator.getAttributes();
if (mapsDiffer(last, attrs)) {
setAttributes(attrs, index - start + offset);
@@ -156,13 +156,14 @@
int attributeCount = attributes.size();
if (attributeCount > 0) {
createRunAttributeDataVectors();
- Vector newRunAttributes = new Vector(attributeCount);
- Vector newRunAttributeValues = new Vector(attributeCount);
+ Vector<Attribute> newRunAttributes = new Vector<>(attributeCount);
+ Vector<Object> newRunAttributeValues = new Vector<>(attributeCount);
runAttributes[0] = newRunAttributes;
runAttributeValues[0] = newRunAttributeValues;
- Iterator iterator = attributes.entrySet().iterator();
+
+ Iterator<? extends Map.Entry<? extends Attribute, ?>> iterator = attributes.entrySet().iterator();
while (iterator.hasNext()) {
- Map.Entry entry = (Map.Entry) iterator.next();
+ Map.Entry<? extends Attribute, ?> entry = iterator.next();
newRunAttributes.addElement(entry.getKey());
newRunAttributeValues.addElement(entry.getValue());
}
@@ -252,7 +253,7 @@
return;
// Select attribute keys to be taken care of
- HashSet keys = new HashSet();
+ HashSet<Attribute> keys = new HashSet<>();
if (attributes == null) {
keys.addAll(text.getAllAttributeKeys());
} else {
@@ -266,9 +267,9 @@
// Get and set attribute runs for each attribute name. Need to
// scan from the top of the text so that we can discard any
// Annotation that is no longer applied to a subset text segment.
- Iterator itr = keys.iterator();
+ Iterator<Attribute> itr = keys.iterator();
while (itr.hasNext()) {
- Attribute attributeKey = (Attribute)itr.next();
+ Attribute attributeKey = itr.next();
text.setIndex(textBeginIndex);
while (text.getIndex() < endIndex) {
int start = text.getRunStart(attributeKey);
@@ -390,10 +391,11 @@
int beginRunIndex = ensureRunBreak(beginIndex);
int endRunIndex = ensureRunBreak(endIndex);
- Iterator iterator = attributes.entrySet().iterator();
+ Iterator<? extends Map.Entry<? extends Attribute, ?>> iterator =
+ attributes.entrySet().iterator();
while (iterator.hasNext()) {
- Map.Entry entry = (Map.Entry) iterator.next();
- addAttributeRunData((Attribute) entry.getKey(), entry.getValue(), beginRunIndex, endRunIndex);
+ Map.Entry<? extends Attribute, ?> entry = iterator.next();
+ addAttributeRunData(entry.getKey(), entry.getValue(), beginRunIndex, endRunIndex);
}
}
@@ -415,8 +417,13 @@
private final void createRunAttributeDataVectors() {
// use temporary variables so things remain consistent in case of an exception
int newRunStarts[] = new int[ARRAY_SIZE_INCREMENT];
- Vector newRunAttributes[] = new Vector[ARRAY_SIZE_INCREMENT];
- Vector newRunAttributeValues[] = new Vector[ARRAY_SIZE_INCREMENT];
+
+ @SuppressWarnings("unchecked")
+ Vector<Attribute> newRunAttributes[] = (Vector<Attribute>[]) new Vector<?>[ARRAY_SIZE_INCREMENT];
+
+ @SuppressWarnings("unchecked")
+ Vector<Object> newRunAttributeValues[] = (Vector<Object>[]) new Vector<?>[ARRAY_SIZE_INCREMENT];
+
runStarts = newRunStarts;
runAttributes = newRunAttributes;
runAttributeValues = newRunAttributeValues;
@@ -461,8 +468,13 @@
if (runCount == runArraySize) {
int newArraySize = runArraySize + ARRAY_SIZE_INCREMENT;
int newRunStarts[] = new int[newArraySize];
- Vector newRunAttributes[] = new Vector[newArraySize];
- Vector newRunAttributeValues[] = new Vector[newArraySize];
+
+ @SuppressWarnings("unchecked")
+ Vector<Attribute> newRunAttributes[] = (Vector<Attribute>[]) new Vector<?>[newArraySize];
+
+ @SuppressWarnings("unchecked")
+ Vector<Object> newRunAttributeValues[] = (Vector<Object>[]) new Vector<?>[newArraySize];
+
for (int i = 0; i < runArraySize; i++) {
newRunStarts[i] = runStarts[i];
newRunAttributes[i] = runAttributes[i];
@@ -476,17 +488,17 @@
// make copies of the attribute information of the old run that the new one used to be part of
// use temporary variables so things remain consistent in case of an exception
- Vector newRunAttributes = null;
- Vector newRunAttributeValues = null;
+ Vector<Attribute> newRunAttributes = null;
+ Vector<Object> newRunAttributeValues = null;
if (copyAttrs) {
- Vector oldRunAttributes = runAttributes[runIndex - 1];
- Vector oldRunAttributeValues = runAttributeValues[runIndex - 1];
+ Vector<Attribute> oldRunAttributes = runAttributes[runIndex - 1];
+ Vector<Object> oldRunAttributeValues = runAttributeValues[runIndex - 1];
if (oldRunAttributes != null) {
- newRunAttributes = (Vector) oldRunAttributes.clone();
+ newRunAttributes = new Vector<>(oldRunAttributes);
}
if (oldRunAttributeValues != null) {
- newRunAttributeValues = (Vector) oldRunAttributeValues.clone();
+ newRunAttributeValues = new Vector<>(oldRunAttributeValues);
}
}
@@ -511,8 +523,8 @@
for (int i = beginRunIndex; i < endRunIndex; i++) {
int keyValueIndex = -1; // index of key and value in our vectors; assume we don't have an entry yet
if (runAttributes[i] == null) {
- Vector newRunAttributes = new Vector();
- Vector newRunAttributeValues = new Vector();
+ Vector<Attribute> newRunAttributes = new Vector<>();
+ Vector<Object> newRunAttributeValues = new Vector<>();
runAttributes[i] = newRunAttributes;
runAttributeValues[i] = newRunAttributeValues;
} else {
@@ -597,8 +609,8 @@
}
private synchronized Object getAttribute(Attribute attribute, int runIndex) {
- Vector currentRunAttributes = runAttributes[runIndex];
- Vector currentRunAttributeValues = runAttributeValues[runIndex];
+ Vector<Attribute> currentRunAttributes = runAttributes[runIndex];
+ Vector<Object> currentRunAttributeValues = runAttributeValues[runIndex];
if (currentRunAttributes == null) {
return null;
}
@@ -650,10 +662,10 @@
}
// returns whether all specified attributes have equal values in the runs with the given indices
- private boolean attributeValuesMatch(Set attributes, int runIndex1, int runIndex2) {
- Iterator iterator = attributes.iterator();
+ private boolean attributeValuesMatch(Set<? extends Attribute> attributes, int runIndex1, int runIndex2) {
+ Iterator<? extends Attribute> iterator = attributes.iterator();
while (iterator.hasNext()) {
- Attribute key = (Attribute) iterator.next();
+ Attribute key = iterator.next();
if (!valuesMatch(getAttribute(key, runIndex1), getAttribute(key, runIndex2))) {
return false;
}
@@ -690,7 +702,7 @@
* (typically the end of the text) to the ones specified in attrs.
* This is only meant to be called from the constructor!
*/
- private void setAttributes(Map attrs, int offset) {
+ private void setAttributes(Map<Attribute, Object> attrs, int offset) {
if (runCount == 0) {
createRunAttributeDataVectors();
}
@@ -699,12 +711,12 @@
int size;
if (attrs != null && (size = attrs.size()) > 0) {
- Vector runAttrs = new Vector(size);
- Vector runValues = new Vector(size);
- Iterator iterator = attrs.entrySet().iterator();
+ Vector<Attribute> runAttrs = new Vector<>(size);
+ Vector<Object> runValues = new Vector<>(size);
+ Iterator<Map.Entry<Attribute, Object>> iterator = attrs.entrySet().iterator();
while (iterator.hasNext()) {
- Map.Entry entry = (Map.Entry)iterator.next();
+ Map.Entry<Attribute, Object> entry = iterator.next();
runAttrs.add(entry.getKey());
runValues.add(entry.getValue());
@@ -717,7 +729,7 @@
/**
* Returns true if the attributes specified in last and attrs differ.
*/
- private static boolean mapsDiffer(Map last, Map attrs) {
+ private static <K,V> boolean mapsDiffer(Map<K, V> last, Map<K, V> attrs) {
if (last == null) {
return (attrs != null && attrs.size() > 0);
}
@@ -761,7 +773,7 @@
this.currentIndex = beginIndex;
updateRunInfo();
if (attributes != null) {
- relevantAttributes = (Attribute[]) attributes.clone();
+ relevantAttributes = attributes.clone();
}
}
@@ -944,7 +956,7 @@
if (runAttributes == null || currentRunIndex == -1 || runAttributes[currentRunIndex] == null) {
// ??? would be nice to return null, but current spec doesn't allow it
// returning Hashtable saves AttributeMap from dealing with emptiness
- return new Hashtable();
+ return new Hashtable<>();
}
return new AttributeMap(currentRunIndex, beginIndex, endIndex);
}
@@ -954,16 +966,16 @@
if (runAttributes == null) {
// ??? would be nice to return null, but current spec doesn't allow it
// returning HashSet saves us from dealing with emptiness
- return new HashSet();
+ return new HashSet<>();
}
synchronized (AttributedString.this) {
// ??? should try to create this only once, then update if necessary,
// and give callers read-only view
- Set keys = new HashSet();
+ Set<Attribute> keys = new HashSet<>();
int i = 0;
while (i < runCount) {
if (runStarts[i] < endIndex && (i == runCount - 1 || runStarts[i + 1] > beginIndex)) {
- Vector currentRunAttributes = runAttributes[i];
+ Vector<Attribute> currentRunAttributes = runAttributes[i];
if (currentRunAttributes != null) {
int j = currentRunAttributes.size();
while (j-- > 0) {
@@ -1052,12 +1064,12 @@
this.endIndex = endIndex;
}
- public Set entrySet() {
- HashSet set = new HashSet();
+ public Set<Map.Entry<Attribute, Object>> entrySet() {
+ HashSet<Map.Entry<Attribute, Object>> set = new HashSet<>();
synchronized (AttributedString.this) {
int size = runAttributes[runIndex].size();
for (int i = 0; i < size; i++) {
- Attribute key = (Attribute) runAttributes[runIndex].get(i);
+ Attribute key = runAttributes[runIndex].get(i);
Object value = runAttributeValues[runIndex].get(i);
if (value instanceof Annotation) {
value = AttributedString.this.getAttributeCheckRange(key,
@@ -1066,7 +1078,8 @@
continue;
}
}
- Map.Entry entry = new AttributeEntry(key, value);
+
+ Map.Entry<Attribute, Object> entry = new AttributeEntry(key, value);
set.add(entry);
}
}
@@ -1079,7 +1092,7 @@
}
}
-class AttributeEntry implements Map.Entry {
+class AttributeEntry implements Map.Entry<Attribute,Object> {
private Attribute key;
private Object value;
@@ -1098,7 +1111,7 @@
(value == null ? other.value == null : other.value.equals(value));
}
- public Object getKey() {
+ public Attribute getKey() {
return key;
}
diff --git a/src/share/classes/java/text/BreakDictionary.java b/src/share/classes/java/text/BreakDictionary.java
index 1e34503..bc0fccc 100644
--- a/src/share/classes/java/text/BreakDictionary.java
+++ b/src/share/classes/java/text/BreakDictionary.java
@@ -145,9 +145,9 @@
BufferedInputStream in;
try {
- in = (BufferedInputStream)AccessController.doPrivileged(
- new PrivilegedExceptionAction() {
- public Object run() throws Exception {
+ in = AccessController.doPrivileged(
+ new PrivilegedExceptionAction<BufferedInputStream>() {
+ public BufferedInputStream run() throws Exception {
return new BufferedInputStream(getClass().getResourceAsStream("/sun/text/resources/" + dictionaryName));
}
}
diff --git a/src/share/classes/java/text/BreakIterator.java b/src/share/classes/java/text/BreakIterator.java
index 6010784..7520cd1 100644
--- a/src/share/classes/java/text/BreakIterator.java
+++ b/src/share/classes/java/text/BreakIterator.java
@@ -439,7 +439,9 @@
private static final int WORD_INDEX = 1;
private static final int LINE_INDEX = 2;
private static final int SENTENCE_INDEX = 3;
- private static final SoftReference[] iterCache = new SoftReference[4];
+
+ @SuppressWarnings("unchecked")
+ private static final SoftReference<BreakIteratorCache>[] iterCache = (SoftReference<BreakIteratorCache>[]) new SoftReference<?>[4];
/**
* Returns a new <code>BreakIterator</code> instance
@@ -554,7 +556,7 @@
String dataName,
String dictionaryName) {
if (iterCache[type] != null) {
- BreakIteratorCache cache = (BreakIteratorCache) iterCache[type].get();
+ BreakIteratorCache cache = iterCache[type].get();
if (cache != null) {
if (cache.getLocale().equals(locale)) {
return cache.createBreakInstance();
@@ -567,13 +569,13 @@
dataName,
dictionaryName);
BreakIteratorCache cache = new BreakIteratorCache(locale, result);
- iterCache[type] = new SoftReference(cache);
+ iterCache[type] = new SoftReference<>(cache);
return result;
}
private static ResourceBundle getBundle(final String baseName, final Locale locale) {
- return (ResourceBundle) AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
+ return AccessController.doPrivileged(new PrivilegedAction<ResourceBundle>() {
+ public ResourceBundle run() {
return ResourceBundle.getBundle(baseName, locale);
}
});
diff --git a/src/share/classes/java/text/CharacterIteratorFieldDelegate.java b/src/share/classes/java/text/CharacterIteratorFieldDelegate.java
index 019bfe7..284108c 100644
--- a/src/share/classes/java/text/CharacterIteratorFieldDelegate.java
+++ b/src/share/classes/java/text/CharacterIteratorFieldDelegate.java
@@ -41,7 +41,7 @@
* for existing regions result in invoking addAttribute on the existing
* AttributedStrings.
*/
- private ArrayList attributedStrings;
+ private ArrayList<AttributedString> attributedStrings;
/**
* Running count of the number of characters that have
* been encountered.
@@ -50,7 +50,7 @@
CharacterIteratorFieldDelegate() {
- attributedStrings = new ArrayList();
+ attributedStrings = new ArrayList<>();
}
public void formatted(Format.Field attr, Object value, int start, int end,
@@ -62,7 +62,7 @@
int asIndex = attributedStrings.size() - 1;
while (start < index) {
- AttributedString as = (AttributedString)attributedStrings.
+ AttributedString as = attributedStrings.
get(asIndex--);
int newIndex = index - as.length();
int aStart = Math.max(0, start - newIndex);
@@ -116,8 +116,8 @@
AttributedCharacterIterator[iCount];
for (int counter = 0; counter < iCount; counter++) {
- iterators[counter] = ((AttributedString)attributedStrings.
- get(counter)).getIterator();
+ iterators[counter] = attributedStrings.
+ get(counter).getIterator();
}
return new AttributedString(iterators).getIterator();
}
diff --git a/src/share/classes/java/text/ChoiceFormat.java b/src/share/classes/java/text/ChoiceFormat.java
index f513cd9..4d5e006 100644
--- a/src/share/classes/java/text/ChoiceFormat.java
+++ b/src/share/classes/java/text/ChoiceFormat.java
@@ -457,8 +457,8 @@
{
ChoiceFormat other = (ChoiceFormat) super.clone();
// for primitives or immutables, shallow clone is enough
- other.choiceLimits = (double[]) choiceLimits.clone();
- other.choiceFormats = (String[]) choiceFormats.clone();
+ other.choiceLimits = choiceLimits.clone();
+ other.choiceFormats = choiceFormats.clone();
return other;
}
diff --git a/src/share/classes/java/text/CollationElementIterator.java b/src/share/classes/java/text/CollationElementIterator.java
index 94fc84e..62b6a12 100644
--- a/src/share/classes/java/text/CollationElementIterator.java
+++ b/src/share/classes/java/text/CollationElementIterator.java
@@ -412,6 +412,7 @@
* @param newOffset The new character offset into the original text.
* @since 1.2
*/
+ @SuppressWarnings("deprecation") // getBeginIndex, getEndIndex and setIndex are deprecated
public void setOffset(int newOffset)
{
if (text != null) {
@@ -645,14 +646,14 @@
{
// First get the ordering of this single character,
// which is always the first element in the list
- Vector list = ordering.getContractValues(ch);
- EntryPair pair = (EntryPair)list.firstElement();
+ Vector<EntryPair> list = ordering.getContractValues(ch);
+ EntryPair pair = list.firstElement();
int order = pair.value;
// find out the length of the longest contracting character sequence in the list.
// There's logic in the builder code to make sure the longest sequence is always
// the last.
- pair = (EntryPair)list.lastElement();
+ pair = list.lastElement();
int maxLength = pair.entryName.length();
// (the Normalizer is cloned here so that the seeking we do in the next loop
@@ -684,7 +685,7 @@
// to this sequence
maxLength = 1;
for (int i = list.size() - 1; i > 0; i--) {
- pair = (EntryPair)list.elementAt(i);
+ pair = list.elementAt(i);
if (!pair.fwd)
continue;
@@ -721,11 +722,11 @@
// rather than off. Notice that we still use append() and startsWith() when
// working on the fragment. This is because the entry pairs that are used
// in reverse iteration have their names reversed already.
- Vector list = ordering.getContractValues(ch);
- EntryPair pair = (EntryPair)list.firstElement();
+ Vector<EntryPair> list = ordering.getContractValues(ch);
+ EntryPair pair = list.firstElement();
int order = pair.value;
- pair = (EntryPair)list.lastElement();
+ pair = list.lastElement();
int maxLength = pair.entryName.length();
NormalizerBase tempText = (NormalizerBase)text.clone();
@@ -747,7 +748,7 @@
maxLength = 1;
for (int i = list.size() - 1; i > 0; i--) {
- pair = (EntryPair)list.elementAt(i);
+ pair = list.elementAt(i);
if (pair.fwd)
continue;
diff --git a/src/share/classes/java/text/DateFormat.java b/src/share/classes/java/text/DateFormat.java
index 38ef970..964fca9 100644
--- a/src/share/classes/java/text/DateFormat.java
+++ b/src/share/classes/java/text/DateFormat.java
@@ -798,7 +798,7 @@
private static final long serialVersionUID = 7441350119349544720L;
// table of all instances in this class, used by readResolve
- private static final Map instanceMap = new HashMap(18);
+ private static final Map<String, Field> instanceMap = new HashMap<>(18);
// Maps from Calendar constant (such as Calendar.ERA) to Field
// constant (such as Field.ERA).
private static final Field[] calendarToFieldMapping =
diff --git a/src/share/classes/java/text/DecimalFormat.java b/src/share/classes/java/text/DecimalFormat.java
index 3dd9a5b..2ac67b2 100644
--- a/src/share/classes/java/text/DecimalFormat.java
+++ b/src/share/classes/java/text/DecimalFormat.java
@@ -2051,7 +2051,7 @@
* @return FieldPosition array of the resulting fields.
*/
private FieldPosition[] expandAffix(String pattern) {
- ArrayList positions = null;
+ ArrayList<FieldPosition> positions = null;
int stringIndex = 0;
for (int i=0; i<pattern.length(); ) {
char c = pattern.charAt(i++);
@@ -2071,7 +2071,7 @@
}
if (string.length() > 0) {
if (positions == null) {
- positions = new ArrayList(2);
+ positions = new ArrayList<>(2);
}
FieldPosition fp = new FieldPosition(Field.CURRENCY);
fp.setBeginIndex(stringIndex);
@@ -2098,7 +2098,7 @@
}
if (fieldID != null) {
if (positions == null) {
- positions = new ArrayList(2);
+ positions = new ArrayList<>(2);
}
FieldPosition fp = new FieldPosition(fieldID, field);
fp.setBeginIndex(stringIndex);
@@ -2109,7 +2109,7 @@
stringIndex++;
}
if (positions != null) {
- return (FieldPosition[])positions.toArray(EmptyFieldPositionArray);
+ return positions.toArray(EmptyFieldPositionArray);
}
return EmptyFieldPositionArray;
}
diff --git a/src/share/classes/java/text/DictionaryBasedBreakIterator.java b/src/share/classes/java/text/DictionaryBasedBreakIterator.java
index 78d7e4a..4911eb5 100644
--- a/src/share/classes/java/text/DictionaryBasedBreakIterator.java
+++ b/src/share/classes/java/text/DictionaryBasedBreakIterator.java
@@ -356,9 +356,9 @@
// continues in this way until we either successfully make it all the way
// across the range, or exhaust all of our combinations of break
// positions.)
- Stack currentBreakPositions = new Stack();
- Stack possibleBreakPositions = new Stack();
- Vector wrongBreakPositions = new Vector();
+ Stack<Integer> currentBreakPositions = new Stack<>();
+ Stack<Integer> possibleBreakPositions = new Stack<>();
+ Vector<Integer> wrongBreakPositions = new Vector<>();
// the dictionary is implemented as a trie, which is treated as a state
// machine. -1 represents the end of a legal word. Every word in the
@@ -374,7 +374,7 @@
// farthest as real break positions, and then start over from scratch with
// the character where the error occurred.
int farthestEndPoint = text.getIndex();
- Stack bestBreakPositions = null;
+ Stack<Integer> bestBreakPositions = null;
// initialize (we always exit the loop with a break statement)
c = getCurrent();
@@ -409,7 +409,11 @@
// case there's an error in the text
if (text.getIndex() > farthestEndPoint) {
farthestEndPoint = text.getIndex();
- bestBreakPositions = (Stack)(currentBreakPositions.clone());
+
+ @SuppressWarnings("unchecked")
+ Stack<Integer> currentBreakPositionsCopy = (Stack<Integer>) currentBreakPositions.clone();
+
+ bestBreakPositions = currentBreakPositionsCopy;
}
// wrongBreakPositions is a list of all break positions
@@ -448,7 +452,7 @@
}
else {
if ((currentBreakPositions.size() == 0 ||
- ((Integer)(currentBreakPositions.peek())).intValue() != text.getIndex())
+ currentBreakPositions.peek().intValue() != text.getIndex())
&& text.getIndex() != startPos) {
currentBreakPositions.push(new Integer(text.getIndex()));
}
@@ -463,15 +467,15 @@
// it. Then back up to that position and start over from there (i.e.,
// treat that position as the beginning of a new word)
else {
- Integer temp = (Integer)possibleBreakPositions.pop();
- Object temp2 = null;
+ Integer temp = possibleBreakPositions.pop();
+ Integer temp2 = null;
while (!currentBreakPositions.isEmpty() && temp.intValue() <
- ((Integer)currentBreakPositions.peek()).intValue()) {
+ currentBreakPositions.peek().intValue()) {
temp2 = currentBreakPositions.pop();
wrongBreakPositions.addElement(temp2);
}
currentBreakPositions.push(temp);
- text.setIndex(((Integer)currentBreakPositions.peek()).intValue());
+ text.setIndex(currentBreakPositions.peek().intValue());
}
// re-sync "c" for the next go-round, and drop out of the loop if
@@ -507,7 +511,7 @@
cachedBreakPositions[0] = startPos;
for (int i = 0; i < currentBreakPositions.size(); i++) {
- cachedBreakPositions[i + 1] = ((Integer)currentBreakPositions.elementAt(i)).intValue();
+ cachedBreakPositions[i + 1] = currentBreakPositions.elementAt(i).intValue();
}
positionInCache = 0;
}
diff --git a/src/share/classes/java/text/MergeCollation.java b/src/share/classes/java/text/MergeCollation.java
index d764f03..1a07fe5 100644
--- a/src/share/classes/java/text/MergeCollation.java
+++ b/src/share/classes/java/text/MergeCollation.java
@@ -88,19 +88,19 @@
public String getPattern(boolean withWhiteSpace) {
StringBuffer result = new StringBuffer();
PatternEntry tmp = null;
- ArrayList extList = null;
+ ArrayList<PatternEntry> extList = null;
int i;
for (i = 0; i < patterns.size(); ++i) {
- PatternEntry entry = (PatternEntry) patterns.get(i);
+ PatternEntry entry = patterns.get(i);
if (entry.extension.length() != 0) {
if (extList == null)
- extList = new ArrayList();
+ extList = new ArrayList<>();
extList.add(entry);
} else {
if (extList != null) {
PatternEntry last = findLastWithNoExtension(i-1);
for (int j = extList.size() - 1; j >= 0 ; j--) {
- tmp = (PatternEntry)(extList.get(j));
+ tmp = extList.get(j);
tmp.addToBuffer(result, false, withWhiteSpace, last);
}
extList = null;
@@ -111,7 +111,7 @@
if (extList != null) {
PatternEntry last = findLastWithNoExtension(i-1);
for (int j = extList.size() - 1; j >= 0 ; j--) {
- tmp = (PatternEntry)(extList.get(j));
+ tmp = extList.get(j);
tmp.addToBuffer(result, false, withWhiteSpace, last);
}
extList = null;
@@ -121,7 +121,7 @@
private final PatternEntry findLastWithNoExtension(int i) {
for (--i;i >= 0; --i) {
- PatternEntry entry = (PatternEntry) patterns.get(i);
+ PatternEntry entry = patterns.get(i);
if (entry.extension.length() == 0) {
return entry;
}
@@ -149,7 +149,7 @@
StringBuffer result = new StringBuffer();
for (int i = 0; i < patterns.size(); ++i)
{
- PatternEntry entry = (PatternEntry) patterns.get(i);
+ PatternEntry entry = patterns.get(i);
if (entry != null) {
entry.addToBuffer(result, true, withWhiteSpace, null);
}
@@ -198,13 +198,13 @@
* @return the requested pattern entry
*/
public PatternEntry getItemAt(int index) {
- return (PatternEntry) patterns.get(index);
+ return patterns.get(index);
}
//============================================================
// privates
//============================================================
- ArrayList patterns = new ArrayList(); // a list of PatternEntries
+ ArrayList<PatternEntry> patterns = new ArrayList<>(); // a list of PatternEntries
private transient PatternEntry saveEntry = null;
private transient PatternEntry lastEntry = null;
@@ -326,7 +326,7 @@
} else {
int i;
for (i = patterns.size() - 1; i >= 0; --i) {
- PatternEntry e = (PatternEntry) patterns.get(i);
+ PatternEntry e = patterns.get(i);
if (e.chars.regionMatches(0,entry.chars,0,
e.chars.length())) {
excessChars.append(entry.chars.substring(e.chars.length(),
diff --git a/src/share/classes/java/text/MessageFormat.java b/src/share/classes/java/text/MessageFormat.java
index 6590e76..0b7b1fa 100644
--- a/src/share/classes/java/text/MessageFormat.java
+++ b/src/share/classes/java/text/MessageFormat.java
@@ -422,6 +422,7 @@
* @param pattern the pattern for this message format
* @exception IllegalArgumentException if the pattern is invalid
*/
+ @SuppressWarnings("fallthrough") // fallthrough in switch is expected, suppress it
public void applyPattern(String pattern) {
StringBuilder[] segments = new StringBuilder[4];
// Allocate only segments[SEG_RAW] here. The rest are
@@ -897,7 +898,7 @@
*/
public AttributedCharacterIterator formatToCharacterIterator(Object arguments) {
StringBuffer result = new StringBuffer();
- ArrayList iterators = new ArrayList();
+ ArrayList<AttributedCharacterIterator> iterators = new ArrayList<>();
if (arguments == null) {
throw new NullPointerException(
@@ -908,7 +909,7 @@
return createAttributedCharacterIterator("");
}
return createAttributedCharacterIterator(
- (AttributedCharacterIterator[])iterators.toArray(
+ iterators.toArray(
new AttributedCharacterIterator[iterators.size()]));
}
@@ -1074,14 +1075,14 @@
MessageFormat other = (MessageFormat) super.clone();
// clone arrays. Can't do with utility because of bug in Cloneable
- other.formats = (Format[]) formats.clone(); // shallow clone
+ other.formats = formats.clone(); // shallow clone
for (int i = 0; i < formats.length; ++i) {
if (formats[i] != null)
other.formats[i] = (Format)formats[i].clone();
}
// for primitives or immutables, shallow clone is enough
- other.offsets = (int[]) offsets.clone();
- other.argumentNumbers = (int[]) argumentNumbers.clone();
+ other.offsets = offsets.clone();
+ other.argumentNumbers = argumentNumbers.clone();
return other;
}
@@ -1224,7 +1225,7 @@
* expected by the format element(s) that use it.
*/
private StringBuffer subformat(Object[] arguments, StringBuffer result,
- FieldPosition fp, List characterIterators) {
+ FieldPosition fp, List<AttributedCharacterIterator> characterIterators) {
// note: this implementation assumes a fast substring & index.
// if this is not true, would be better to append chars one by one.
int lastOffset = 0;
diff --git a/src/share/classes/java/text/NumberFormat.java b/src/share/classes/java/text/NumberFormat.java
index 59f8e1f..43dfea4 100644
--- a/src/share/classes/java/text/NumberFormat.java
+++ b/src/share/classes/java/text/NumberFormat.java
@@ -756,7 +756,7 @@
}
/* try the cache first */
- String[] numberPatterns = (String[])cachedLocaleData.get(desiredLocale);
+ String[] numberPatterns = cachedLocaleData.get(desiredLocale);
if (numberPatterns == null) { /* cache miss */
ResourceBundle resource = LocaleData.getNumberFormatData(desiredLocale);
numberPatterns = resource.getStringArray("NumberPatterns");
@@ -844,7 +844,7 @@
/**
* Cache to hold the NumberPatterns of a Locale.
*/
- private static final Hashtable cachedLocaleData = new Hashtable(3);
+ private static final Hashtable<Locale, String[]> cachedLocaleData = new Hashtable<>(3);
// Constants used by factory methods to specify a style of format.
private static final int NUMBERSTYLE = 0;
@@ -1035,7 +1035,7 @@
private static final long serialVersionUID = 7494728892700160890L;
// table of all instances in this class, used by readResolve
- private static final Map instanceMap = new HashMap(11);
+ private static final Map<String, Field> instanceMap = new HashMap<>(11);
/**
* Creates a Field instance with the specified
diff --git a/src/share/classes/java/text/ParseException.java b/src/share/classes/java/text/ParseException.java
index ee0fd5c..abcebfd 100644
--- a/src/share/classes/java/text/ParseException.java
+++ b/src/share/classes/java/text/ParseException.java
@@ -49,6 +49,8 @@
public
class ParseException extends Exception {
+ private static final long serialVersionUID = 2703218443322787634L;
+
/**
* Constructs a ParseException with the specified detail message and
* offset.
diff --git a/src/share/classes/java/text/RBCollationTables.java b/src/share/classes/java/text/RBCollationTables.java
index 321e1c1..aa349e6 100644
--- a/src/share/classes/java/text/RBCollationTables.java
+++ b/src/share/classes/java/text/RBCollationTables.java
@@ -112,8 +112,8 @@
void fillInTables(boolean f2ary,
boolean swap,
UCompactIntArray map,
- Vector cTbl,
- Vector eTbl,
+ Vector<Vector<EntryPair>> cTbl,
+ Vector<int[]> eTbl,
IntHashtable cFlgs,
short mso,
short mto) {
@@ -155,18 +155,18 @@
* table.
* @param ch the starting character of the contracting string
*/
- Vector getContractValues(int ch)
+ Vector<EntryPair> getContractValues(int ch)
{
int index = mapping.elementAt(ch);
return getContractValuesImpl(index - CONTRACTCHARINDEX);
}
//get contract values from contractTable by index
- private Vector getContractValuesImpl(int index)
+ private Vector<EntryPair> getContractValuesImpl(int index)
{
if (index >= 0)
{
- return (Vector)contractTable.elementAt(index);
+ return contractTable.elementAt(index);
}
else // not found
{
@@ -202,7 +202,7 @@
// this could cause a performance problem, but in practise that
// rarely happens
for (int i = 0; i < expandTable.size(); i++) {
- int[] valueList = (int [])expandTable.elementAt(i);
+ int[] valueList = expandTable.elementAt(i);
int length = valueList.length;
if (length > result && valueList[length-1] == order) {
@@ -220,7 +220,7 @@
* @param idx the index of the expanding string value list
*/
final int[] getExpandValueList(int order) {
- return (int[])expandTable.elementAt(order - EXPANDCHARINDEX);
+ return expandTable.elementAt(order - EXPANDCHARINDEX);
}
/**
@@ -260,9 +260,9 @@
}
}
- final static int getEntry(Vector list, String name, boolean fwd) {
+ final static int getEntry(Vector<EntryPair> list, String name, boolean fwd) {
for (int i = 0; i < list.size(); i++) {
- EntryPair pair = (EntryPair)list.elementAt(i);
+ EntryPair pair = list.elementAt(i);
if (pair.fwd == fwd && pair.entryName.equals(name)) {
return i;
}
@@ -294,8 +294,8 @@
private boolean seAsianSwapping = false;
private UCompactIntArray mapping = null;
- private Vector contractTable = null;
- private Vector expandTable = null;
+ private Vector<Vector<EntryPair>> contractTable = null;
+ private Vector<int[]> expandTable = null;
private IntHashtable contractFlags = null;
private short maxSecOrder = 0;
diff --git a/src/share/classes/java/text/RBTableBuilder.java b/src/share/classes/java/text/RBTableBuilder.java
index fe35ab5..a788729 100644
--- a/src/share/classes/java/text/RBTableBuilder.java
+++ b/src/share/classes/java/text/RBTableBuilder.java
@@ -85,7 +85,7 @@
throw new ParseException("Build rules empty.", 0);
// This array maps Unicode characters to their collation ordering
- mapping = new UCompactIntArray((int)RBCollationTables.UNMAPPED);
+ mapping = new UCompactIntArray(RBCollationTables.UNMAPPED);
// Normalize the build rules. Find occurances of all decomposed characters
// and normalize the rules before feeding into the builder. By "normalize",
// we mean that all precomposed Unicode characters must be converted into
@@ -263,7 +263,7 @@
{
if (expandTable != null) {
for (int i = 0; i < expandTable.size(); i++) {
- int[] valueList = (int [])expandTable.elementAt(i);
+ int[] valueList = expandTable.elementAt(i);
for (int j = 0; j < valueList.length; j++) {
int order = valueList[j];
if (order < RBCollationTables.EXPANDCHARINDEX && order > CHARINDEX) {
@@ -354,7 +354,7 @@
boolean fwd)
{
if (contractTable == null) {
- contractTable = new Vector(INITIALTABLESIZE);
+ contractTable = new Vector<>(INITIALTABLESIZE);
}
//initial character
@@ -366,12 +366,12 @@
*/
// See if the initial character of the string already has a contract table.
int entry = mapping.elementAt(ch);
- Vector entryTable = getContractValuesImpl(entry - RBCollationTables.CONTRACTCHARINDEX);
+ Vector<EntryPair> entryTable = getContractValuesImpl(entry - RBCollationTables.CONTRACTCHARINDEX);
if (entryTable == null) {
// We need to create a new table of contract entries for this base char
int tableIndex = RBCollationTables.CONTRACTCHARINDEX + contractTable.size();
- entryTable = new Vector(INITIALTABLESIZE);
+ entryTable = new Vector<>(INITIALTABLESIZE);
contractTable.addElement(entryTable);
// Add the initial character's current ordering first. then
@@ -383,10 +383,10 @@
// Now add (or replace) this string in the table
int index = RBCollationTables.getEntry(entryTable, groupChars, fwd);
if (index != RBCollationTables.UNMAPPED) {
- EntryPair pair = (EntryPair) entryTable.elementAt(index);
+ EntryPair pair = entryTable.elementAt(index);
pair.value = anOrder;
} else {
- EntryPair pair = (EntryPair)entryTable.lastElement();
+ EntryPair pair = entryTable.lastElement();
// NOTE: This little bit of logic is here to speed CollationElementIterator
// .nextContractChar(). This code ensures that the longest sequence in
@@ -426,11 +426,11 @@
int ch = Character.isHighSurrogate(ch0)?
Character.toCodePoint(ch0, groupChars.charAt(1)):ch0;
*/
- Vector entryTable = getContractValues(ch);
+ Vector<EntryPair> entryTable = getContractValues(ch);
if (entryTable != null) {
int index = RBCollationTables.getEntry(entryTable, groupChars, true);
if (index != RBCollationTables.UNMAPPED) {
- EntryPair pair = (EntryPair) entryTable.elementAt(index);
+ EntryPair pair = entryTable.elementAt(index);
result = pair.value;
}
}
@@ -442,8 +442,8 @@
int order = mapping.elementAt(ch);
if (order >= RBCollationTables.CONTRACTCHARINDEX) {
- Vector groupList = getContractValuesImpl(order - RBCollationTables.CONTRACTCHARINDEX);
- EntryPair pair = (EntryPair)groupList.firstElement();
+ Vector<EntryPair> groupList = getContractValuesImpl(order - RBCollationTables.CONTRACTCHARINDEX);
+ EntryPair pair = groupList.firstElement();
order = pair.value;
}
return order;
@@ -454,17 +454,17 @@
* table.
* @param ch the starting character of the contracting string
*/
- private Vector getContractValues(int ch)
+ private Vector<EntryPair> getContractValues(int ch)
{
int index = mapping.elementAt(ch);
return getContractValuesImpl(index - RBCollationTables.CONTRACTCHARINDEX);
}
- private Vector getContractValuesImpl(int index)
+ private Vector<EntryPair> getContractValuesImpl(int index)
{
if (index >= 0)
{
- return (Vector)contractTable.elementAt(index);
+ return contractTable.elementAt(index);
}
else // not found
{
@@ -513,7 +513,7 @@
*/
private int addExpansion(int anOrder, String expandChars) {
if (expandTable == null) {
- expandTable = new Vector(INITIALTABLESIZE);
+ expandTable = new Vector<>(INITIALTABLESIZE);
}
// If anOrder is valid, we want to add it at the beginning of the list
@@ -610,8 +610,8 @@
private boolean seAsianSwapping = false;
private UCompactIntArray mapping = null;
- private Vector contractTable = null;
- private Vector expandTable = null;
+ private Vector<Vector<EntryPair>> contractTable = null;
+ private Vector<int[]> expandTable = null;
private short maxSecOrder = 0;
private short maxTerOrder = 0;
diff --git a/src/share/classes/java/text/RuleBasedBreakIterator.java b/src/share/classes/java/text/RuleBasedBreakIterator.java
index 201eee7..7f1c1b8 100644
--- a/src/share/classes/java/text/RuleBasedBreakIterator.java
+++ b/src/share/classes/java/text/RuleBasedBreakIterator.java
@@ -444,9 +444,9 @@
BufferedInputStream is;
try {
- is = (BufferedInputStream)AccessController.doPrivileged(
- new PrivilegedExceptionAction() {
- public Object run() throws Exception {
+ is = AccessController.doPrivileged(
+ new PrivilegedExceptionAction<BufferedInputStream>() {
+ public BufferedInputStream run() throws Exception {
return new BufferedInputStream(getClass().getResourceAsStream("/sun/text/resources/" + datafile));
}
}
diff --git a/src/share/classes/sun/security/krb5/KdcComm.java b/src/share/classes/sun/security/krb5/KdcComm.java
index 281cac4..756beb9 100644
--- a/src/share/classes/sun/security/krb5/KdcComm.java
+++ b/src/share/classes/sun/security/krb5/KdcComm.java
@@ -365,37 +365,36 @@
for (int i=1; i <= retries; i++) {
String proto = useTCP?"TCP":"UDP";
- NetClient kdcClient = NetClient.getInstance(
- proto, kdc, port, timeout);
- if (DEBUG) {
- System.out.println(">>> KDCCommunication: kdc=" + kdc
- + " " + proto + ":"
- + port + ", timeout="
- + timeout
- + ",Attempt =" + i
- + ", #bytes=" + obuf.length);
- }
- try {
- /*
- * Send the data to the kdc.
- */
- kdcClient.send(obuf);
- /*
- * And get a response.
- */
- ibuf = kdcClient.receive();
- break;
- } catch (SocketTimeoutException se) {
+ try (NetClient kdcClient = NetClient.getInstance(
+ proto, kdc, port, timeout)) {
if (DEBUG) {
- System.out.println ("SocketTimeOutException with " +
- "attempt: " + i);
+ System.out.println(">>> KDCCommunication: kdc=" + kdc
+ + " " + proto + ":"
+ + port + ", timeout="
+ + timeout
+ + ",Attempt =" + i
+ + ", #bytes=" + obuf.length);
}
- if (i == retries) {
- ibuf = null;
- throw se;
+ try {
+ /*
+ * Send the data to the kdc.
+ */
+ kdcClient.send(obuf);
+ /*
+ * And get a response.
+ */
+ ibuf = kdcClient.receive();
+ break;
+ } catch (SocketTimeoutException se) {
+ if (DEBUG) {
+ System.out.println ("SocketTimeOutException with " +
+ "attempt: " + i);
+ }
+ if (i == retries) {
+ ibuf = null;
+ throw se;
+ }
}
- } finally {
- kdcClient.close();
}
}
return ibuf;
diff --git a/src/share/classes/sun/security/krb5/internal/NetClient.java b/src/share/classes/sun/security/krb5/internal/NetClient.java
index 2e9da75..f7f300d 100644
--- a/src/share/classes/sun/security/krb5/internal/NetClient.java
+++ b/src/share/classes/sun/security/krb5/internal/NetClient.java
@@ -34,7 +34,7 @@
import java.io.*;
import java.net.*;
-public abstract class NetClient {
+public abstract class NetClient implements AutoCloseable {
public static NetClient getInstance(String protocol, String hostname, int port,
int timeout) throws IOException {
if (protocol.equals("TCP")) {
@@ -45,9 +45,7 @@
}
abstract public void send(byte[] data) throws IOException;
-
abstract public byte[] receive() throws IOException;
-
abstract public void close() throws IOException;
}
@@ -190,6 +188,7 @@
iport = port;
dgSocket = new DatagramSocket();
dgSocket.setSoTimeout(timeout);
+ dgSocket.connect(iaddr, iport);
}
@Override
@@ -207,6 +206,9 @@
dgSocket.receive(dgPacketIn);
}
catch (SocketException e) {
+ if (e instanceof PortUnreachableException) {
+ throw e;
+ }
dgSocket.receive(dgPacketIn);
}
byte[] data = new byte[dgPacketIn.getLength()];
diff --git a/src/share/classes/sun/text/resources/FormatData_sl.java b/src/share/classes/sun/text/resources/FormatData_sl.java
index e51b739..949d750 100644
--- a/src/share/classes/sun/text/resources/FormatData_sl.java
+++ b/src/share/classes/sun/text/resources/FormatData_sl.java
@@ -131,8 +131,8 @@
"H:mm:ss z", // long time pattern
"H:mm:ss", // medium time pattern
"H:mm", // short time pattern
- "EEEE, d MMMM yyyy", // full date pattern
- "EEEE, d MMMM yyyy", // long date pattern
+ "EEEE, dd. MMMM y", // full date pattern
+ "dd. MMMM y", // long date pattern
"d.M.yyyy", // medium date pattern
"d.M.y", // short date pattern
"{1} {0}" // date-time pattern
diff --git a/src/share/classes/sun/tools/jconsole/AboutDialog.java b/src/share/classes/sun/tools/jconsole/AboutDialog.java
index f6b7c5a..1d91d53 100644
--- a/src/share/classes/sun/tools/jconsole/AboutDialog.java
+++ b/src/share/classes/sun/tools/jconsole/AboutDialog.java
@@ -30,13 +30,12 @@
import java.beans.PropertyVetoException;
import java.net.URI;
-import javax.accessibility.*;
import javax.swing.*;
import javax.swing.border.*;
import javax.swing.event.*;
+
import static java.awt.BorderLayout.*;
-import static sun.tools.jconsole.Resources.*;
import static sun.tools.jconsole.Utilities.*;
@SuppressWarnings("serial")
@@ -47,7 +46,7 @@
private static final Color borderColor = Color.black;
private Icon mastheadIcon =
- new MastheadIcon(getText("Help.AboutDialog.masthead.title"));
+ new MastheadIcon(Messages.HELP_ABOUT_DIALOG_MASTHEAD_TITLE);
private static AboutDialog aboutDialog;
@@ -55,10 +54,9 @@
private Action closeAction;
public AboutDialog(JConsole jConsole) {
- super(jConsole, Resources.getText("Help.AboutDialog.title"), false);
+ super(jConsole, Messages.HELP_ABOUT_DIALOG_TITLE, false);
- setAccessibleDescription(this,
- getText("Help.AboutDialog.accessibleDescription"));
+ setAccessibleDescription(this, Messages.HELP_ABOUT_DIALOG_ACCESSIBLE_DESCRIPTION);
setDefaultCloseOperation(HIDE_ON_CLOSE);
setResizable(false);
JComponent cp = (JComponent)getContentPane();
@@ -67,7 +65,7 @@
JLabel mastheadLabel = new JLabel(mastheadIcon);
setAccessibleName(mastheadLabel,
- getText("Help.AboutDialog.masthead.accessibleName"));
+ Messages.HELP_ABOUT_DIALOG_MASTHEAD_ACCESSIBLE_NAME);
JPanel mainPanel = new TPanel(0, 0);
mainPanel.add(mastheadLabel, NORTH);
@@ -75,7 +73,7 @@
String jConsoleVersion = Version.getVersion();
String vmName = System.getProperty("java.vm.name");
String vmVersion = System.getProperty("java.vm.version");
- String urlStr = getText("Help.AboutDialog.userGuideLink.url");
+ String urlStr = Messages.HELP_ABOUT_DIALOG_USER_GUIDE_LINK_URL;
if (isBrowseSupported()) {
urlStr = "<a style='color:#35556b' href=\"" + urlStr + "\">" + urlStr + "</a>";
}
@@ -86,9 +84,9 @@
String colorStr = String.format("%06x", textColor.getRGB() & 0xFFFFFF);
JEditorPane helpLink = new JEditorPane("text/html",
"<html><font color=#"+ colorStr + ">" +
- getText("Help.AboutDialog.jConsoleVersion", jConsoleVersion) +
- "<p>" + getText("Help.AboutDialog.javaVersion", (vmName +", "+ vmVersion)) +
- "<p>" + getText("Help.AboutDialog.userGuideLink", urlStr) +
+ Resources.format(Messages.HELP_ABOUT_DIALOG_JCONSOLE_VERSION, jConsoleVersion) +
+ "<p>" + Resources.format(Messages.HELP_ABOUT_DIALOG_JAVA_VERSION, (vmName +", "+ vmVersion)) +
+ "<p>" + Resources.format(Messages.HELP_ABOUT_DIALOG_USER_GUIDE_LINK, urlStr) +
"</html>");
helpLink.setOpaque(false);
helpLink.setEditable(false);
@@ -155,7 +153,7 @@
}
static void browseUserGuide(JConsole jConsole) {
- getAboutDialog(jConsole).browse(getText("Help.AboutDialog.userGuideLink.url"));
+ getAboutDialog(jConsole).browse(Messages.HELP_ABOUT_DIALOG_USER_GUIDE_LINK_URL);
}
static boolean isBrowseSupported() {
@@ -176,7 +174,7 @@
}
private void createActions() {
- closeAction = new AbstractAction(getText("Close")) {
+ closeAction = new AbstractAction(Messages.CLOSE) {
public void actionPerformed(ActionEvent ev) {
setVisible(false);
statusBar.setText("");
diff --git a/src/share/classes/sun/tools/jconsole/BorderedComponent.java b/src/share/classes/sun/tools/jconsole/BorderedComponent.java
index 5b45d74..57549ec 100644
--- a/src/share/classes/sun/tools/jconsole/BorderedComponent.java
+++ b/src/share/classes/sun/tools/jconsole/BorderedComponent.java
@@ -33,11 +33,10 @@
import javax.swing.plaf.*;
import javax.swing.plaf.basic.BasicGraphicsUtils;
+
import static javax.swing.SwingConstants.*;
import static sun.tools.jconsole.JConsole.*;
-import static sun.tools.jconsole.Resources.*;
-import static sun.tools.jconsole.Utilities.*;
@SuppressWarnings("serial")
public class BorderedComponent extends JPanel implements ActionListener {
@@ -47,8 +46,6 @@
JComponent comp;
boolean collapsed = false;
- private JPopupMenu popupMenu;
-
private Icon collapseIcon;
private Icon expandIcon;
@@ -100,7 +97,7 @@
moreOrLessButton.setMargin(new Insets(0, 0, 0, 0));
moreOrLessButton.addActionListener(this);
String toolTip =
- getText("BorderedComponent.moreOrLessButton.toolTip");
+ Messages.BORDERED_COMPONENT_MORE_OR_LESS_BUTTON_TOOLTIP;
moreOrLessButton.setToolTipText(toolTip);
borderLabel.add(moreOrLessButton);
borderLabel.setSize(borderLabel.getPreferredSize());
@@ -136,7 +133,8 @@
public void setValueLabel(String str) {
this.valueLabelStr = str;
if (label != null) {
- label.setText(Resources.getText("Current value",valueLabelStr));
+ label.setText(Resources.format(Messages.CURRENT_VALUE,
+ valueLabelStr));
}
}
@@ -151,8 +149,8 @@
remove(comp);
if (valueLabelStr != null) {
if (label == null) {
- label = new JLabel(Resources.getText("Current value",
- valueLabelStr));
+ label = new JLabel(Resources.format(Messages.CURRENT_VALUE,
+ valueLabelStr));
}
add(label);
}
@@ -439,8 +437,6 @@
* @param insets the object to be reinitialized
*/
public Insets getBorderInsets(Component c, Insets insets) {
- int height = 16;
-
Border border = getBorder();
if (border != null) {
if (border instanceof AbstractBorder) {
diff --git a/src/share/classes/sun/tools/jconsole/ClassTab.java b/src/share/classes/sun/tools/jconsole/ClassTab.java
index c47ccbc..b192b9f 100644
--- a/src/share/classes/sun/tools/jconsole/ClassTab.java
+++ b/src/share/classes/sun/tools/jconsole/ClassTab.java
@@ -33,17 +33,11 @@
import javax.swing.*;
import javax.swing.border.*;
-import javax.swing.event.*;
-import javax.swing.text.*;
-import java.util.*;
-import java.util.List;
+
import java.util.concurrent.*;
-import sun.awt.*;
-
import static sun.tools.jconsole.Formatter.*;
-import static sun.tools.jconsole.Resources.*;
import static sun.tools.jconsole.Utilities.*;
@@ -58,13 +52,9 @@
private static final String loadedPlotterKey = "loaded";
private static final String totalLoadedPlotterKey = "totalLoaded";
- private static final String loadedPlotterName = Resources.getText("Loaded");
- private static final String totalLoadedPlotterName = Resources.getText("Total Loaded");
private static final Color loadedPlotterColor = Plotter.defaultColor;
private static final Color totalLoadedPlotterColor = Color.red;
- private static final String infoLabelFormat = "ClassTab.infoLabelFormat";
-
/*
Hierarchy of panels and layouts for this tab:
@@ -88,7 +78,7 @@
*/
public static String getTabName() {
- return Resources.getText("Classes");
+ return Messages.CLASSES;
}
public ClassTab(VMPanel vmPanel) {
@@ -108,40 +98,40 @@
JPanel controlPanel = new JPanel(new FlowLayout(FlowLayout.CENTER, 20, 5));
topPanel.add(controlPanel, BorderLayout.CENTER);
- verboseCheckBox = new JCheckBox(Resources.getText("Verbose Output"));
+ verboseCheckBox = new JCheckBox(Messages.VERBOSE_OUTPUT);
verboseCheckBox.addActionListener(this);
- verboseCheckBox.setToolTipText(getText("Verbose Output.toolTip"));
+ verboseCheckBox.setToolTipText(Messages.VERBOSE_OUTPUT_TOOLTIP);
JPanel topRightPanel = new JPanel();
topRightPanel.setBorder(new EmptyBorder(0, 65-8, 0, 70));
topRightPanel.add(verboseCheckBox);
topPanel.add(topRightPanel, BorderLayout.AFTER_LINE_ENDS);
- loadedClassesMeter = new PlotterPanel(Resources.getText("Number of Loaded Classes"),
+ loadedClassesMeter = new PlotterPanel(Messages.NUMBER_OF_LOADED_CLASSES,
Plotter.Unit.NONE, false);
loadedClassesMeter.plotter.createSequence(loadedPlotterKey,
- loadedPlotterName,
+ Messages.LOADED,
loadedPlotterColor,
true);
loadedClassesMeter.plotter.createSequence(totalLoadedPlotterKey,
- totalLoadedPlotterName,
+ Messages.TOTAL_LOADED,
totalLoadedPlotterColor,
true);
setAccessibleName(loadedClassesMeter.plotter,
- getText("ClassTab.loadedClassesPlotter.accessibleName"));
+ Messages.CLASS_TAB_LOADED_CLASSES_PLOTTER_ACCESSIBLE_NAME);
plotterPanel.add(loadedClassesMeter);
timeComboBox = new TimeComboBox(loadedClassesMeter.plotter);
- controlPanel.add(new LabeledComponent(Resources.getText("Time Range:"),
- getMnemonicInt("Time Range:"),
+ controlPanel.add(new LabeledComponent(Messages.TIME_RANGE_COLON,
+ Resources.getMnemonicInt(Messages.TIME_RANGE_COLON),
timeComboBox));
LabeledComponent.layout(plotterPanel);
- bottomPanel.setBorder(new CompoundBorder(new TitledBorder(Resources.getText("Details")),
- new EmptyBorder(10, 10, 10, 10)));
+ bottomPanel.setBorder(new CompoundBorder(new TitledBorder(Messages.DETAILS),
+ new EmptyBorder(10, 10, 10, 10)));
details = new HTMLPane();
- setAccessibleName(details, getText("Details"));
+ setAccessibleName(details, Messages.DETAILS);
JScrollPane scrollPane = new JScrollPane(details);
scrollPane.setPreferredSize(new Dimension(0, 150));
bottomPanel.add(scrollPane, BorderLayout.SOUTH);
@@ -226,10 +216,10 @@
long time = System.currentTimeMillis();
String timeStamp = formatDateTime(time);
- text += newRow(Resources.getText("Time"), timeStamp);
- text += newRow(Resources.getText("Current classes loaded"), justify(clCount, 5));
- text += newRow(Resources.getText("Total classes loaded"), justify(ctCount, 5));
- text += newRow(Resources.getText("Total classes unloaded"), justify(cuCount, 5));
+ text += newRow(Messages.TIME, timeStamp);
+ text += newRow(Messages.CURRENT_CLASSES_LOADED, justify(clCount, 5));
+ text += newRow(Messages.TOTAL_CLASSES_LOADED, justify(ctCount, 5));
+ text += newRow(Messages.TOTAL_CLASSES_UNLOADED, justify(cuCount, 5));
return text;
}
@@ -246,12 +236,13 @@
private static class ClassOverviewPanel extends OverviewPanel {
ClassOverviewPanel() {
- super(getText("Classes"), loadedPlotterKey, loadedPlotterName, null);
+ super(Messages.CLASSES, loadedPlotterKey, Messages.LOADED, null);
}
private void updateClassInfo(long total, long loaded) {
long unloaded = (total - loaded);
- getInfoLabel().setText(getText(infoLabelFormat, loaded, unloaded, total));
+ getInfoLabel().setText(Resources.format(Messages.CLASS_TAB_INFO_LABEL_FORMAT,
+ loaded, unloaded, total));
}
}
}
diff --git a/src/share/classes/sun/tools/jconsole/ConnectDialog.java b/src/share/classes/sun/tools/jconsole/ConnectDialog.java
index 2bdd501..ea63667 100644
--- a/src/share/classes/sun/tools/jconsole/ConnectDialog.java
+++ b/src/share/classes/sun/tools/jconsole/ConnectDialog.java
@@ -29,23 +29,17 @@
import java.awt.*;
import java.awt.event.*;
import java.util.*;
-import java.net.MalformedURLException;
-import java.io.IOException;
-import javax.accessibility.*;
import javax.swing.*;
-import javax.swing.Timer;
import javax.swing.border.*;
import javax.swing.event.*;
import javax.swing.plaf.basic.BasicRadioButtonUI;
import javax.swing.table.*;
-import javax.management.remote.JMXServiceURL;
-import javax.management.remote.JMXConnector;
+
import static java.awt.BorderLayout.*;
import static javax.swing.ListSelectionModel.*;
-import static sun.tools.jconsole.Resources.*;
import static sun.tools.jconsole.Utilities.*;
@SuppressWarnings("serial")
@@ -66,7 +60,7 @@
JPanel radioButtonPanel;
private Icon mastheadIcon =
- new MastheadIcon(getText("ConnectDialog.masthead.title"));
+ new MastheadIcon(Messages.CONNECT_DIALOG_MASTHEAD_TITLE);
private Color hintTextColor, disabledTableCellColor;
// The table of managed VM (local process)
@@ -79,11 +73,11 @@
public ConnectDialog(JConsole jConsole) {
- super(jConsole, Resources.getText("ConnectDialog.title"), true);
+ super(jConsole, Messages.CONNECT_DIALOG_TITLE, true);
this.jConsole = jConsole;
setAccessibleDescription(this,
- getText("ConnectDialog.accessibleDescription"));
+ Messages.CONNECT_DIALOG_ACCESSIBLE_DESCRIPTION);
setDefaultCloseOperation(HIDE_ON_CLOSE);
setResizable(false);
Container cp = (JComponent)getContentPane();
@@ -95,7 +89,7 @@
statusBar = new JLabel(" ", JLabel.CENTER);
setAccessibleName(statusBar,
- getText("ConnectDialog.statusBar.accessibleName"));
+ Messages.CONNECT_DIALOG_STATUS_BAR_ACCESSIBLE_NAME);
Font normalLabelFont = statusBar.getFont();
Font boldLabelFont = normalLabelFont.deriveFont(Font.BOLD);
@@ -103,7 +97,7 @@
JLabel mastheadLabel = new JLabel(mastheadIcon);
setAccessibleName(mastheadLabel,
- getText("ConnectDialog.masthead.accessibleName"));
+ Messages.CONNECT_DIALOG_MASTHEAD_ACCESSIBLE_NAME);
cp.add(mastheadLabel, NORTH);
cp.add(radioButtonPanel, CENTER);
@@ -117,7 +111,7 @@
remoteTF.addFocusListener(this);
remoteTF.setPreferredSize(remoteTF.getPreferredSize());
setAccessibleName(remoteTF,
- getText("Remote Process.textField.accessibleName"));
+ Messages.REMOTE_PROCESS_TEXT_FIELD_ACCESSIBLE_NAME);
//
// If the VM supports the local attach mechanism (is: Sun
@@ -141,8 +135,8 @@
TableColumn cmdLineColumn = columnModel.getColumn(COL_NAME);
cmdLineColumn.setResizable(false);
- localRadioButton = new JRadioButton(getText("Local Process:"));
- localRadioButton.setMnemonic(getMnemonicInt("Local Process:"));
+ localRadioButton = new JRadioButton(Messages.LOCAL_PROCESS_COLON);
+ localRadioButton.setMnemonic(Resources.getMnemonicInt(Messages.LOCAL_PROCESS_COLON));
localRadioButton.setFont(boldLabelFont);
localRadioButton.addItemListener(this);
radioButtonGroup.add(localRadioButton);
@@ -167,8 +161,8 @@
localTablePanel.add(localMessageLabel, SOUTH);
}
- remoteRadioButton = new JRadioButton(getText("Remote Process:"));
- remoteRadioButton.setMnemonic(getMnemonicInt("Remote Process:"));
+ remoteRadioButton = new JRadioButton(Messages.REMOTE_PROCESS_COLON);
+ remoteRadioButton.setMnemonic(Resources.getMnemonicInt(Messages.REMOTE_PROCESS_COLON));
remoteRadioButton.setFont(boldLabelFont);
radioButtonGroup.add(remoteRadioButton);
@@ -207,7 +201,7 @@
remoteTFPanel.add(remoteTF, NORTH);
- remoteMessageLabel = new JLabel("<html>" + getText("remoteTF.usage"));
+ remoteMessageLabel = new JLabel("<html>" + Messages.REMOTE_TF_USAGE + "</html>");
remoteMessageLabel.setFont(smallLabelFont);
remoteMessageLabel.setForeground(hintTextColor);
remoteTFPanel.add(remoteMessageLabel, CENTER);
@@ -222,11 +216,10 @@
userNameTF.getDocument().addDocumentListener(this);
userNameTF.addFocusListener(this);
setAccessibleName(userNameTF,
- getText("Username.accessibleName"));
- String labelKey = "Username: ";
+ Messages.USERNAME_ACCESSIBLE_NAME);
LabeledComponent lc;
- lc = new LabeledComponent(getText(labelKey),
- getMnemonicInt(labelKey),
+ lc = new LabeledComponent(Messages.USERNAME_COLON_,
+ Resources.getMnemonicInt(Messages.USERNAME_COLON_),
userNameTF);
lc.label.setFont(boldLabelFont);
userPwdPanel.add(lc);
@@ -238,10 +231,10 @@
passwordTF.getDocument().addDocumentListener(this);
passwordTF.addFocusListener(this);
setAccessibleName(passwordTF,
- getText("Password.accessibleName"));
- labelKey = "Password: ";
- lc = new LabeledComponent(getText(labelKey),
- getMnemonicInt(labelKey),
+ Messages.PASSWORD_ACCESSIBLE_NAME);
+
+ lc = new LabeledComponent(Messages.PASSWORD_COLON_,
+ Resources.getMnemonicInt(Messages.PASSWORD_COLON_),
passwordTF);
lc.setBorder(new EmptyBorder(0, 12, 0, 0)); // Left padding
lc.label.setFont(boldLabelFont);
@@ -250,7 +243,7 @@
remoteTFPanel.add(userPwdPanel, SOUTH);
String connectButtonToolTipText =
- getText("ConnectDialog.connectButton.toolTip");
+ Messages.CONNECT_DIALOG_CONNECT_BUTTON_TOOLTIP;
connectButton = new JButton(connectAction);
connectButton.setToolTipText(connectButtonToolTipText);
@@ -288,7 +281,7 @@
String colorStr =
String.format("%06x", hintTextColor.getRGB() & 0xFFFFFF);
remoteMessageLabel.setText("<html><font color=#" + colorStr + ">" +
- getText("remoteTF.usage"));
+ Messages.REMOTE_TF_USAGE);
}
if (localMessageLabel != null) {
localMessageLabel.setForeground(hintTextColor);
@@ -300,9 +293,9 @@
}
private void createActions() {
- connectAction = new AbstractAction(getText("Connect")) {
+ connectAction = new AbstractAction(Messages.CONNECT) {
/* init */ {
- putValue(Action.MNEMONIC_KEY, getMnemonicInt("Connect"));
+ putValue(Action.MNEMONIC_KEY, Resources.getMnemonicInt(Messages.CONNECT));
}
public void actionPerformed(ActionEvent ev) {
@@ -321,7 +314,6 @@
try {
if (txt.startsWith(JConsole.ROOT_URL)) {
String url = txt;
- String msg = null;
jConsole.addUrl(url, userName, password, false);
remoteTF.setText(JConsole.ROOT_URL);
return;
@@ -361,7 +353,7 @@
}
};
- cancelAction = new AbstractAction(getText("Cancel")) {
+ cancelAction = new AbstractAction(Messages.CANCEL) {
public void actionPerformed(ActionEvent ev) {
setVisible(false);
statusBar.setText("");
@@ -588,9 +580,9 @@
LocalVirtualMachine lvm = vmModel.vmAt(row);
if (!lvm.isManageable()) {
if (lvm.isAttachable()) {
- labelText = getText("Management Will Be Enabled");
+ labelText = Messages.MANAGEMENT_WILL_BE_ENABLED;
} else {
- labelText = getText("Management Not Enabled");
+ labelText = Messages.MANAGEMENT_NOT_ENABLED;
}
}
}
@@ -650,8 +642,8 @@
// Represents the list of managed VMs as a tabular data model.
private static class ManagedVmTableModel extends AbstractTableModel {
private static String[] columnNames = {
- Resources.getText("Column.Name"),
- Resources.getText("Column.PID"),
+ Messages.COLUMN_NAME,
+ Messages.COLUMN_PID,
};
private List<LocalVirtualMachine> vmList;
@@ -678,7 +670,7 @@
}
}
- public Class getColumnClass(int column) {
+ public Class<?> getColumnClass(int column) {
switch (column) {
case COL_NAME: return String.class;
case COL_PID: return Integer.class;
@@ -706,13 +698,6 @@
}
}
-
- // Convenience method
- private static String getText(String key) {
- return Resources.getText(key);
- }
-
-
// A blank component that takes up as much space as the
// button part of a JRadioButton.
private static class Padder extends JPanel {
@@ -721,7 +706,7 @@
Padder(JRadioButton radioButton) {
this.radioButton = radioButton;
- setAccessibleName(this, getText("Blank"));
+ setAccessibleName(this, Messages.BLANK);
}
public Dimension getPreferredSize() {
@@ -758,7 +743,6 @@
if (g == null) {
return null;
}
- String clippedText =
SwingUtilities.layoutCompoundLabel(button,
g.getFontMetrics(),
text,
diff --git a/src/share/classes/sun/tools/jconsole/CreateMBeanDialog.java b/src/share/classes/sun/tools/jconsole/CreateMBeanDialog.java
index 75c784b..7d391b8 100644
--- a/src/share/classes/sun/tools/jconsole/CreateMBeanDialog.java
+++ b/src/share/classes/sun/tools/jconsole/CreateMBeanDialog.java
@@ -32,23 +32,21 @@
import java.util.Comparator;
import javax.swing.*;
-import javax.swing.Timer;
import javax.swing.border.*;
-import javax.swing.event.*;
import javax.management.MBeanServerConnection;
import javax.management.ObjectName;
import javax.management.InstanceAlreadyExistsException;
import javax.management.InstanceNotFoundException;
-import static sun.tools.jconsole.Resources.*;
+
import static sun.tools.jconsole.Utilities.*;
@SuppressWarnings("serial")
public class CreateMBeanDialog extends InternalDialog
implements ActionListener {
JConsole jConsole;
- JComboBox connections;
+ JComboBox<ProxyClient> connections;
JButton createMBeanButton, unregisterMBeanButton, cancelButton;
private static final String HOTSPOT_MBEAN =
@@ -60,7 +58,7 @@
this.jConsole = jConsole;
setAccessibleDescription(this,
- getText("Hotspot MBeans.dialog.accessibleDescription"));
+ Messages.HOTSPOT_MBEANS_DIALOG_ACCESSIBLE_DESCRIPTION);
Container cp = getContentPane();
((JComponent)cp).setBorder(new EmptyBorder(10, 10, 4, 10));
@@ -71,12 +69,10 @@
false,
true));
cp.add(centerPanel, BorderLayout.CENTER);
- connections = new JComboBox();
+ connections = new JComboBox<ProxyClient>();
updateConnections();
- centerPanel.add(new LabeledComponent(Resources.
- getText("Manage Hotspot MBeans "+
- "in: "),
+ centerPanel.add(new LabeledComponent(Resources.format(Messages.MANAGE_HOTSPOT_MBEANS_IN_COLON_),
connections));
JPanel bottomPanel = new JPanel(new BorderLayout());
@@ -85,11 +81,11 @@
JPanel buttonPanel = new JPanel();
bottomPanel.add(buttonPanel, BorderLayout.NORTH);
buttonPanel.add(createMBeanButton =
- new JButton(Resources.getText("Create")));
+ new JButton(Messages.CREATE));
buttonPanel.add(unregisterMBeanButton =
- new JButton(Resources.getText("Unregister")));
+ new JButton(Messages.UNREGISTER));
buttonPanel.add(cancelButton =
- new JButton(Resources.getText("Cancel")));
+ new JButton(Messages.CANCEL));
statusBar = new JLabel(" ", JLabel.CENTER);
bottomPanel.add(statusBar, BorderLayout.SOUTH);
@@ -133,7 +129,8 @@
}
}
connections.invalidate();
- connections.setModel(new DefaultComboBoxModel(data.toArray()));
+ connections.setModel(new DefaultComboBoxModel<ProxyClient>
+ (data.toArray(new ProxyClient[data.size()])));
connections.validate();
}
@@ -144,7 +141,6 @@
new Thread("CreateMBeanDialog.actionPerformed") {
public void run() {
try {
- StringBuffer buff = null;
Object c = connections.getSelectedItem();
if(c == null) return;
if(ev.getSource() == createMBeanButton) {
@@ -163,13 +159,9 @@
}
return;
} catch(InstanceAlreadyExistsException e) {
- statusBar.setText(Resources.
- getText("Error: MBeans already "
- + "exist"));
+ statusBar.setText(Messages.ERROR_COLON_MBEANS_ALREADY_EXIST);
} catch(InstanceNotFoundException e) {
- statusBar.setText(Resources.
- getText("Error: MBeans do not "
- + "exist"));
+ statusBar.setText(Messages.ERROR_COLON_MBEANS_DO_NOT_EXIST);
} catch(Exception e) {
statusBar.setText(e.toString());
}
diff --git a/src/share/classes/sun/tools/jconsole/Formatter.java b/src/share/classes/sun/tools/jconsole/Formatter.java
index 46f6c0e..1192341 100644
--- a/src/share/classes/sun/tools/jconsole/Formatter.java
+++ b/src/share/classes/sun/tools/jconsole/Formatter.java
@@ -28,7 +28,6 @@
import java.text.*;
import java.util.*;
-import static sun.tools.jconsole.Resources.*;
class Formatter {
final static long SECOND = 1000;
@@ -48,7 +47,7 @@
String str;
if (t < 1 * MINUTE) {
String seconds = String.format("%.3f", t / (double)SECOND);
- str = Resources.getText("DurationSeconds", seconds);
+ str = Resources.format(Messages.DURATION_SECONDS, seconds);
} else {
long remaining = t;
long days = remaining / DAY;
@@ -58,13 +57,13 @@
long minutes = remaining / MINUTE;
if (t >= 1 * DAY) {
- str = Resources.getText("DurationDaysHoursMinutes",
- days, hours, minutes);
+ str = Resources.format(Messages.DURATION_DAYS_HOURS_MINUTES,
+ days, hours, minutes);
} else if (t >= 1 * HOUR) {
- str = Resources.getText("DurationHoursMinutes",
- hours, minutes);
+ str = Resources.format(Messages.DURATION_HOURS_MINUTES,
+ hours, minutes);
} else {
- str = Resources.getText("DurationMinutes", minutes);
+ str = Resources.format(Messages.DURATION_MINUTES, minutes);
}
}
return str;
@@ -88,8 +87,7 @@
return dateDF.format(time) + " " + timeWithSecondsDF.format(time);
}
- static DateFormat getDateTimeFormat(String key) {
- String dtfStr = getText(key);
+ static DateFormat getDateTimeFormat(String dtfStr) {
int dateStyle = -1;
int timeStyle = -1;
@@ -153,18 +151,18 @@
}
String[] strings = formatLongs(bytes);
for (int i = 0; i < n; i++) {
- strings[i] = getText("kbytes", strings[i]);
+ strings[i] = Resources.format(Messages.KBYTES, strings[i]);
}
return strings;
}
static String formatKBytes(long bytes) {
if (bytes == -1) {
- return getText("kbytes", "-1");
+ return Resources.format(Messages.KBYTES, "-1");
}
long kb = bytes / 1024;
- return getText("kbytes", justify(kb, 10));
+ return Resources.format(Messages.KBYTES, justify(kb, 10));
}
@@ -182,13 +180,13 @@
int exp = (int)Math.log10((double)vMax);
if (exp < 3) {
- s = Resources.getText("Size Bytes", v);
+ s = Resources.format(Messages.SIZE_BYTES, v);
} else if (exp < 6) {
- s = Resources.getText("Size Kb", trimDouble(v / Math.pow(10.0, 3)));
+ s = Resources.format(Messages.SIZE_KB, trimDouble(v / Math.pow(10.0, 3)));
} else if (exp < 9) {
- s = Resources.getText("Size Mb", trimDouble(v / Math.pow(10.0, 6)));
+ s = Resources.format(Messages.SIZE_MB, trimDouble(v / Math.pow(10.0, 6)));
} else {
- s = Resources.getText("Size Gb", trimDouble(v / Math.pow(10.0, 9)));
+ s = Resources.format(Messages.SIZE_GB, trimDouble(v / Math.pow(10.0, 9)));
}
if (html) {
s = s.replace(" ", " ");
diff --git a/src/share/classes/sun/tools/jconsole/HTMLPane.java b/src/share/classes/sun/tools/jconsole/HTMLPane.java
index f92623a..34c3c9b 100644
--- a/src/share/classes/sun/tools/jconsole/HTMLPane.java
+++ b/src/share/classes/sun/tools/jconsole/HTMLPane.java
@@ -25,8 +25,6 @@
package sun.tools.jconsole;
-import java.awt.Color;
-
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.text.*;
diff --git a/src/share/classes/sun/tools/jconsole/InternalDialog.java b/src/share/classes/sun/tools/jconsole/InternalDialog.java
index 736cb2f..703e626 100644
--- a/src/share/classes/sun/tools/jconsole/InternalDialog.java
+++ b/src/share/classes/sun/tools/jconsole/InternalDialog.java
@@ -30,8 +30,8 @@
import javax.swing.*;
+
import static javax.swing.JLayeredPane.*;
-import static sun.tools.jconsole.Resources.*;
/**
* Used instead of JDialog in a JDesktopPane/JInternalFrame environment.
@@ -73,7 +73,7 @@
private ImageIcon rightIcon =
new ImageIcon(InternalDialog.class.getResource("resources/masthead-right.png"));
- private Font font = Font.decode(getText("Masthead.font"));
+ private Font font = Font.decode(Messages.MASTHEAD_FONT);
private int gap = 10;
private String title;
diff --git a/src/share/classes/sun/tools/jconsole/JConsole.java b/src/share/classes/sun/tools/jconsole/JConsole.java
index bc4aa1d..443ae80 100644
--- a/src/share/classes/sun/tools/jconsole/JConsole.java
+++ b/src/share/classes/sun/tools/jconsole/JConsole.java
@@ -29,7 +29,6 @@
import java.awt.event.*;
import java.beans.*;
import java.io.*;
-import java.lang.reflect.InvocationTargetException;
import java.net.*;
import java.util.*;
import java.util.List;
@@ -38,8 +37,6 @@
import javax.swing.border.*;
import javax.swing.event.*;
import javax.swing.plaf.*;
-import javax.management.remote.JMXServiceURL;
-import javax.management.remote.JMXConnector;
import javax.security.auth.login.FailedLoginException;
import javax.net.ssl.SSLHandshakeException;
@@ -47,7 +44,6 @@
import sun.net.util.IPAddressUtil;
-import static sun.tools.jconsole.Resources.*;
import static sun.tools.jconsole.Utilities.*;
@SuppressWarnings("serial")
@@ -68,7 +64,7 @@
try {
UIManager.setLookAndFeel(systemLaF);
} catch (Exception e) {
- System.err.println(Resources.getText("JConsole: ", e.getMessage()));
+ System.err.println(Resources.format(Messages.JCONSOLE_COLON_, e.getMessage()));
}
}
}
@@ -87,7 +83,7 @@
private final static String title =
- Resources.getText("Java Monitoring & Management Console");
+ Messages.JAVA_MONITORING___MANAGEMENT_CONSOLE;
public final static String ROOT_URL =
"service:jmx:";
@@ -116,7 +112,7 @@
setRootPane(new FixedJRootPane());
setAccessibleDescription(this,
- getText("JConsole.accessibleDescription"));
+ Messages.JCONSOLE_ACCESSIBLE_DESCRIPTION);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
menuBar = new JMenuBar();
@@ -124,12 +120,12 @@
// TODO: Use Actions !
- JMenu connectionMenu = new JMenu(getText("Connection"));
- connectionMenu.setMnemonic(getMnemonicInt("Connection"));
+ JMenu connectionMenu = new JMenu(Messages.CONNECTION);
+ connectionMenu.setMnemonic(Resources.getMnemonicInt(Messages.CONNECTION));
menuBar.add(connectionMenu);
if(hotspot) {
- hotspotMI = new JMenuItem(getText("Hotspot MBeans..."));
- hotspotMI.setMnemonic(getMnemonicInt("Hotspot MBeans..."));
+ hotspotMI = new JMenuItem(Messages.HOTSPOT_MBEANS_ELLIPSIS);
+ hotspotMI.setMnemonic(Resources.getMnemonicInt(Messages.HOTSPOT_MBEANS_ELLIPSIS));
hotspotMI.setAccelerator(KeyStroke.
getKeyStroke(KeyEvent.VK_H,
InputEvent.CTRL_MASK));
@@ -139,8 +135,8 @@
connectionMenu.addSeparator();
}
- connectMI = new JMenuItem(Resources.getText("New Connection..."));
- connectMI.setMnemonic(getMnemonicInt("New Connection..."));
+ connectMI = new JMenuItem(Messages.NEW_CONNECTION_ELLIPSIS);
+ connectMI.setMnemonic(Resources.getMnemonicInt(Messages.NEW_CONNECTION_ELLIPSIS));
connectMI.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N,
InputEvent.CTRL_MASK));
connectMI.addActionListener(this);
@@ -148,27 +144,27 @@
connectionMenu.addSeparator();
- exitMI = new JMenuItem(Resources.getText("Exit"));
- exitMI.setMnemonic(getMnemonicInt("Exit"));
+ exitMI = new JMenuItem(Messages.EXIT);
+ exitMI.setMnemonic(Resources.getMnemonicInt(Messages.EXIT));
exitMI.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F4,
InputEvent.ALT_MASK));
exitMI.addActionListener(this);
connectionMenu.add(exitMI);
- JMenu helpMenu = new JMenu(getText("HelpMenu.title"));
- helpMenu.setMnemonic(getMnemonicInt("HelpMenu.title"));
+ JMenu helpMenu = new JMenu(Messages.HELP_MENU_TITLE);
+ helpMenu.setMnemonic(Resources.getMnemonicInt(Messages.HELP_MENU_TITLE));
menuBar.add(helpMenu);
if (AboutDialog.isBrowseSupported()) {
- userGuideMI = new JMenuItem(getText("HelpMenu.UserGuide.title"));
- userGuideMI.setMnemonic(getMnemonicInt("HelpMenu.UserGuide.title"));
+ userGuideMI = new JMenuItem(Messages.HELP_MENU_USER_GUIDE_TITLE);
+ userGuideMI.setMnemonic(Resources.getMnemonicInt(Messages.HELP_MENU_USER_GUIDE_TITLE));
userGuideMI.addActionListener(this);
helpMenu.add(userGuideMI);
helpMenu.addSeparator();
}
- aboutMI = new JMenuItem(getText("HelpMenu.About.title"));
- aboutMI.setMnemonic(getMnemonicInt("HelpMenu.About.title"));
+ aboutMI = new JMenuItem(Messages.HELP_MENU_ABOUT_TITLE);
+ aboutMI.setMnemonic(Resources.getMnemonicInt(Messages.HELP_MENU_ABOUT_TITLE));
aboutMI.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0));
aboutMI.addActionListener(this);
helpMenu.add(aboutMI);
@@ -191,8 +187,8 @@
((BorderLayout)cp.getLayout()).
getLayoutComponent(BorderLayout.CENTER);
- windowMenu = new WindowMenu(Resources.getText("Window"));
- windowMenu.setMnemonic(getMnemonicInt("Window"));
+ windowMenu = new WindowMenu(Messages.WINDOW);
+ windowMenu.setMnemonic(Resources.getMnemonicInt(Messages.WINDOW));
// Add Window menu before Help menu
menuBar.add(windowMenu, menuBar.getComponentCount() - 1);
@@ -219,25 +215,25 @@
WindowMenu(String text) {
super(text);
- cascadeMI = new JMenuItem(Resources.getText("Cascade"));
- cascadeMI.setMnemonic(getMnemonicInt("Cascade"));
+ cascadeMI = new JMenuItem(Messages.CASCADE);
+ cascadeMI.setMnemonic(Resources.getMnemonicInt(Messages.CASCADE));
cascadeMI.addActionListener(JConsole.this);
add(cascadeMI);
- tileMI = new JMenuItem(Resources.getText("Tile"));
- tileMI.setMnemonic(getMnemonicInt("Tile"));
+ tileMI = new JMenuItem(Messages.TILE);
+ tileMI.setMnemonic(Resources.getMnemonicInt(Messages.TILE));
tileMI.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_T,
InputEvent.CTRL_MASK));
tileMI.addActionListener(JConsole.this);
add(tileMI);
- minimizeAllMI = new JMenuItem(Resources.getText("Minimize All"));
- minimizeAllMI.setMnemonic(getMnemonicInt("Minimize All"));
+ minimizeAllMI = new JMenuItem(Messages.MINIMIZE_ALL);
+ minimizeAllMI.setMnemonic(Resources.getMnemonicInt(Messages.MINIMIZE_ALL));
minimizeAllMI.addActionListener(JConsole.this);
add(minimizeAllMI);
- restoreAllMI = new JMenuItem(Resources.getText("Restore All"));
- restoreAllMI.setMnemonic(getMnemonicInt("Restore All"));
+ restoreAllMI = new JMenuItem(Messages.RESTORE_ALL);
+ restoreAllMI.setMnemonic(Resources.getMnemonicInt(Messages.RESTORE_ALL));
restoreAllMI.addActionListener(JConsole.this);
add(restoreAllMI);
@@ -721,7 +717,7 @@
}
private String errorMessage(Exception ex) {
- String msg = Resources.getText("Connection failed");
+ String msg = Messages.CONNECTION_FAILED;
if (ex instanceof IOException || ex instanceof SecurityException) {
Throwable cause = null;
Throwable c = ex.getCause();
@@ -732,7 +728,7 @@
if (cause instanceof ConnectException) {
return msg + ": " + cause.getMessage();
} else if (cause instanceof UnknownHostException) {
- return Resources.getText("Unknown Host", cause.getMessage());
+ return Resources.format(Messages.UNKNOWN_HOST, cause.getMessage());
} else if (cause instanceof NoRouteToHostException) {
return msg + ": " + cause.getMessage();
} else if (cause instanceof FailedLoginException) {
@@ -741,7 +737,7 @@
return msg + ": "+ cause.getMessage();
}
} else if (ex instanceof MalformedURLException) {
- return Resources.getText("Invalid URL", ex.getMessage());
+ return Resources.format(Messages.INVALID_URL, ex.getMessage());
}
return msg + ": " + ex.getMessage();
}
@@ -770,7 +766,7 @@
private static void usage() {
- System.err.println(Resources.getText("zz usage text", "jconsole"));
+ System.err.println(Resources.format(Messages.ZZ_USAGE_TEXT, "jconsole"));
}
private static void mainInit(final List<String> urls,
@@ -1003,13 +999,13 @@
pluginService = plugins;
} catch (ServiceConfigurationError e) {
// Error occurs during initialization of plugin
- System.out.println(Resources.getText("Fail to load plugin",
+ System.out.println(Resources.format(Messages.FAIL_TO_LOAD_PLUGIN,
e.getMessage()));
} catch (MalformedURLException e) {
if (JConsole.isDebug()) {
e.printStackTrace();
}
- System.out.println(Resources.getText("Invalid plugin path",
+ System.out.println(Resources.format(Messages.INVALID_PLUGIN_PATH,
e.getMessage()));
}
}
diff --git a/src/share/classes/sun/tools/jconsole/LabeledComponent.java b/src/share/classes/sun/tools/jconsole/LabeledComponent.java
index 81953f4..ce045e8 100644
--- a/src/share/classes/sun/tools/jconsole/LabeledComponent.java
+++ b/src/share/classes/sun/tools/jconsole/LabeledComponent.java
@@ -26,7 +26,6 @@
package sun.tools.jconsole;
import java.awt.*;
-import java.awt.event.*;
import javax.swing.*;
diff --git a/src/share/classes/sun/tools/jconsole/LocalVirtualMachine.java b/src/share/classes/sun/tools/jconsole/LocalVirtualMachine.java
index c99f99f..4982c0e 100644
--- a/src/share/classes/sun/tools/jconsole/LocalVirtualMachine.java
+++ b/src/share/classes/sun/tools/jconsole/LocalVirtualMachine.java
@@ -39,7 +39,6 @@
// Sun private
import sun.management.ConnectorAddressLink;
import sun.jvmstat.monitor.HostIdentifier;
-import sun.jvmstat.monitor.Monitor;
import sun.jvmstat.monitor.MonitoredHost;
import sun.jvmstat.monitor.MonitoredVm;
import sun.jvmstat.monitor.MonitoredVmUtil;
@@ -131,7 +130,7 @@
private static void getMonitoredVMs(Map<Integer, LocalVirtualMachine> map) {
MonitoredHost host;
- Set vms;
+ Set<Integer> vms;
try {
host = MonitoredHost.getMonitoredHost(new HostIdentifier((String)null));
vms = host.activeVms();
diff --git a/src/share/classes/sun/tools/jconsole/MBeansTab.java b/src/share/classes/sun/tools/jconsole/MBeansTab.java
index abd5de7..cb5bcc1 100644
--- a/src/share/classes/sun/tools/jconsole/MBeansTab.java
+++ b/src/share/classes/sun/tools/jconsole/MBeansTab.java
@@ -52,7 +52,7 @@
private XDataViewer viewer;
public static String getTabName() {
- return Resources.getText("MBeans");
+ return Messages.MBEANS;
}
public MBeansTab(final VMPanel vmPanel) {
diff --git a/src/share/classes/sun/tools/jconsole/MaximizableInternalFrame.java b/src/share/classes/sun/tools/jconsole/MaximizableInternalFrame.java
index da2b91f..ab2c1bf 100644
--- a/src/share/classes/sun/tools/jconsole/MaximizableInternalFrame.java
+++ b/src/share/classes/sun/tools/jconsole/MaximizableInternalFrame.java
@@ -222,7 +222,7 @@
static {
if (JConsole.IS_WIN) {
try {
- Class Part =
+ Class<?> Part =
Class.forName("com.sun.java.swing.plaf.windows.TMSchema$Part");
if (Part != null) {
WP_MINBUTTON = Part.getField("WP_MINBUTTON").get(null);
diff --git a/src/share/classes/sun/tools/jconsole/MemoryPoolProxy.java b/src/share/classes/sun/tools/jconsole/MemoryPoolProxy.java
index bc6925f..a796db0 100644
--- a/src/share/classes/sun/tools/jconsole/MemoryPoolProxy.java
+++ b/src/share/classes/sun/tools/jconsole/MemoryPoolProxy.java
@@ -26,7 +26,6 @@
package sun.tools.jconsole;
import javax.management.ObjectName;
-import java.lang.management.ManagementFactory;
import java.lang.management.MemoryPoolMXBean;
import java.lang.management.MemoryUsage;
import com.sun.management.GarbageCollectorMXBean;
@@ -34,21 +33,18 @@
import java.util.HashMap;
import java.util.Set;
import java.util.Map;
-import java.util.Map.Entry;
import static java.lang.management.ManagementFactory.*;
public class MemoryPoolProxy {
private String poolName;
private ProxyClient client;
- private ObjectName objName;
private MemoryPoolMXBean pool;
private Map<ObjectName,Long> gcMBeans;
private GcInfo lastGcInfo;
public MemoryPoolProxy(ProxyClient client, ObjectName poolName) throws java.io.IOException {
this.client = client;
- this.objName = objName;
this.pool = client.getMXBean(poolName, MemoryPoolMXBean.class);
this.poolName = this.pool.getName();
this.gcMBeans = new HashMap<ObjectName,Long>();
@@ -73,10 +69,6 @@
return (gcMBeans.size() != 0);
}
- public ObjectName getObjectName() {
- return objName;
- }
-
public MemoryPoolStat getStat() throws java.io.IOException {
long usageThreshold = (pool.isUsageThresholdSupported()
? pool.getUsageThreshold()
diff --git a/src/share/classes/sun/tools/jconsole/MemoryPoolStat.java b/src/share/classes/sun/tools/jconsole/MemoryPoolStat.java
index 86cb997..869c44e 100644
--- a/src/share/classes/sun/tools/jconsole/MemoryPoolStat.java
+++ b/src/share/classes/sun/tools/jconsole/MemoryPoolStat.java
@@ -129,6 +129,6 @@
* null if no GC occurs.
*/
public MemoryUsage getAfterGcUsage() {
- return beforeGcUsage;
+ return afterGcUsage;
}
}
diff --git a/src/share/classes/sun/tools/jconsole/MemoryTab.java b/src/share/classes/sun/tools/jconsole/MemoryTab.java
index 03e2f84..756fa18 100644
--- a/src/share/classes/sun/tools/jconsole/MemoryTab.java
+++ b/src/share/classes/sun/tools/jconsole/MemoryTab.java
@@ -38,18 +38,14 @@
import javax.management.openmbean.CompositeData;
import javax.swing.*;
import javax.swing.border.*;
-import javax.swing.text.*;
-import sun.management.*;
import static sun.tools.jconsole.Formatter.*;
-import static sun.tools.jconsole.OverviewPanel.*;
-import static sun.tools.jconsole.Resources.*;
import static sun.tools.jconsole.Utilities.*;
@SuppressWarnings("serial")
class MemoryTab extends Tab implements ActionListener, ItemListener {
- JComboBox plotterChoice;
+ JComboBox<Plotter> plotterChoice;
TimeComboBox timeComboBox;
JButton gcButton;
@@ -67,19 +63,11 @@
private static final String committedKey = "committed";
private static final String maxKey = "max";
private static final String thresholdKey = "threshold";
-
- private static final String usedName = Resources.getText("Used");
- private static final String committedName = Resources.getText("Committed");
- private static final String maxName = Resources.getText("Max");
- private static final String thresholdName = Resources.getText("Threshold");
-
private static final Color usedColor = Plotter.defaultColor;
private static final Color committedColor = null;
private static final Color maxColor = null;
private static final Color thresholdColor = Color.red;
- private static final String infoLabelFormat = "MemoryTab.infoLabelFormat";
-
/*
Hierarchy of panels and layouts for this tab:
@@ -105,7 +93,7 @@
public static String getTabName() {
- return getText("Memory");
+ return Messages.MEMORY;
}
public MemoryTab(VMPanel vmPanel) {
@@ -125,32 +113,32 @@
topPanel.add(controlPanel, BorderLayout.CENTER);
// Plotter choice
- plotterChoice = new JComboBox();
+ plotterChoice = new JComboBox<Plotter>();
plotterChoice.addItemListener(this);
- controlPanel.add(new LabeledComponent(getText("Chart:"),
- getMnemonicInt("Chart:"),
+ controlPanel.add(new LabeledComponent(Messages.CHART_COLON,
+ Resources.getMnemonicInt(Messages.CHART_COLON),
plotterChoice));
// Range control
timeComboBox = new TimeComboBox();
- controlPanel.add(new LabeledComponent(getText("Time Range:"),
- getMnemonicInt("Time Range:"),
+ controlPanel.add(new LabeledComponent(Messages.TIME_RANGE_COLON,
+ Resources.getMnemonicInt(Messages.TIME_RANGE_COLON),
timeComboBox));
- gcButton = new JButton(getText("Perform GC"));
- gcButton.setMnemonic(getMnemonicInt("Perform GC"));
+ gcButton = new JButton(Messages.PERFORM_GC);
+ gcButton.setMnemonic(Resources.getMnemonicInt(Messages.PERFORM_GC));
gcButton.addActionListener(this);
- gcButton.setToolTipText(getText("Perform GC.toolTip"));
+ gcButton.setToolTipText(Messages.PERFORM_GC_TOOLTIP);
JPanel topRightPanel = new JPanel();
topRightPanel.setBorder(new EmptyBorder(0, 65-8, 0, 70));
topRightPanel.add(gcButton);
topPanel.add(topRightPanel, BorderLayout.AFTER_LINE_ENDS);
- bottomPanel.setBorder(new CompoundBorder(new TitledBorder(getText("Details")),
+ bottomPanel.setBorder(new CompoundBorder(new TitledBorder(Messages.DETAILS),
new EmptyBorder(10, 10, 10, 10)));
details = new HTMLPane();
- setAccessibleName(details, getText("Details"));
+ setAccessibleName(details, Messages.DETAILS);
bottomPanel.add(new JScrollPane(details), BorderLayout.CENTER);
poolChart = new PoolChart();
@@ -165,31 +153,31 @@
heapPlotter = new Plotter(Plotter.Unit.BYTES) {
public String toString() {
- return Resources.getText("Heap Memory Usage");
+ return Messages.HEAP_MEMORY_USAGE;
}
};
proxyClient.addWeakPropertyChangeListener(heapPlotter);
nonHeapPlotter = new Plotter(Plotter.Unit.BYTES) {
public String toString() {
- return Resources.getText("Non-Heap Memory Usage");
+ return Messages.NON_HEAP_MEMORY_USAGE;
}
};
setAccessibleName(heapPlotter,
- getText("MemoryTab.heapPlotter.accessibleName"));
+ Messages.MEMORY_TAB_HEAP_PLOTTER_ACCESSIBLE_NAME);
setAccessibleName(nonHeapPlotter,
- getText("MemoryTab.nonHeapPlotter.accessibleName"));
+ Messages.MEMORY_TAB_NON_HEAP_PLOTTER_ACCESSIBLE_NAME);
proxyClient.addWeakPropertyChangeListener(nonHeapPlotter);
- heapPlotter.createSequence(usedKey, usedName, usedColor, true);
- heapPlotter.createSequence(committedKey, committedName, committedColor, false);
- heapPlotter.createSequence(maxKey, maxName, maxColor, false);
+ heapPlotter.createSequence(usedKey, Messages.USED, usedColor, true);
+ heapPlotter.createSequence(committedKey, Messages.COMMITTED, committedColor, false);
+ heapPlotter.createSequence(maxKey, Messages.MAX, maxColor, false);
- nonHeapPlotter.createSequence(usedKey, usedName, usedColor, true);
- nonHeapPlotter.createSequence(committedKey, committedName, committedColor, false);
- nonHeapPlotter.createSequence(maxKey, maxName, maxColor, false);
+ nonHeapPlotter.createSequence(usedKey, Messages.USED, usedColor, true);
+ nonHeapPlotter.createSequence(committedKey, Messages.COMMITTED, committedColor, false);
+ nonHeapPlotter.createSequence(maxKey, Messages.MAX, maxColor, false);
plotterList.add(heapPlotter);
plotterList.add(nonHeapPlotter);
@@ -202,8 +190,8 @@
for (ObjectName objectName : objectNames) {
String type = objectName.getKeyProperty("type");
if (type.equals("MemoryPool")) {
- String name = getText("MemoryPoolLabel",
- objectName.getKeyProperty("name"));
+ String name = Resources.format(Messages.MEMORY_POOL_LABEL,
+ objectName.getKeyProperty("name"));
// Heap or non-heap?
boolean isHeap = false;
AttributeList al =
@@ -215,10 +203,10 @@
PoolPlotter poolPlotter = new PoolPlotter(objectName, name, isHeap);
proxyClient.addWeakPropertyChangeListener(poolPlotter);
- poolPlotter.createSequence(usedKey, usedName, usedColor, true);
- poolPlotter.createSequence(committedKey, committedName, committedColor, false);
- poolPlotter.createSequence(maxKey, maxName, maxColor, false);
- poolPlotter.createSequence(thresholdKey, thresholdName, thresholdColor, false);
+ poolPlotter.createSequence(usedKey, Messages.USED, usedColor, true);
+ poolPlotter.createSequence(committedKey, Messages.COMMITTED, committedColor, false);
+ poolPlotter.createSequence(maxKey, Messages.MAX, maxColor, false);
+ poolPlotter.createSequence(thresholdKey, Messages.THRESHOLD, thresholdColor, false);
poolPlotter.setUseDashedTransitions(thresholdKey, true);
if (isHeap) {
@@ -286,7 +274,6 @@
max = new long[n];
threshold = new long[n];
timeStamp = System.currentTimeMillis();
- int poolCount = 0;
for (int i = 0; i < n; i++) {
Plotter plotter = plotterList.get(i);
@@ -400,22 +387,22 @@
//long time = plotter.getLastTimeStamp();
long time = System.currentTimeMillis();
String timeStamp = formatDateTime(time);
- text += newRow(getText("Time"), timeStamp);
+ text += newRow(Messages.TIME, timeStamp);
long used = plotter.getLastValue(usedKey);
long committed = plotter.getLastValue(committedKey);
long max = plotter.getLastValue(maxKey);
long threshold = plotter.getLastValue(thresholdKey);
- text += newRow(getText("Used"), formatKBytes(used));
+ text += newRow(Messages.USED, formatKBytes(used));
if (committed > 0L) {
- text += newRow(getText("Committed"), formatKBytes(committed));
+ text += newRow(Messages.COMMITTED, formatKBytes(committed));
}
if (max > 0L) {
- text += newRow(getText("Max"), formatKBytes(max));
+ text += newRow(Messages.MAX, formatKBytes(max));
}
if (threshold > 0L) {
- text += newRow(getText("Usage Threshold"), formatKBytes(threshold));
+ text += newRow(Messages.USAGE_THRESHOLD, formatKBytes(threshold));
}
try {
@@ -427,11 +414,11 @@
String gcName = garbageCollectorMBean.getName();
long gcCount = garbageCollectorMBean.getCollectionCount();
long gcTime = garbageCollectorMBean.getCollectionTime();
- String str = getText("GC time details", justify(formatTime(gcTime), 14),
- gcName,
- String.format("%,d",gcCount));
+ String str = Resources.format(Messages.GC_TIME_DETAILS, justify(formatTime(gcTime), 14),
+ gcName,
+ String.format("%,d",gcCount));
if (!descPrinted) {
- text += newRow(getText("GC time"), str);
+ text += newRow(Messages.GC_TIME, str);
descPrinted = true;
} else {
text += newRow(null, str);
@@ -465,8 +452,8 @@
this.isHeap = isHeap;
setAccessibleName(this,
- getText("MemoryTab.poolPlotter.accessibleName",
- name));
+ Resources.format(Messages.MEMORY_TAB_POOL_PLOTTER_ACCESSIBLE_NAME,
+ name));
}
@@ -627,7 +614,7 @@
g.setColor(nonHeapColor);
g.fillRect(nonHeapRect.x + 1, nonHeapRect.y + 1, nonHeapRect.width - 1, nonHeapRect.height - 1);
- String str = getText("Heap");
+ String str = Messages.HEAP;
int stringWidth = fm.stringWidth(str);
int x = heapRect.x + (heapRect.width - stringWidth) / 2;
int y = heapRect.y + heapRect.height - 6;
@@ -639,7 +626,7 @@
g.setColor(Color.black);
g.drawString(str, x, y);
- str = getText("Non-Heap");
+ str = Messages.NON_HEAP;
stringWidth = fm.stringWidth(str);
x = nonHeapRect.x + (nonHeapRect.width - stringWidth) / 2;
y = nonHeapRect.y + nonHeapRect.height - 6;
@@ -728,26 +715,26 @@
protected class AccessiblePoolChart extends AccessibleJPanel {
public String getAccessibleName() {
- String name = getText("MemoryTab.poolChart.accessibleName");
+ String name = Messages.MEMORY_TAB_POOL_CHART_ACCESSIBLE_NAME;
String keyValueList = "";
for (PoolPlotter poolPlotter : poolPlotters) {
String value = (poolPlotter.value * 100 / poolPlotter.max) + "%";
// Assume format string ends with newline
keyValueList +=
- getText("Plotter.accessibleName.keyAndValue",
- poolPlotter.toString(), value);
+ Resources.format(Messages.PLOTTER_ACCESSIBLE_NAME_KEY_AND_VALUE,
+ poolPlotter.toString(), value);
if (poolPlotter.threshold > 0L) {
String threshold =
(poolPlotter.threshold * 100 / poolPlotter.max) + "%";
if (poolPlotter.value > poolPlotter.threshold) {
keyValueList +=
- getText("MemoryTab.poolChart.aboveThreshold",
- threshold);
+ Resources.format(Messages.MEMORY_TAB_POOL_CHART_ABOVE_THRESHOLD,
+ threshold);
} else {
keyValueList +=
- getText("MemoryTab.poolChart.belowThreshold",
- threshold);
+ Resources.format(Messages.MEMORY_TAB_POOL_CHART_BELOW_THRESHOLD,
+ threshold);
}
}
}
@@ -767,14 +754,14 @@
private static class MemoryOverviewPanel extends OverviewPanel {
MemoryOverviewPanel() {
- super(getText("Heap Memory Usage"), usedKey, usedName, Plotter.Unit.BYTES);
+ super(Messages.HEAP_MEMORY_USAGE, usedKey, Messages.USED, Plotter.Unit.BYTES);
}
private void updateMemoryInfo(long used, long committed, long max) {
- getInfoLabel().setText(getText(infoLabelFormat,
- formatBytes(used, true),
- formatBytes(committed, true),
- formatBytes(max, true)));
+ getInfoLabel().setText(Resources.format(Messages.MEMORY_TAB_INFO_LABEL_FORMAT,
+ formatBytes(used, true),
+ formatBytes(committed, true),
+ formatBytes(max, true)));
}
}
}
diff --git a/src/share/classes/sun/tools/jconsole/Messages.java b/src/share/classes/sun/tools/jconsole/Messages.java
new file mode 100644
index 0000000..27001f2
--- /dev/null
+++ b/src/share/classes/sun/tools/jconsole/Messages.java
@@ -0,0 +1,316 @@
+/*
+ * Copyright (c) 2012, 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 sun.tools.jconsole;
+
+
+/**
+ * Class that contains localized messages.
+ *
+ */
+final public class Messages {
+ private static final String BUNDLE_NAME = "sun.tools.jconsole.resources.messages";
+
+ static {
+ Resources.initializeMessages(Messages.class, BUNDLE_NAME);
+ }
+ // TODO:
+ // The names of some of the constants below looks strange.
+ // That's because they were generated programmatically
+ // from the messages. They should be cleaned up,
+ // ___ should be removed etc.
+ public static String ONE_DAY;
+ public static String ONE_HOUR;
+ public static String ONE_MIN;
+ public static String ONE_MONTH;
+ public static String ONE_YEAR;
+ public static String TWO_HOURS;
+ public static String THREE_HOURS;
+ public static String THREE_MONTHS;
+ public static String FIVE_MIN;
+ public static String SIX_HOURS;
+ public static String SIX_MONTHS;
+ public static String SEVEN_DAYS;
+ public static String TEN_MIN;
+ public static String TWELVE_HOURS;
+ public static String THIRTY_MIN;
+ public static String LESS_THAN;
+ public static String A_LOT_LESS_THAN;
+ public static String GREATER_THAN;
+ public static String ACTION_CAPITALIZED;
+ public static String ACTION_INFO_CAPITALIZED;
+ public static String ALL;
+ public static String ARCHITECTURE;
+ public static String ATTRIBUTE;
+ public static String ATTRIBUTE_VALUE;
+ public static String ATTRIBUTE_VALUES;
+ public static String ATTRIBUTES;
+ public static String BLANK;
+ public static String BLOCKED_COUNT_WAITED_COUNT;
+ public static String BOOT_CLASS_PATH;
+ public static String BORDERED_COMPONENT_MORE_OR_LESS_BUTTON_TOOLTIP;
+ public static String CPU_USAGE;
+ public static String CPU_USAGE_FORMAT;
+ public static String CANCEL;
+ public static String CASCADE;
+ public static String CHART_COLON;
+ public static String CLASS_PATH;
+ public static String CLASS_NAME;
+ public static String CLASS_TAB_INFO_LABEL_FORMAT;
+ public static String CLASS_TAB_LOADED_CLASSES_PLOTTER_ACCESSIBLE_NAME;
+ public static String CLASSES;
+ public static String CLOSE;
+ public static String COLUMN_NAME;
+ public static String COLUMN_PID;
+ public static String COMMITTED_MEMORY;
+ public static String COMMITTED_VIRTUAL_MEMORY;
+ public static String COMMITTED;
+ public static String CONNECT;
+ public static String CONNECT_DIALOG_CONNECT_BUTTON_TOOLTIP;
+ public static String CONNECT_DIALOG_ACCESSIBLE_DESCRIPTION;
+ public static String CONNECT_DIALOG_MASTHEAD_ACCESSIBLE_NAME;
+ public static String CONNECT_DIALOG_MASTHEAD_TITLE;
+ public static String CONNECT_DIALOG_STATUS_BAR_ACCESSIBLE_NAME;
+ public static String CONNECT_DIALOG_TITLE;
+ public static String CONNECTED_PUNCTUATION_CLICK_TO_DISCONNECT_;
+ public static String CONNECTION_FAILED;
+ public static String CONNECTION;
+ public static String CONNECTION_NAME;
+ public static String CONNECTION_NAME__DISCONNECTED_;
+ public static String CONSTRUCTOR;
+ public static String CURRENT_CLASSES_LOADED;
+ public static String CURRENT_HEAP_SIZE;
+ public static String CURRENT_VALUE;
+ public static String CREATE;
+ public static String DAEMON_THREADS;
+ public static String DISCONNECTED_PUNCTUATION_CLICK_TO_CONNECT_;
+ public static String DOUBLE_CLICK_TO_EXPAND_FORWARD_SLASH_COLLAPSE;
+ public static String DOUBLE_CLICK_TO_VISUALIZE;
+ public static String DESCRIPTION;
+ public static String DESCRIPTOR;
+ public static String DETAILS;
+ public static String DETECT_DEADLOCK;
+ public static String DETECT_DEADLOCK_TOOLTIP;
+ public static String DIMENSION_IS_NOT_SUPPORTED_COLON;
+ public static String DISCARD_CHART;
+ public static String DURATION_DAYS_HOURS_MINUTES;
+ public static String DURATION_HOURS_MINUTES;
+ public static String DURATION_MINUTES;
+ public static String DURATION_SECONDS;
+ public static String EMPTY_ARRAY;
+ public static String ERROR;
+ public static String ERROR_COLON_MBEANS_ALREADY_EXIST;
+ public static String ERROR_COLON_MBEANS_DO_NOT_EXIST;
+ public static String EVENT;
+ public static String EXIT;
+ public static String FAIL_TO_LOAD_PLUGIN;
+ public static String FILE_CHOOSER_FILE_EXISTS_CANCEL_OPTION;
+ public static String FILE_CHOOSER_FILE_EXISTS_MESSAGE;
+ public static String FILE_CHOOSER_FILE_EXISTS_OK_OPTION;
+ public static String FILE_CHOOSER_FILE_EXISTS_TITLE;
+ public static String FILE_CHOOSER_SAVED_FILE;
+ public static String FILE_CHOOSER_SAVE_FAILED_MESSAGE;
+ public static String FILE_CHOOSER_SAVE_FAILED_TITLE;
+ public static String FREE_PHYSICAL_MEMORY;
+ public static String FREE_SWAP_SPACE;
+ public static String GARBAGE_COLLECTOR;
+ public static String GC_INFO;
+ public static String GC_TIME;
+ public static String GC_TIME_DETAILS;
+ public static String HEAP_MEMORY_USAGE;
+ public static String HEAP;
+ public static String HELP_ABOUT_DIALOG_ACCESSIBLE_DESCRIPTION;
+ public static String HELP_ABOUT_DIALOG_JCONSOLE_VERSION;
+ public static String HELP_ABOUT_DIALOG_JAVA_VERSION;
+ public static String HELP_ABOUT_DIALOG_MASTHEAD_ACCESSIBLE_NAME;
+ public static String HELP_ABOUT_DIALOG_MASTHEAD_TITLE;
+ public static String HELP_ABOUT_DIALOG_TITLE;
+ public static String HELP_ABOUT_DIALOG_USER_GUIDE_LINK;
+ public static String HELP_ABOUT_DIALOG_USER_GUIDE_LINK_URL;
+ public static String HELP_MENU_ABOUT_TITLE;
+ public static String HELP_MENU_USER_GUIDE_TITLE;
+ public static String HELP_MENU_TITLE;
+ public static String HOTSPOT_MBEANS_ELLIPSIS;
+ public static String HOTSPOT_MBEANS_DIALOG_ACCESSIBLE_DESCRIPTION;
+ public static String IMPACT;
+ public static String INFO;
+ public static String INFO_CAPITALIZED;
+ public static String INVALID_PLUGIN_PATH;
+ public static String INVALID_URL;
+ public static String IS;
+ public static String JAVA_MONITORING___MANAGEMENT_CONSOLE;
+ public static String JCONSOLE_COLON_;
+ public static String JCONSOLE_VERSION; // in version template
+ public static String JCONSOLE_ACCESSIBLE_DESCRIPTION;
+ public static String JIT_COMPILER;
+ public static String LIBRARY_PATH;
+ public static String LIVE_THREADS;
+ public static String LOADED;
+ public static String LOCAL_PROCESS_COLON;
+ public static String MASTHEAD_FONT;
+ public static String MANAGEMENT_NOT_ENABLED;
+ public static String MANAGEMENT_WILL_BE_ENABLED;
+ public static String MBEAN_ATTRIBUTE_INFO;
+ public static String MBEAN_INFO;
+ public static String MBEAN_NOTIFICATION_INFO;
+ public static String MBEAN_OPERATION_INFO;
+ public static String MBEANS;
+ public static String MBEANS_TAB_CLEAR_NOTIFICATIONS_BUTTON;
+ public static String MBEANS_TAB_CLEAR_NOTIFICATIONS_BUTTON_TOOLTIP;
+ public static String MBEANS_TAB_COMPOSITE_NAVIGATION_MULTIPLE;
+ public static String MBEANS_TAB_COMPOSITE_NAVIGATION_SINGLE;
+ public static String MBEANS_TAB_REFRESH_ATTRIBUTES_BUTTON;
+ public static String MBEANS_TAB_REFRESH_ATTRIBUTES_BUTTON_TOOLTIP;
+ public static String MBEANS_TAB_SUBSCRIBE_NOTIFICATIONS_BUTTON;
+ public static String MBEANS_TAB_SUBSCRIBE_NOTIFICATIONS_BUTTON_TOOLTIP;
+ public static String MBEANS_TAB_TABULAR_NAVIGATION_MULTIPLE;
+ public static String MBEANS_TAB_TABULAR_NAVIGATION_SINGLE;
+ public static String MBEANS_TAB_UNSUBSCRIBE_NOTIFICATIONS_BUTTON;
+ public static String MBEANS_TAB_UNSUBSCRIBE_NOTIFICATIONS_BUTTON_TOOLTIP;
+ public static String MANAGE_HOTSPOT_MBEANS_IN_COLON_;
+ public static String MAX;
+ public static String MAXIMUM_HEAP_SIZE;
+ public static String MEMORY;
+ public static String MEMORY_POOL_LABEL;
+ public static String MEMORY_TAB_HEAP_PLOTTER_ACCESSIBLE_NAME;
+ public static String MEMORY_TAB_INFO_LABEL_FORMAT;
+ public static String MEMORY_TAB_NON_HEAP_PLOTTER_ACCESSIBLE_NAME;
+ public static String MEMORY_TAB_POOL_CHART_ABOVE_THRESHOLD;
+ public static String MEMORY_TAB_POOL_CHART_ACCESSIBLE_NAME;
+ public static String MEMORY_TAB_POOL_CHART_BELOW_THRESHOLD;
+ public static String MEMORY_TAB_POOL_PLOTTER_ACCESSIBLE_NAME;
+ public static String MESSAGE;
+ public static String METHOD_SUCCESSFULLY_INVOKED;
+ public static String MINIMIZE_ALL;
+ public static String MONITOR_LOCKED;
+ public static String NAME;
+ public static String NAME_STATE;
+ public static String NAME_STATE_LOCK_NAME;
+ public static String NAME_STATE_LOCK_NAME_LOCK_OWNER;
+ public static String NAME_AND_BUILD;// in version template
+ public static String NEW_CONNECTION_ELLIPSIS;
+ public static String NO_DEADLOCK_DETECTED;
+ public static String NON_HEAP_MEMORY_USAGE;
+ public static String NON_HEAP;
+ public static String NOTIFICATION;
+ public static String NOTIFICATION_BUFFER;
+ public static String NOTIFICATIONS;
+ public static String NOTIF_TYPES;
+ public static String NUMBER_OF_THREADS;
+ public static String NUMBER_OF_LOADED_CLASSES;
+ public static String NUMBER_OF_PROCESSORS;
+ public static String OBJECT_NAME;
+ public static String OPERATING_SYSTEM;
+ public static String OPERATION;
+ public static String OPERATION_INVOCATION;
+ public static String OPERATION_RETURN_VALUE;
+ public static String OPERATIONS;
+ public static String OVERVIEW;
+ public static String OVERVIEW_PANEL_PLOTTER_ACCESSIBLE_NAME;
+ public static String PARAMETER;
+ public static String PASSWORD_COLON_;
+ public static String PASSWORD_ACCESSIBLE_NAME;
+ public static String PEAK;
+ public static String PERFORM_GC;
+ public static String PERFORM_GC_TOOLTIP;
+ public static String PLOTTER_ACCESSIBLE_NAME;
+ public static String PLOTTER_ACCESSIBLE_NAME_KEY_AND_VALUE;
+ public static String PLOTTER_ACCESSIBLE_NAME_NO_DATA;
+ public static String PLOTTER_SAVE_AS_MENU_ITEM;
+ public static String PLOTTER_TIME_RANGE_MENU;
+ public static String PROBLEM_ADDING_LISTENER;
+ public static String PROBLEM_DISPLAYING_MBEAN;
+ public static String PROBLEM_INVOKING;
+ public static String PROBLEM_REMOVING_LISTENER;
+ public static String PROBLEM_SETTING_ATTRIBUTE;
+ public static String PROCESS_CPU_TIME;
+ public static String READABLE;
+ public static String RECONNECT;
+ public static String REMOTE_PROCESS_COLON;
+ public static String REMOTE_PROCESS_TEXT_FIELD_ACCESSIBLE_NAME;
+ public static String RESTORE_ALL;
+ public static String RETURN_TYPE;
+ public static String SEQ_NUM;
+ public static String SIZE_BYTES;
+ public static String SIZE_GB;
+ public static String SIZE_KB;
+ public static String SIZE_MB;
+ public static String SOURCE;
+ public static String STACK_TRACE;
+ public static String SUMMARY_TAB_HEADER_DATE_TIME_FORMAT;
+ public static String SUMMARY_TAB_PENDING_FINALIZATION_LABEL;
+ public static String SUMMARY_TAB_PENDING_FINALIZATION_VALUE;
+ public static String SUMMARY_TAB_TAB_NAME;
+ public static String SUMMARY_TAB_VM_VERSION;
+ public static String THREADS;
+ public static String THREAD_TAB_THREAD_INFO_ACCESSIBLE_NAME;
+ public static String THREAD_TAB_THREAD_PLOTTER_ACCESSIBLE_NAME;
+ public static String THRESHOLD;
+ public static String TILE;
+ public static String TIME_RANGE_COLON;
+ public static String TIME;
+ public static String TIME_STAMP;
+ public static String TOTAL_LOADED;
+ public static String TOTAL_CLASSES_LOADED;
+ public static String TOTAL_CLASSES_UNLOADED;
+ public static String TOTAL_COMPILE_TIME;
+ public static String TOTAL_PHYSICAL_MEMORY;
+ public static String TOTAL_THREADS_STARTED;
+ public static String TOTAL_SWAP_SPACE;
+ public static String TYPE;
+ public static String UNAVAILABLE;
+ public static String UNKNOWN_CAPITALIZED;
+ public static String UNKNOWN_HOST;
+ public static String UNREGISTER;
+ public static String UPTIME;
+ public static String USAGE_THRESHOLD;
+ public static String REMOTE_TF_USAGE;
+ public static String USED;
+ public static String USERNAME_COLON_;
+ public static String USERNAME_ACCESSIBLE_NAME;
+ public static String USER_DATA;
+ public static String VIRTUAL_MACHINE;
+ public static String VM_ARGUMENTS;
+ public static String VMINTERNAL_FRAME_ACCESSIBLE_DESCRIPTION;
+ public static String VALUE;
+ public static String VENDOR;
+ public static String VERBOSE_OUTPUT;
+ public static String VERBOSE_OUTPUT_TOOLTIP;
+ public static String VIEW;
+ public static String WINDOW;
+ public static String WINDOWS;
+ public static String WRITABLE;
+ public static String CONNECTION_FAILED1;
+ public static String CONNECTION_FAILED2;
+ public static String CONNECTION_LOST1;
+ public static String CONNECTING_TO1;
+ public static String CONNECTING_TO2;
+ public static String DEADLOCK_TAB;
+ public static String DEADLOCK_TAB_N;
+ public static String EXPAND;
+ public static String KBYTES;
+ public static String PLOT;
+ public static String VISUALIZE;
+ public static String ZZ_USAGE_TEXT;
+}
diff --git a/src/share/classes/sun/tools/jconsole/OverviewPanel.java b/src/share/classes/sun/tools/jconsole/OverviewPanel.java
index 4603b97..269dbd2 100644
--- a/src/share/classes/sun/tools/jconsole/OverviewPanel.java
+++ b/src/share/classes/sun/tools/jconsole/OverviewPanel.java
@@ -26,14 +26,12 @@
package sun.tools.jconsole;
import java.awt.*;
-import java.awt.event.*;
import javax.swing.*;
-import javax.swing.border.*;
+
import static javax.swing.SwingConstants.*;
import static sun.tools.jconsole.JConsole.*;
-import static sun.tools.jconsole.Resources.*;
import static sun.tools.jconsole.Utilities.*;
@@ -68,7 +66,7 @@
}
plotter.createSequence(plotterKey, plotterName, PLOTTER_COLOR, true);
setAccessibleName(plotter,
- getText("OverviewPanel.plotter.accessibleName",
+ Resources.format(Messages.OVERVIEW_PANEL_PLOTTER_ACCESSIBLE_NAME,
title));
setPlotter(plotter);
}
diff --git a/src/share/classes/sun/tools/jconsole/OverviewTab.java b/src/share/classes/sun/tools/jconsole/OverviewTab.java
index 74a14ec..3b89f6e 100644
--- a/src/share/classes/sun/tools/jconsole/OverviewTab.java
+++ b/src/share/classes/sun/tools/jconsole/OverviewTab.java
@@ -26,15 +26,11 @@
package sun.tools.jconsole;
import java.awt.*;
-import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import javax.swing.*;
import javax.swing.border.*;
-import static sun.tools.jconsole.JConsole.*;
-import static sun.tools.jconsole.Resources.*;
-
@SuppressWarnings("serial")
class OverviewTab extends Tab {
@@ -42,7 +38,7 @@
TimeComboBox timeComboBox;
public static String getTabName() {
- return getText("Overview");
+ return Messages.OVERVIEW;
}
public OverviewTab(VMPanel vmPanel) {
@@ -58,8 +54,8 @@
topPanel.add(controlPanel, BorderLayout.CENTER);
timeComboBox = new TimeComboBox();
- LabeledComponent lc = new LabeledComponent(Resources.getText("Time Range:"),
- getMnemonicInt("Time Range:"),
+ LabeledComponent lc = new LabeledComponent(Messages.TIME_RANGE_COLON,
+ Resources.getMnemonicInt(Messages.TIME_RANGE_COLON),
timeComboBox);
controlPanel.add(lc);
diff --git a/src/share/classes/sun/tools/jconsole/Plotter.java b/src/share/classes/sun/tools/jconsole/Plotter.java
index 351187e..a9dbece 100644
--- a/src/share/classes/sun/tools/jconsole/Plotter.java
+++ b/src/share/classes/sun/tools/jconsole/Plotter.java
@@ -38,14 +38,11 @@
import javax.swing.filechooser.*;
import javax.swing.filechooser.FileFilter;
-import com.sun.tools.jconsole.JConsoleContext;
-import static com.sun.tools.jconsole.JConsoleContext.ConnectionState.*;
+import com.sun.tools.jconsole.JConsoleContext;
import static sun.tools.jconsole.Formatter.*;
import static sun.tools.jconsole.ProxyClient.*;
-import static sun.tools.jconsole.Resources.*;
-import static sun.tools.jconsole.Utilities.*;
@SuppressWarnings("serial")
public class Plotter extends JComponent
@@ -56,22 +53,22 @@
}
static final String[] rangeNames = {
- Resources.getText(" 1 min"),
- Resources.getText(" 5 min"),
- Resources.getText("10 min"),
- Resources.getText("30 min"),
- Resources.getText(" 1 hour"),
- Resources.getText(" 2 hours"),
- Resources.getText(" 3 hours"),
- Resources.getText(" 6 hours"),
- Resources.getText("12 hours"),
- Resources.getText(" 1 day"),
- Resources.getText(" 7 days"),
- Resources.getText(" 1 month"),
- Resources.getText(" 3 months"),
- Resources.getText(" 6 months"),
- Resources.getText(" 1 year"),
- Resources.getText("All")
+ Messages.ONE_MIN,
+ Messages.FIVE_MIN,
+ Messages.TEN_MIN,
+ Messages.THIRTY_MIN,
+ Messages.ONE_HOUR,
+ Messages.TWO_HOURS,
+ Messages.THREE_HOURS,
+ Messages.SIX_HOURS,
+ Messages.TWELVE_HOURS,
+ Messages.ONE_DAY,
+ Messages.SEVEN_DAYS,
+ Messages.ONE_MONTH,
+ Messages.THREE_MONTHS,
+ Messages.SIX_MONTHS,
+ Messages.ONE_YEAR,
+ Messages.ALL
};
static final int[] rangeValues = {
@@ -247,9 +244,9 @@
@Override
public JPopupMenu getComponentPopupMenu() {
if (popupMenu == null) {
- popupMenu = new JPopupMenu(Resources.getText("Chart:"));
- timeRangeMenu = new JMenu(Resources.getText("Plotter.timeRangeMenu"));
- timeRangeMenu.setMnemonic(getMnemonicInt("Plotter.timeRangeMenu"));
+ popupMenu = new JPopupMenu(Messages.CHART_COLON);
+ timeRangeMenu = new JMenu(Messages.PLOTTER_TIME_RANGE_MENU);
+ timeRangeMenu.setMnemonic(Resources.getMnemonicInt(Messages.PLOTTER_TIME_RANGE_MENU));
popupMenu.add(timeRangeMenu);
menuRBs = new JRadioButtonMenuItem[rangeNames.length];
ButtonGroup rbGroup = new ButtonGroup();
@@ -265,8 +262,8 @@
popupMenu.addSeparator();
- saveAsMI = new JMenuItem(getText("Plotter.saveAsMenuItem"));
- saveAsMI.setMnemonic(getMnemonicInt("Plotter.saveAsMenuItem"));
+ saveAsMI = new JMenuItem(Messages.PLOTTER_SAVE_AS_MENU_ITEM);
+ saveAsMI.setMnemonic(Resources.getMnemonicInt(Messages.PLOTTER_SAVE_AS_MENU_ITEM));
saveAsMI.addActionListener(this);
popupMenu.add(saveAsMI);
}
@@ -318,9 +315,9 @@
out.close();
JOptionPane.showMessageDialog(this,
- getText("FileChooser.savedFile",
- file.getAbsolutePath(),
- file.length()));
+ Resources.format(Messages.FILE_CHOOSER_SAVED_FILE,
+ file.getAbsolutePath(),
+ file.length()));
} catch (IOException ex) {
String msg = ex.getLocalizedMessage();
String path = file.getAbsolutePath();
@@ -328,9 +325,10 @@
msg = msg.substring(path.length()).trim();
}
JOptionPane.showMessageDialog(this,
- getText("FileChooser.saveFailed.message",
- path, msg),
- getText("FileChooser.saveFailed.title"),
+ Resources.format(Messages.FILE_CHOOSER_SAVE_FAILED_MESSAGE,
+ path,
+ msg),
+ Messages.FILE_CHOOSER_SAVE_FAILED_TITLE,
JOptionPane.ERROR_MESSAGE);
}
}
@@ -1020,13 +1018,13 @@
}
if (file.exists()) {
- String okStr = getText("FileChooser.fileExists.okOption");
- String cancelStr = getText("FileChooser.fileExists.cancelOption");
+ String okStr = Messages.FILE_CHOOSER_FILE_EXISTS_OK_OPTION;
+ String cancelStr = Messages.FILE_CHOOSER_FILE_EXISTS_CANCEL_OPTION;
int ret =
JOptionPane.showOptionDialog(this,
- getText("FileChooser.fileExists.message",
- file.getName()),
- getText("FileChooser.fileExists.title"),
+ Resources.format(Messages.FILE_CHOOSER_FILE_EXISTS_MESSAGE,
+ file.getName()),
+ Messages.FILE_CHOOSER_FILE_EXISTS_TITLE,
JOptionPane.OK_CANCEL_OPTION,
JOptionPane.WARNING_MESSAGE,
null,
@@ -1053,7 +1051,7 @@
protected class AccessiblePlotter extends AccessibleJComponent {
private static final long serialVersionUID = -3847205410473510922L;
protected AccessiblePlotter() {
- setAccessibleName(getText("Plotter.accessibleName"));
+ setAccessibleName(Messages.PLOTTER_ACCESSIBLE_NAME);
}
@Override
@@ -1067,7 +1065,7 @@
String value = "null";
if (seq.size > 0) {
if (unit == Unit.BYTES) {
- value = getText("Size Bytes", seq.value(seq.size - 1));
+ value = Resources.format(Messages.SIZE_BYTES, seq.value(seq.size - 1));
} else {
value =
getFormattedValue(seq.value(seq.size - 1), false) +
@@ -1076,13 +1074,13 @@
}
// Assume format string ends with newline
keyValueList +=
- getText("Plotter.accessibleName.keyAndValue",
+ Resources.format(Messages.PLOTTER_ACCESSIBLE_NAME_KEY_AND_VALUE,
seq.key, value);
}
}
name += "\n" + keyValueList + ".";
} else {
- name += "\n" + getText("Plotter.accessibleName.noData");
+ name += "\n" + Messages.PLOTTER_ACCESSIBLE_NAME_NO_DATA;
}
return name;
}
diff --git a/src/share/classes/sun/tools/jconsole/PlotterPanel.java b/src/share/classes/sun/tools/jconsole/PlotterPanel.java
index f9cc125..da6b2cc 100644
--- a/src/share/classes/sun/tools/jconsole/PlotterPanel.java
+++ b/src/share/classes/sun/tools/jconsole/PlotterPanel.java
@@ -25,7 +25,6 @@
package sun.tools.jconsole;
-import java.awt.*;
import java.awt.event.*;
import javax.accessibility.*;
diff --git a/src/share/classes/sun/tools/jconsole/ProxyClient.java b/src/share/classes/sun/tools/jconsole/ProxyClient.java
index 6e129fd..d98d489 100644
--- a/src/share/classes/sun/tools/jconsole/ProxyClient.java
+++ b/src/share/classes/sun/tools/jconsole/ProxyClient.java
@@ -27,7 +27,6 @@
import com.sun.management.HotSpotDiagnosticMXBean;
import com.sun.tools.jconsole.JConsoleContext;
-import com.sun.tools.jconsole.JConsoleContext.ConnectionState;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeEvent;
import java.io.IOException;
@@ -504,7 +503,7 @@
public String toString() {
if (!isConnected()) {
- return Resources.getText("ConnectionName (disconnected)", displayName);
+ return Resources.format(Messages.CONNECTION_NAME__DISCONNECTED_, displayName);
} else {
return displayName;
}
@@ -595,10 +594,10 @@
assert(false);
}
}
- Set mbeans = server.queryNames(name, null);
+ Set<ObjectName> mbeans = server.queryNames(name, null);
Map<ObjectName,MBeanInfo> result =
new HashMap<ObjectName,MBeanInfo>(mbeans.size());
- Iterator iterator = mbeans.iterator();
+ Iterator<ObjectName> iterator = mbeans.iterator();
while (iterator.hasNext()) {
Object object = iterator.next();
if (object instanceof ObjectName) {
@@ -704,10 +703,10 @@
// should not reach here
assert(false);
}
- Set mbeans = server.queryNames(poolName, null);
+ Set<ObjectName> mbeans = server.queryNames(poolName, null);
if (mbeans != null) {
memoryPoolProxies = new ArrayList<MemoryPoolProxy>();
- Iterator iterator = mbeans.iterator();
+ Iterator<ObjectName> iterator = mbeans.iterator();
while (iterator.hasNext()) {
ObjectName objName = (ObjectName) iterator.next();
MemoryPoolProxy p = new MemoryPoolProxy(this, objName);
@@ -730,10 +729,10 @@
// should not reach here
assert(false);
}
- Set mbeans = server.queryNames(gcName, null);
+ Set<ObjectName> mbeans = server.queryNames(gcName, null);
if (mbeans != null) {
garbageCollectorMBeans = new ArrayList<GarbageCollectorMXBean>();
- Iterator iterator = mbeans.iterator();
+ Iterator<ObjectName> iterator = mbeans.iterator();
while (iterator.hasNext()) {
ObjectName on = (ObjectName) iterator.next();
String name = GARBAGE_COLLECTOR_MXBEAN_DOMAIN_TYPE +
diff --git a/src/share/classes/sun/tools/jconsole/Resources.java b/src/share/classes/sun/tools/jconsole/Resources.java
index 26e768b..e7ced47 100644
--- a/src/share/classes/sun/tools/jconsole/Resources.java
+++ b/src/share/classes/sun/tools/jconsole/Resources.java
@@ -25,89 +25,185 @@
package sun.tools.jconsole;
+import java.awt.event.KeyEvent;
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
import java.text.MessageFormat;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
-import sun.tools.jconsole.resources.JConsoleResources;
-
/**
- * Provides resource support for jconsole.
+ * Toolkit that provides resource support for JConsole.
*/
public final class Resources {
+ private static Map<String, Integer> MNEMONIC_LOOKUP = Collections
+ .synchronizedMap(new HashMap<String, Integer>());
- private static final Object lock = new Object();
- private static JConsoleResources resources = null;
- static {
+ private Resources() {
+ throw new AssertionError();
+ }
+
+ /**
+ * Convenience method for {@link MessageFormat#format(String, Object...)}.
+ *
+ * @param pattern the pattern
+ * @param objects the arguments for the pattern
+ *
+ * @return a formatted string
+ */
+ public static String format(String pattern, Object... arguments) {
+ return MessageFormat.format(pattern, arguments);
+ }
+
+ /**
+ * Returns the mnemonic for a message.
+ *
+ * @param message the message
+ *
+ * @return the mnemonic <code>int</code>
+ */
+ public static int getMnemonicInt(String message) {
+ Integer integer = MNEMONIC_LOOKUP.get(message);
+ if (integer != null) {
+ return integer.intValue();
+ }
+ return 0;
+ }
+
+ /**
+ * Initializes all non-final public static fields in the given class with
+ * messages from a {@link ResourceBundle}.
+ *
+ * @param clazz the class containing the fields
+ */
+ public static void initializeMessages(Class<?> clazz, String rbName) {
+ ResourceBundle rb = null;
try {
- resources =
- (JConsoleResources)ResourceBundle.getBundle("sun.tools.jconsole.resources.JConsoleResources");
- } catch (MissingResourceException e) {
- // gracefully handle this later
+ rb = ResourceBundle.getBundle(rbName);
+ } catch (MissingResourceException mre) {
+ // fall through, handled later
+ }
+ for (Field field : clazz.getFields()) {
+ if (isWritableField(field)) {
+ String key = field.getName();
+ String message = getMessage(rb, key);
+ int mnemonicInt = findMnemonicInt(message);
+ message = removeMnemonicAmpersand(message);
+ message = replaceWithPlatformLineFeed(message);
+ setFieldValue(field, message);
+ MNEMONIC_LOOKUP.put(message, mnemonicInt);
+ }
}
}
- private Resources() { throw new AssertionError(); }
-
- /**
- * Returns the text of the jconsole resource for the specified key
- * formatted with the specified arguments.
- *
- */
- public static String getText(String key, Object... args) {
- String format = getString(key);
- if (format == null) {
- format = "missing resource key: key = \"" + key + "\", " +
- "arguments = \"{0}\", \"{1}\", \"{2}\"";
- }
- return formatMessage(format, args);
- }
-
- static String formatMessage(String format, Object... args) {
- String ss = null;
- synchronized (lock) {
- /*
- * External synchronization required for safe use of
- * java.text.MessageFormat:
- */
- ss = MessageFormat.format(format, args);
- }
- return ss;
+ private static boolean isWritableField(Field field) {
+ int modifiers = field.getModifiers();
+ return Modifier.isPublic(modifiers) && Modifier.isStatic(modifiers)
+ && !Modifier.isFinal(modifiers);
}
/**
- * Returns the mnemonic keycode int of the jconsole resource for the specified key.
+ * Returns the message corresponding to the key in the bundle or a text
+ * describing it's missing.
*
+ * @param rb the resource bundle
+ * @param key the key
+ *
+ * @return the message
*/
- public static int getMnemonicInt(String key) {
- int mnemonic = 0;
- if (resources != null) {
- Object obj = resources.getObject(key+".mnemonic");
- if (obj instanceof Character) {
- mnemonic = (int)(Character)obj;
- if (mnemonic >= 'a' && mnemonic <='z') {
- mnemonic -= ('a' - 'A');
+ private static String getMessage(ResourceBundle rb, String key) {
+ if (rb == null) {
+ return "missing resource bundle";
+ }
+ try {
+ return rb.getString(key);
+ } catch (MissingResourceException mre) {
+ return "missing message for key = \"" + key
+ + "\" in resource bundle ";
+ }
+ }
+
+ private static void setFieldValue(Field field, String value) {
+ try {
+ field.set(null, value);
+ } catch (IllegalArgumentException | IllegalAccessException e) {
+ throw new Error("Unable to access or set message for field " + field.getName());
+ }
+ }
+
+ /**
+ * Returns a {@link String} where all <code>\n</code> in the <text> have
+ * been replaced with the line separator for the platform.
+ *
+ * @param text the to be replaced
+ *
+ * @return the replaced text
+ */
+ private static String replaceWithPlatformLineFeed(String text) {
+ return text.replace("\n", System.getProperty("line.separator"));
+ }
+
+ /**
+ * Removes the mnemonic identifier (<code>&</code>) from a string unless
+ * it's escaped by <code>&&</code> or placed at the end.
+ *
+ * @param message the message
+ *
+ * @return a message with the mnemonic identifier removed
+ */
+ private static String removeMnemonicAmpersand(String message) {
+ StringBuilder s = new StringBuilder();
+ for (int i = 0; i < message.length(); i++) {
+ char current = message.charAt(i);
+ if (current != '&' || i == message.length() - 1
+ || message.charAt(i + 1) == '&') {
+ s.append(current);
+ }
+ }
+ return s.toString();
+ }
+
+ /**
+ * Finds the mnemonic character in a message.
+ *
+ * The mnemonic character is the first character followed by the first
+ * <code>&</code> that is not followed by another <code>&</code>.
+ *
+ * @return the mnemonic as an <code>int</code>, or <code>0</code> if it
+ * can't be found.
+ */
+ private static int findMnemonicInt(String s) {
+ for (int i = 0; i < s.length() - 1; i++) {
+ if (s.charAt(i) == '&') {
+ if (s.charAt(i + 1) != '&') {
+ return lookupMnemonicInt(s.substring(i + 1, i + 2));
+ } else {
+ i++;
}
- } else if (obj instanceof Integer) {
- mnemonic = (Integer)obj;
}
}
- return mnemonic;
+ return 0;
}
/**
- * Returns the jconsole resource string for the specified key.
+ * Lookups the mnemonic for a key in the {@link KeyEvent} class.
*
+ * @param c the character to lookup
+ *
+ * @return the mnemonic as an <code>int</code>, or <code>0</code> if it
+ * can't be found.
*/
- private static String getString(String key) {
- if (resources != null) {
- try {
- return resources.getString(key);
- } catch (MissingResourceException e) {
- return null;
- }
+ private static int lookupMnemonicInt(String c) {
+ try {
+ return KeyEvent.class.getDeclaredField("VK_" + c.toUpperCase())
+ .getInt(null);
+ } catch (IllegalArgumentException | IllegalAccessException
+ | NoSuchFieldException | SecurityException e) {
+ // Missing VK is okay
+ return 0;
}
- return "missing resource bundle: key = \"" + key + "\", " +
- "arguments = \"{0}\", \"{1}\", \"{2}\"";
}
}
diff --git a/src/share/classes/sun/tools/jconsole/SummaryTab.java b/src/share/classes/sun/tools/jconsole/SummaryTab.java
index 5e1907f..e511100 100644
--- a/src/share/classes/sun/tools/jconsole/SummaryTab.java
+++ b/src/share/classes/sun/tools/jconsole/SummaryTab.java
@@ -29,24 +29,19 @@
import java.io.*;
import java.lang.management.*;
import java.lang.reflect.*;
-import java.net.URL;
import java.text.*;
import java.util.*;
import java.util.concurrent.*;
import javax.swing.*;
-import javax.swing.event.*;
-import javax.swing.text.*;
+
import static sun.tools.jconsole.Formatter.*;
-import static sun.tools.jconsole.Resources.*;
import static sun.tools.jconsole.Utilities.*;
@SuppressWarnings("serial")
class SummaryTab extends Tab {
private static final String cpuUsageKey = "cpu";
- private static final String cpuUsageName = getText("CPU Usage");
- private static final String cpuUsageFormat = "CPUUsageFormat";
private static final String newDivider = "<tr><td colspan=4><font size =-1><hr>";
private static final String newTable = "<tr><td colspan=4 align=left><table cellpadding=1>";
@@ -70,7 +65,7 @@
}
public static String getTabName() {
- return Resources.getText("SummaryTab.tabName");
+ return Messages.SUMMARY_TAB_TAB_NAME;
}
public SummaryTab(VMPanel vmPanel) {
@@ -83,7 +78,7 @@
add(new JScrollPane(info));
headerDateTimeFormat =
- getDateTimeFormat("SummaryTab.headerDateTimeFormat");
+ Formatter.getDateTimeFormat(Messages.SUMMARY_TAB_HEADER_DATE_TIME_FORMAT);
}
public SwingWorker<?, ?> newSwingWorker() {
@@ -138,7 +133,7 @@
proxyClient.getSunOperatingSystemMXBean();
append("<tr><td colspan=4>");
- append("<center><b>" + getText("SummaryTab.tabName") + "</b></center>");
+ append("<center><b>" + Messages.SUMMARY_TAB_TAB_NAME + "</b></center>");
String dateTime =
headerDateTimeFormat.format(System.currentTimeMillis());
append("<center>" + dateTime + "</center>");
@@ -147,30 +142,30 @@
{ // VM info
append(newLeftTable);
- append("Connection name", vmPanel.getDisplayName());
- append("Virtual Machine",
- getText("SummaryTab.vmVersion",
- rmBean.getVmName(), rmBean.getVmVersion()));
- append("Vendor", rmBean.getVmVendor());
- append("Name", rmBean.getName());
+ append(Messages.CONNECTION_NAME, vmPanel.getDisplayName());
+ append(Messages.VIRTUAL_MACHINE,
+ Resources.format(Messages.SUMMARY_TAB_VM_VERSION,
+ rmBean.getVmName(), rmBean.getVmVersion()));
+ append(Messages.VENDOR, rmBean.getVmVendor());
+ append(Messages.NAME, rmBean.getName());
append(endTable);
append(newRightTable);
result.upTime = rmBean.getUptime();
- append("Uptime", formatTime(result.upTime));
+ append(Messages.UPTIME, formatTime(result.upTime));
if (sunOSMBean != null) {
result.processCpuTime = sunOSMBean.getProcessCpuTime();
- append("Process CPU time", formatNanoTime(result.processCpuTime));
+ append(Messages.PROCESS_CPU_TIME, formatNanoTime(result.processCpuTime));
}
if (cmpMBean != null) {
- append("JIT compiler", cmpMBean.getName());
- append("Total compile time",
+ append(Messages.JIT_COMPILER, cmpMBean.getName());
+ append(Messages.TOTAL_COMPILE_TIME,
cmpMBean.isCompilationTimeMonitoringSupported()
? formatTime(cmpMBean.getTotalCompilationTime())
- : getText("Unavailable"));
+ : Messages.UNAVAILABLE);
} else {
- append("JIT compiler", getText("Unavailable"));
+ append(Messages.JIT_COMPILER, Messages.UNAVAILABLE);
}
append(endTable);
}
@@ -185,10 +180,10 @@
long ttCount = tmBean.getTotalStartedThreadCount();
String[] strings1 = formatLongs(tlCount, tpCount,
tdCount, ttCount);
- append("Live Threads", strings1[0]);
- append("Peak", strings1[1]);
- append("Daemon threads", strings1[2]);
- append("Total threads started", strings1[3]);
+ append(Messages.LIVE_THREADS, strings1[0]);
+ append(Messages.PEAK, strings1[1]);
+ append(Messages.DAEMON_THREADS, strings1[2]);
+ append(Messages.TOTAL_THREADS_STARTED, strings1[3]);
append(endTable);
append(newRightTable);
@@ -196,9 +191,9 @@
long cuCount = clMBean.getUnloadedClassCount();
long ctCount = clMBean.getTotalLoadedClassCount();
String[] strings2 = formatLongs(clCount, cuCount, ctCount);
- append("Current classes loaded", strings2[0]);
- append("Total classes loaded", strings2[2]);
- append("Total classes unloaded", strings2[1]);
+ append(Messages.CURRENT_CLASSES_LOADED, strings2[0]);
+ append(Messages.TOTAL_CLASSES_LOADED, strings2[2]);
+ append(Messages.TOTAL_CLASSES_UNLOADED, strings2[1]);
append(null, "");
append(endTable);
}
@@ -210,16 +205,16 @@
append(newLeftTable);
String[] strings1 = formatKByteStrings(u.getUsed(), u.getMax());
- append("Current heap size", strings1[0]);
- append("Maximum heap size", strings1[1]);
+ append(Messages.CURRENT_HEAP_SIZE, strings1[0]);
+ append(Messages.MAXIMUM_HEAP_SIZE, strings1[1]);
append(endTable);
append(newRightTable);
String[] strings2 = formatKByteStrings(u.getCommitted());
- append("Committed memory", strings2[0]);
- append("SummaryTab.pendingFinalization.label",
- getText("SummaryTab.pendingFinalization.value",
- memoryBean.getObjectPendingFinalizationCount()));
+ append(Messages.COMMITTED_MEMORY, strings2[0]);
+ append(Messages.SUMMARY_TAB_PENDING_FINALIZATION_LABEL,
+ Messages.SUMMARY_TAB_PENDING_FINALIZATION_VALUE,
+ memoryBean.getObjectPendingFinalizationCount());
append(endTable);
append(newTable);
@@ -230,10 +225,10 @@
long gcCount = garbageCollectorMBean.getCollectionCount();
long gcTime = garbageCollectorMBean.getCollectionTime();
- append("Garbage collector",
- getText("GcInfo", gcName, gcCount,
- (gcTime >= 0) ? formatTime(gcTime)
- : getText("Unavailable")),
+ append(Messages.GARBAGE_COLLECTOR,
+ Resources.format(Messages.GC_INFO, gcName, gcCount,
+ (gcTime >= 0) ? formatTime(gcTime)
+ : Messages.UNAVAILABLE),
4);
}
append(endTable);
@@ -247,9 +242,9 @@
String osVersion = osMBean.getVersion();
String osArch = osMBean.getArch();
result.nCPUs = osMBean.getAvailableProcessors();
- append("Operating System", osName + " " + osVersion);
- append("Architecture", osArch);
- append("Number of processors", result.nCPUs+"");
+ append(Messages.OPERATING_SYSTEM, osName + " " + osVersion);
+ append(Messages.ARCHITECTURE, osArch);
+ append(Messages.NUMBER_OF_PROCESSORS, result.nCPUs+"");
if (pathSeparator == null) {
// Must use separator of remote OS, not File.pathSeparator
@@ -268,14 +263,14 @@
sunOSMBean.getTotalSwapSpaceSize(),
sunOSMBean.getFreeSwapSpaceSize());
- append("Committed virtual memory", kbStrings1[0]);
+ append(Messages.COMMITTED_VIRTUAL_MEMORY, kbStrings1[0]);
append(endTable);
append(newRightTable);
- append("Total physical memory", kbStrings2[0]);
- append("Free physical memory", kbStrings2[1]);
- append("Total swap space", kbStrings2[2]);
- append("Free swap space", kbStrings2[3]);
+ append(Messages.TOTAL_PHYSICAL_MEMORY, kbStrings2[0]);
+ append(Messages.FREE_PHYSICAL_MEMORY, kbStrings2[1]);
+ append(Messages.TOTAL_SWAP_SPACE, kbStrings2[2]);
+ append(Messages.FREE_SWAP_SPACE, kbStrings2[3]);
}
append(endTable);
@@ -290,13 +285,13 @@
for (String arg : inputArguments) {
args += arg + " ";
}
- append("VM arguments", args, 4);
- append("Class path", rmBean.getClassPath(), 4);
- append("Library path", rmBean.getLibraryPath(), 4);
- append("Boot class path",
+ append(Messages.VM_ARGUMENTS, args, 4);
+ append(Messages.CLASS_PATH, rmBean.getClassPath(), 4);
+ append(Messages.LIBRARY_PATH, rmBean.getLibraryPath(), 4);
+ append(Messages.BOOT_CLASS_PATH,
rmBean.isBootClassPathSupported()
? rmBean.getBootClassPath()
- : getText("Unavailable"),
+ : Messages.UNAVAILABLE,
4);
append(endTable);
}
@@ -327,7 +322,7 @@
}
void append(String label, String value) {
- append(newRow((label != null) ? getText(label) : label, value));
+ append(newRow(label, value));
}
private void append(String label, String value, int columnPerRow) {
@@ -335,13 +330,7 @@
value = value.replace(pathSeparator,
"<b></b>" + pathSeparator);
}
- append(newRow(getText(label), value, columnPerRow));
- }
-
- void append(String label1, String value1,
- String label2, String value2) {
- append(newRow(getText(label1), value1,
- getText(label2), value2));
+ append(newRow(label, value, columnPerRow));
}
OverviewPanel[] getOverviewPanels() {
@@ -355,7 +344,7 @@
private long prevUpTime, prevProcessCpuTime;
CPUOverviewPanel() {
- super(getText("CPU Usage"), cpuUsageKey, cpuUsageName, Plotter.Unit.PERCENT);
+ super(Messages.CPU_USAGE, cpuUsageKey, Messages.CPU_USAGE, Plotter.Unit.PERCENT);
getPlotter().setDecimals(CPU_DECIMALS);
}
@@ -373,14 +362,11 @@
getPlotter().addValues(result.timeStamp,
Math.round(cpuUsage * Math.pow(10.0, CPU_DECIMALS)));
- getInfoLabel().setText(getText(cpuUsageFormat,
+ getInfoLabel().setText(Resources.format(Messages.CPU_USAGE_FORMAT,
String.format("%."+CPU_DECIMALS+"f", cpuUsage)));
}
this.prevUpTime = result.upTime;
this.prevProcessCpuTime = result.processCpuTime;
}
}
-
-
-
}
diff --git a/src/share/classes/sun/tools/jconsole/Tab.java b/src/share/classes/sun/tools/jconsole/Tab.java
index 32ac8d6..512cc6b 100644
--- a/src/share/classes/sun/tools/jconsole/Tab.java
+++ b/src/share/classes/sun/tools/jconsole/Tab.java
@@ -26,9 +26,6 @@
package sun.tools.jconsole;
import java.awt.*;
-import java.awt.event.*;
-import java.beans.*;
-
import javax.swing.*;
public abstract class Tab extends JPanel {
diff --git a/src/share/classes/sun/tools/jconsole/ThreadTab.java b/src/share/classes/sun/tools/jconsole/ThreadTab.java
index 16a461c..d1cb677 100644
--- a/src/share/classes/sun/tools/jconsole/ThreadTab.java
+++ b/src/share/classes/sun/tools/jconsole/ThreadTab.java
@@ -35,14 +35,11 @@
import javax.swing.border.*;
import javax.swing.event.*;
+
import java.util.*;
import java.util.concurrent.*;
import java.util.List;
-import sun.awt.*;
-
-import static sun.tools.jconsole.OverviewPanel.*;
-import static sun.tools.jconsole.Resources.*;
import static sun.tools.jconsole.Utilities.*;
@@ -51,7 +48,7 @@
PlotterPanel threadMeter;
TimeComboBox timeComboBox;
JTabbedPane threadListTabbedPane;
- DefaultListModel listModel;
+ DefaultListModel<Long> listModel;
JTextField filterTF;
JLabel messageLabel;
JSplitPane threadsSplitPane;
@@ -64,9 +61,6 @@
private static final String threadCountKey = "threadCount";
private static final String peakKey = "peak";
- private static final String threadCountName = Resources.getText("Live Threads");
- private static final String peakName = Resources.getText("Peak");
-
private static final Color threadCountColor = Plotter.defaultColor;
private static final Color peakColor = Color.red;
@@ -93,7 +87,7 @@
public static String getTabName() {
- return Resources.getText("Threads");
+ return Messages.THREADS;
}
public ThreadTab(VMPanel vmPanel) {
@@ -111,28 +105,28 @@
JPanel controlPanel = new JPanel(new FlowLayout(FlowLayout.CENTER, 20, 5));
topPanel.add(controlPanel, BorderLayout.CENTER);
- threadMeter = new PlotterPanel(Resources.getText("Number of Threads"),
+ threadMeter = new PlotterPanel(Messages.NUMBER_OF_THREADS,
Plotter.Unit.NONE, true);
- threadMeter.plotter.createSequence(threadCountKey, threadCountName, threadCountColor, true);
- threadMeter.plotter.createSequence(peakKey, peakName, peakColor, true);
+ threadMeter.plotter.createSequence(threadCountKey, Messages.LIVE_THREADS, threadCountColor, true);
+ threadMeter.plotter.createSequence(peakKey, Messages.PEAK, peakColor, true);
setAccessibleName(threadMeter.plotter,
- getText("ThreadTab.threadPlotter.accessibleName"));
+ Messages.THREAD_TAB_THREAD_PLOTTER_ACCESSIBLE_NAME);
plotterPanel.add(threadMeter);
timeComboBox = new TimeComboBox(threadMeter.plotter);
- controlPanel.add(new LabeledComponent(Resources.getText("Time Range:"),
- getMnemonicInt("Time Range:"),
+ controlPanel.add(new LabeledComponent(Messages.TIME_RANGE_COLON,
+ Resources.getMnemonicInt(Messages.TIME_RANGE_COLON),
timeComboBox));
- listModel = new DefaultListModel();
+ listModel = new DefaultListModel<Long>();
JTextArea textArea = new JTextArea();
textArea.setBorder(thinEmptyBorder);
textArea.setEditable(false);
setAccessibleName(textArea,
- getText("ThreadTab.threadInfo.accessibleName"));
- JList list = new ThreadJList(listModel, textArea);
+ Messages.THREAD_TAB_THREAD_INFO_ACCESSIBLE_NAME);
+ ThreadJList list = new ThreadJList(listModel, textArea);
Dimension di = new Dimension(super.getPreferredSize());
di.width = Math.min(di.width, 200);
@@ -165,11 +159,11 @@
filterTF.getPreferredSize().height));
firstTabToolPanel.add(separator);
- JButton detectDeadlockButton = new JButton(Resources.getText("Detect Deadlock"));
- detectDeadlockButton.setMnemonic(getMnemonicInt("Detect Deadlock"));
+ JButton detectDeadlockButton = new JButton(Messages.DETECT_DEADLOCK);
+ detectDeadlockButton.setMnemonic(Resources.getMnemonicInt(Messages.DETECT_DEADLOCK));
detectDeadlockButton.setActionCommand("detectDeadlock");
detectDeadlockButton.addActionListener(this);
- detectDeadlockButton.setToolTipText(getText("Detect Deadlock.toolTip"));
+ detectDeadlockButton.setToolTipText(Messages.DETECT_DEADLOCK_TOOLTIP);
firstTabToolPanel.add(detectDeadlockButton);
messageLabel = new JLabel();
@@ -177,7 +171,7 @@
firstTabPanel.add(threadsSplitPane, BorderLayout.CENTER);
firstTabPanel.add(firstTabToolPanel, BorderLayout.SOUTH);
- threadListTabbedPane.addTab(Resources.getText("Threads"), firstTabPanel);
+ threadListTabbedPane.addTab(Messages.THREADS, firstTabPanel);
plotterPanel.add(threadListTabbedPane);
}
@@ -356,32 +350,32 @@
}
if (ti != null) {
if (ti.getLockName() == null) {
- sb.append(Resources.getText("Name State",
+ sb.append(Resources.format(Messages.NAME_STATE,
ti.getThreadName(),
ti.getThreadState().toString()));
} else if (ti.getLockOwnerName() == null) {
- sb.append(Resources.getText("Name State LockName",
+ sb.append(Resources.format(Messages.NAME_STATE_LOCK_NAME,
ti.getThreadName(),
ti.getThreadState().toString(),
ti.getLockName()));
} else {
- sb.append(Resources.getText("Name State LockName LockOwner",
+ sb.append(Resources.format(Messages.NAME_STATE_LOCK_NAME_LOCK_OWNER,
ti.getThreadName(),
ti.getThreadState().toString(),
ti.getLockName(),
ti.getLockOwnerName()));
}
- sb.append(Resources.getText("BlockedCount WaitedCount",
+ sb.append(Resources.format(Messages.BLOCKED_COUNT_WAITED_COUNT,
ti.getBlockedCount(),
ti.getWaitedCount()));
- sb.append(Resources.getText("Stack trace"));
+ sb.append(Messages.STACK_TRACE);
int index = 0;
for (StackTraceElement e : ti.getStackTrace()) {
sb.append(e.toString()+"\n");
if (monitors != null) {
for (MonitorInfo mi : monitors) {
if (mi.getLockedStackDepth() == index) {
- sb.append(Resources.getText("Monitor locked", mi.toString()));
+ sb.append(Resources.format(Messages.MONITOR_LOCKED, mi.toString()));
}
}
}
@@ -429,7 +423,7 @@
try {
SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
- String msg = Resources.getText("No deadlock detected");
+ String msg = Messages.NO_DEADLOCK_DETECTED;
messageLabel.setText(msg);
threadListTabbedPane.revalidate();
}
@@ -459,13 +453,13 @@
if (deadlockedThreads != null) {
for (int i = 0; i < deadlockedThreads.length; i++) {
- DefaultListModel listModel = new DefaultListModel();
+ DefaultListModel<Long> listModel = new DefaultListModel<Long>();
JTextArea textArea = new JTextArea();
textArea.setBorder(thinEmptyBorder);
textArea.setEditable(false);
setAccessibleName(textArea,
- getText("ThreadTab.threadInfo.accessibleName"));
- JList list = new ThreadJList(listModel, textArea);
+ Messages.THREAD_TAB_THREAD_INFO_ACCESSIBLE_NAME);
+ ThreadJList list = new ThreadJList(listModel, textArea);
JScrollPane threadlistSP = new JScrollPane(list);
JScrollPane textAreaSP = new JScrollPane(textArea);
threadlistSP.setBorder(null);
@@ -477,9 +471,9 @@
splitPane.setDividerLocation(threadsSplitPane.getDividerLocation());
String tabName;
if (deadlockedThreads.length > 1) {
- tabName = Resources.getText("deadlockTabN", i+1);
+ tabName = Resources.format(Messages.DEADLOCK_TAB_N, i+1);
} else {
- tabName = Resources.getText("deadlockTab");
+ tabName = Messages.DEADLOCK_TAB;
}
threadListTabbedPane.addTab(tabName, splitPane);
@@ -591,10 +585,10 @@
- private class ThreadJList extends JList {
+ private class ThreadJList extends JList<Long> {
private JTextArea textArea;
- ThreadJList(DefaultListModel listModel, JTextArea textArea) {
+ ThreadJList(DefaultListModel<Long> listModel, JTextArea textArea) {
super(listModel);
this.textArea = textArea;
@@ -603,7 +597,7 @@
addListSelectionListener(ThreadTab.this);
setCellRenderer(new DefaultListCellRenderer() {
- public Component getListCellRendererComponent(JList list, Object value, int index,
+ public Component getListCellRendererComponent(JList<?> list, Object value, int index,
boolean isSelected, boolean cellHasFocus) {
super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
@@ -691,12 +685,12 @@
private static class ThreadOverviewPanel extends OverviewPanel {
ThreadOverviewPanel() {
- super(getText("Threads"), threadCountKey, threadCountName, null);
+ super(Messages.THREADS, threadCountKey, Messages.LIVE_THREADS, null);
}
private void updateThreadsInfo(long tlCount, long tpCount, long ttCount, long timeStamp) {
getPlotter().addValues(timeStamp, tlCount);
- getInfoLabel().setText(getText(infoLabelFormat, tlCount, tpCount, ttCount));
+ getInfoLabel().setText(Resources.format(infoLabelFormat, tlCount, tpCount, ttCount));
}
}
}
diff --git a/src/share/classes/sun/tools/jconsole/VMInternalFrame.java b/src/share/classes/sun/tools/jconsole/VMInternalFrame.java
index cb38e8c..750d444 100644
--- a/src/share/classes/sun/tools/jconsole/VMInternalFrame.java
+++ b/src/share/classes/sun/tools/jconsole/VMInternalFrame.java
@@ -26,16 +26,9 @@
package sun.tools.jconsole;
import java.awt.*;
-import java.awt.event.*;
-import java.io.*;
-import java.util.*;
-
import javax.swing.*;
-import javax.swing.Timer;
-import javax.swing.border.*;
-import javax.swing.event.*;
-import static sun.tools.jconsole.Resources.*;
+
import static sun.tools.jconsole.Utilities.*;
@SuppressWarnings("serial")
@@ -47,7 +40,7 @@
this.vmPanel = vmPanel;
setAccessibleDescription(this,
- getText("VMInternalFrame.accessibleDescription"));
+ Messages.VMINTERNAL_FRAME_ACCESSIBLE_DESCRIPTION);
getContentPane().add(vmPanel, BorderLayout.CENTER);
pack();
vmPanel.updateFrameTitle();
diff --git a/src/share/classes/sun/tools/jconsole/VMPanel.java b/src/share/classes/sun/tools/jconsole/VMPanel.java
index ebaf170..d9072b0 100644
--- a/src/share/classes/sun/tools/jconsole/VMPanel.java
+++ b/src/share/classes/sun/tools/jconsole/VMPanel.java
@@ -28,18 +28,16 @@
import java.awt.*;
import java.awt.event.*;
import java.beans.*;
-import java.io.*;
import java.lang.reflect.*;
import java.util.*;
import java.util.List;
import java.util.Timer;
-
import javax.swing.*;
import javax.swing.plaf.*;
+
import com.sun.tools.jconsole.JConsolePlugin;
import com.sun.tools.jconsole.JConsoleContext;
-import static com.sun.tools.jconsole.JConsoleContext.ConnectionState.*;
import static sun.tools.jconsole.ProxyClient.*;
@@ -51,13 +49,10 @@
private int updateInterval;
private String hostName;
private int port;
- private int vmid;
private String userName;
private String password;
private String url;
private VMInternalFrame vmIF = null;
- private static final String windowsLaF =
- "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";
private static ArrayList<TabInfo> tabInfos = new ArrayList<TabInfo>();
private boolean wasConnected = false;
@@ -100,7 +95,6 @@
this.updateInterval = updateInterval;
this.hostName = proxyClient.getHostName();
this.port = proxyClient.getPort();
- this.vmid = proxyClient.getVmid();
this.userName = proxyClient.getUserName();
this.password = proxyClient.getPassword();
this.url = proxyClient.getUrl();
@@ -186,9 +180,9 @@
public String getToolTipText(MouseEvent event) {
if (connectedIconBounds.contains(event.getPoint())) {
if (isConnected()) {
- return getText("Connected. Click to disconnect.");
+ return Messages.CONNECTED_PUNCTUATION_CLICK_TO_DISCONNECT_;
} else {
- return getText("Disconnected. Click to connect.");
+ return Messages.DISCONNECTED_PUNCTUATION_CLICK_TO_CONNECT_;
}
} else {
return super.getToolTipText(event);
@@ -219,7 +213,7 @@
private Tab instantiate(TabInfo tabInfo) {
try {
- Constructor con = tabInfo.tabClass.getConstructor(VMPanel.class);
+ Constructor<?> con = tabInfo.tabClass.getConstructor(VMPanel.class);
return (Tab) con.newInstance(this);
} catch (Exception ex) {
System.err.println(ex);
@@ -354,7 +348,7 @@
private void onConnecting() {
time0 = System.currentTimeMillis();
- final JConsole jc = (JConsole) SwingUtilities.getWindowAncestor(this);
+ SwingUtilities.getWindowAncestor(this);
String connectionName = getConnectionName();
progressBar = new JProgressBar();
@@ -363,9 +357,9 @@
progressPanel.add(progressBar);
Object[] message = {
- "<html><h3>" + getText("connectingTo1", connectionName) + "</h3></html>",
+ "<html><h3>" + Resources.format(Messages.CONNECTING_TO1, connectionName) + "</h3></html>",
progressPanel,
- "<html><b>" + getText("connectingTo2", connectionName) + "</b></html>"
+ "<html><b>" + Resources.format(Messages.CONNECTING_TO2, connectionName) + "</b></html>"
};
optionPane =
@@ -373,7 +367,7 @@
message,
JOptionPane.DEFAULT_OPTION,
JOptionPane.INFORMATION_MESSAGE, null,
- new String[]{getText("Cancel")},
+ new String[]{Messages.CANCEL},
0);
@@ -409,7 +403,7 @@
if (vmIF != null) {
String displayName = getDisplayName();
if (!proxyClient.isConnected()) {
- displayName = getText("ConnectionName (disconnected)", displayName);
+ displayName = Resources.format(Messages.CONNECTION_NAME__DISCONNECTED_, displayName);
}
vmIF.setTitle(displayName);
}
@@ -458,25 +452,18 @@
private void vmPanelDied() {
disconnect();
- final JConsole jc = (JConsole) SwingUtilities.getWindowAncestor(this);
-
JOptionPane optionPane;
-
- final String connectStr = getText("Connect");
- final String reconnectStr = getText("Reconnect");
- final String cancelStr = getText("Cancel");
-
String msgTitle, msgExplanation, buttonStr;
if (wasConnected) {
wasConnected = false;
- msgTitle = getText("connectionLost1");
- msgExplanation = getText("connectionLost2", getConnectionName());
- buttonStr = reconnectStr;
+ msgTitle = Messages.CONNECTION_LOST1;
+ msgExplanation = Resources.format(Messages.CONNECTING_TO2, getConnectionName());
+ buttonStr = Messages.RECONNECT;
} else {
- msgTitle = getText("connectionFailed1");
- msgExplanation = getText("connectionFailed2", getConnectionName());
- buttonStr = connectStr;
+ msgTitle =Messages.CONNECTION_FAILED1;
+ msgExplanation = Resources.format(Messages.CONNECTION_FAILED2, getConnectionName());
+ buttonStr = Messages.CONNECT;
}
optionPane =
@@ -485,7 +472,7 @@
"<b>" + msgExplanation + "</b>",
JOptionPane.DEFAULT_OPTION,
JOptionPane.WARNING_MESSAGE, null,
- new String[]{buttonStr, cancelStr},
+ new String[]{buttonStr, Messages.CANCEL},
0);
optionPane.addPropertyChangeListener(new PropertyChangeListener() {
@@ -494,7 +481,7 @@
if (event.getPropertyName().equals(JOptionPane.VALUE_PROPERTY)) {
Object value = event.getNewValue();
- if (value == reconnectStr || value == connectStr) {
+ if (value == Messages.RECONNECT || value == Messages.CONNECT) {
connect();
} else if (!everConnected) {
try {
@@ -643,11 +630,6 @@
}
}
- // Convenience methods
- private static String getText(String key, Object... args) {
- return Resources.getText(key, args);
- }
-
private void createPluginTabs() {
// add plugin tabs if not done
if (!pluginTabsAdded) {
diff --git a/src/share/classes/sun/tools/jconsole/VariableGridLayout.java b/src/share/classes/sun/tools/jconsole/VariableGridLayout.java
index 3cf55b0..2d5851c 100644
--- a/src/share/classes/sun/tools/jconsole/VariableGridLayout.java
+++ b/src/share/classes/sun/tools/jconsole/VariableGridLayout.java
@@ -26,7 +26,6 @@
package sun.tools.jconsole;
import java.awt.*;
-import java.util.*;
import javax.swing.*;
diff --git a/src/share/classes/sun/tools/jconsole/Version.java.template b/src/share/classes/sun/tools/jconsole/Version.java.template
index b768be8..f52ac65 100644
--- a/src/share/classes/sun/tools/jconsole/Version.java.template
+++ b/src/share/classes/sun/tools/jconsole/Version.java.template
@@ -26,6 +26,7 @@
package sun.tools.jconsole;
import java.io.PrintStream;
+import sun.tools.jconsole.Messages;
public class Version {
private static final String jconsole_version =
@@ -34,19 +35,19 @@
public static void print(PrintStream ps) {
printFullVersion(ps);
- ps.println(Resources.getText("Name and Build",
- System.getProperty("java.runtime.name"),
- System.getProperty("java.runtime.version")));
+ ps.println(Resources.format(Messages.NAME_AND_BUILD,
+ System.getProperty("java.runtime.name"),
+ System.getProperty("java.runtime.version")));
- ps.println(Resources.getText("Name Build and Mode",
- System.getProperty("java.vm.name"),
- System.getProperty("java.vm.version"),
- System.getProperty("java.vm.info")));
+ ps.println(Resources.format(Messages.NAME_AND_BUILD,
+ System.getProperty("java.vm.name"),
+ System.getProperty("java.vm.version"),
+ System.getProperty("java.vm.info")));
}
public static void printFullVersion(PrintStream ps) {
- ps.println(Resources.getText("JConsole version", jconsole_version));
+ ps.println(Resources.format(Messages.JCONSOLE_VERSION, jconsole_version));
}
static String getVersion() {
diff --git a/src/share/classes/sun/tools/jconsole/inspector/OperationEntry.java b/src/share/classes/sun/tools/jconsole/inspector/OperationEntry.java
index 4ada1cd..30dde2b 100644
--- a/src/share/classes/sun/tools/jconsole/inspector/OperationEntry.java
+++ b/src/share/classes/sun/tools/jconsole/inspector/OperationEntry.java
@@ -25,30 +25,14 @@
package sun.tools.jconsole.inspector;
-// java import
import java.awt.*;
-import java.awt.event.*;
-import java.awt.dnd.*;
-import java.lang.reflect.*;
-import java.io.*;
-//
-
-// swing import
-import javax.swing.border.*;
-import javax.swing.event.*;
import javax.swing.*;
-//
-
-// jmx import
import javax.management.*;
-//
-
@SuppressWarnings("serial")
public class OperationEntry extends JPanel {
private MBeanOperationInfo operation;
private JComboBox sigs;
- private Dimension preferredSize;
private XTextField inputs[];
public OperationEntry (MBeanOperationInfo operation,
@@ -61,26 +45,10 @@
setPanel(isCallable, button, xoperations);
}
- /**
- * This method chops off the throws exceptions, removes "java.lang".
- */
- private String preProcessSignature(String signature) {
- int index;
- if ((index=signature.indexOf(" throws"))>0) {
- signature = signature.substring(0,index);
- }
- while ((index = signature.indexOf("java.lang."))>0) {
- signature = signature.substring(0,index)+
- signature.substring(index+10,signature.length());
- }
- return signature;
- }
-
- private void setPanel(boolean isCallable,
+ private void setPanel(boolean isCallable,
JButton button,
XOperations xoperations) {
try {
- String defaultVal;
MBeanParameterInfo params[] = operation.getSignature();
add(new JLabel("(",JLabel.CENTER));
inputs = new XTextField[params.length];
diff --git a/src/share/classes/sun/tools/jconsole/inspector/TableSorter.java b/src/share/classes/sun/tools/jconsole/inspector/TableSorter.java
index 4894d4a..b89ab72 100644
--- a/src/share/classes/sun/tools/jconsole/inspector/TableSorter.java
+++ b/src/share/classes/sun/tools/jconsole/inspector/TableSorter.java
@@ -94,7 +94,7 @@
@SuppressWarnings("unchecked")
private int compare(Object o1, Object o2) {
// take care of the case where both o1 & o2 are null. Needed to keep
- // the method symetric. Without this quickSort gives surprising results.
+ // the method symmetric. Without this quickSort gives surprising results.
if (o1 == o2)
return 0;
if (o1==null)
diff --git a/src/share/classes/sun/tools/jconsole/inspector/ThreadDialog.java b/src/share/classes/sun/tools/jconsole/inspector/ThreadDialog.java
index d7b6095..dbcdd63 100644
--- a/src/share/classes/sun/tools/jconsole/inspector/ThreadDialog.java
+++ b/src/share/classes/sun/tools/jconsole/inspector/ThreadDialog.java
@@ -28,7 +28,6 @@
// java import
import java.awt.*;
import javax.swing.*;
-import java.io.*;
//
public class ThreadDialog implements Runnable {
diff --git a/src/share/classes/sun/tools/jconsole/inspector/Utils.java b/src/share/classes/sun/tools/jconsole/inspector/Utils.java
index 885af95..cc97c4e 100644
--- a/src/share/classes/sun/tools/jconsole/inspector/Utils.java
+++ b/src/share/classes/sun/tools/jconsole/inspector/Utils.java
@@ -284,7 +284,7 @@
*/
public static Object newStringConstructor(String type, String param)
throws Exception {
- Constructor c = Utils.getClass(type).getConstructor(String.class);
+ Constructor<?> c = Utils.getClass(type).getConstructor(String.class);
try {
return c.newInstance(param);
} catch (InvocationTargetException e) {
diff --git a/src/share/classes/sun/tools/jconsole/inspector/XArrayDataViewer.java b/src/share/classes/sun/tools/jconsole/inspector/XArrayDataViewer.java
index 8f4abfc..b42d5c6 100644
--- a/src/share/classes/sun/tools/jconsole/inspector/XArrayDataViewer.java
+++ b/src/share/classes/sun/tools/jconsole/inspector/XArrayDataViewer.java
@@ -46,9 +46,9 @@
if (isViewableValue(value)) {
Object[] arr;
if (value instanceof Collection) {
- arr = ((Collection) value).toArray();
+ arr = ((Collection<?>) value).toArray();
} else if (value instanceof Map) {
- arr = ((Map) value).entrySet().toArray();
+ arr = ((Map<?,?>) value).entrySet().toArray();
} else if (value instanceof Object[]) {
arr = (Object[]) value;
} else {
diff --git a/src/share/classes/sun/tools/jconsole/inspector/XDataViewer.java b/src/share/classes/sun/tools/jconsole/inspector/XDataViewer.java
index 0742748..c820d83 100644
--- a/src/share/classes/sun/tools/jconsole/inspector/XDataViewer.java
+++ b/src/share/classes/sun/tools/jconsole/inspector/XDataViewer.java
@@ -34,7 +34,7 @@
import java.awt.Container;
import sun.tools.jconsole.MBeansTab;
-import sun.tools.jconsole.Resources;
+import sun.tools.jconsole.Messages;
public class XDataViewer {
@@ -100,10 +100,10 @@
public static String getActionLabel(int type) {
if(type == ARRAY ||
type == OPEN)
- return Resources.getText("visualize");
+ return Messages.VISUALIZE;
if(type == NUMERIC)
- return Resources.getText("plot");
- return Resources.getText("expand");
+ return Messages.PLOT;
+ return Messages.EXPAND;
}
public Component createOperationViewer(Object value,
diff --git a/src/share/classes/sun/tools/jconsole/inspector/XMBeanAttributes.java b/src/share/classes/sun/tools/jconsole/inspector/XMBeanAttributes.java
index 0fe157f..474b928 100644
--- a/src/share/classes/sun/tools/jconsole/inspector/XMBeanAttributes.java
+++ b/src/share/classes/sun/tools/jconsole/inspector/XMBeanAttributes.java
@@ -66,9 +66,9 @@
import javax.swing.table.TableColumnModel;
import javax.swing.table.TableModel;
-import sun.tools.jconsole.Resources;
import sun.tools.jconsole.MBeansTab;
import sun.tools.jconsole.JConsole;
+import sun.tools.jconsole.Messages;
import sun.tools.jconsole.ProxyClient.SnapshotMBeanServerConnection;
/*IMPORTANT :
@@ -84,8 +84,8 @@
Logger.getLogger(XMBeanAttributes.class.getPackage().getName());
private final static String[] columnNames =
- {Resources.getText("Name"),
- Resources.getText("Value")};
+ {Messages.NAME,
+ Messages.VALUE};
private XMBean mbean;
private MBeanInfo mbeanInfo;
@@ -267,7 +267,7 @@
public boolean isColumnEditable(int column) {
if (column < getColumnCount()) {
- return getColumnName(column).equals(Resources.getText("Value"));
+ return getColumnName(column).equals(Messages.VALUE);
}
else {
return false;
@@ -313,7 +313,7 @@
if (value != null) {
tip = value.toString();
if(isAttributeViewable(row, VALUE_COLUMN))
- tip = Resources.getText("Double click to expand/collapse")+
+ tip = Messages.DOUBLE_CLICK_TO_EXPAND_FORWARD_SLASH_COLLAPSE+
". " + tip;
}
@@ -589,7 +589,7 @@
comp,
rowMinHeight);
- mbeansTab.getDataViewer().registerForMouseEvent(
+ XDataViewer.registerForMouseEvent(
comp, mouseListener);
} else
return cell;
@@ -724,7 +724,7 @@
mbeansTab.getDataViewer().createAttributeViewer(
value, mbean, attribute, XMBeanAttributes.this);
cell.init(cell.getMinRenderer(), comp, cell.getMinHeight());
- mbeansTab.getDataViewer().registerForMouseEvent(comp, mouseListener);
+ XDataViewer.registerForMouseEvent(comp, mouseListener);
}
} else {
cell = new ZoomedCell(value);
@@ -735,7 +735,7 @@
}
}
- //will be called in a synchronzed block
+ //will be called in a synchronized block
protected void addTableData(DefaultTableModel tableModel,
XMBean mbean,
MBeanAttributeInfo[] attributesInfo,
@@ -749,7 +749,7 @@
for (int i = 0; i < attributesInfo.length; i++) {
rowData[0] = (attributesInfo[i].getName());
if (unavailableAttributes.containsKey(rowData[0])) {
- rowData[1] = Resources.getText("Unavailable");
+ rowData[1] = Messages.UNAVAILABLE;
} else if (viewableAttributes.containsKey(rowData[0])) {
rowData[1] = viewableAttributes.get(rowData[0]);
if (!attributesInfo[i].isWritable() ||
@@ -811,7 +811,6 @@
}
}
- @SuppressWarnings("serial")
class ValueCellEditor extends XTextFieldEditor {
// implements javax.swing.table.TableCellEditor
@Override
@@ -866,7 +865,6 @@
}
}
- @SuppressWarnings("serial")
class MaximizedCellRenderer extends DefaultTableCellRenderer {
Component comp;
MaximizedCellRenderer(Component comp) {
@@ -1018,7 +1016,7 @@
(String)tableValue);// value
} catch (Throwable ex) {
popupAndLog(ex,"tableChanged",
- "Problem setting attribute");
+ Messages.PROBLEM_SETTING_ATTRIBUTE);
}
}
final String attributeName = getValueName(e.getFirstRow());
@@ -1042,7 +1040,7 @@
}
mbean.setAttribute(attribute);
} catch (Throwable ex) {
- popupAndLog(ex,method,"Problem setting attribute");
+ popupAndLog(ex,method,Messages.PROBLEM_SETTING_ATTRIBUTE);
}
return null;
}
@@ -1062,7 +1060,7 @@
}
// Call this outside EDT
- private void popupAndLog(Throwable ex, String method, String key) {
+ private void popupAndLog(Throwable ex, String method, String title) {
ex = Utils.getActualException(ex);
if (JConsole.isDebug()) ex.printStackTrace();
@@ -1070,7 +1068,7 @@
: ex.toString();
EventQueue.invokeLater(
new ThreadDialog(component, message+"\n",
- Resources.getText(key),
+ title,
JOptionPane.ERROR_MESSAGE));
}
}
diff --git a/src/share/classes/sun/tools/jconsole/inspector/XMBeanInfo.java b/src/share/classes/sun/tools/jconsole/inspector/XMBeanInfo.java
index c98c482..cac986a 100644
--- a/src/share/classes/sun/tools/jconsole/inspector/XMBeanInfo.java
+++ b/src/share/classes/sun/tools/jconsole/inspector/XMBeanInfo.java
@@ -35,7 +35,8 @@
import javax.swing.border.TitledBorder;
import javax.swing.event.*;
import javax.swing.table.*;
-import sun.tools.jconsole.Resources;
+
+import sun.tools.jconsole.Messages;
import static sun.tools.jconsole.Utilities.*;
@@ -43,11 +44,11 @@
public class XMBeanInfo extends JPanel {
private static final Color lightYellow = new Color(255, 255, 128);
- private final int NAME_COLUMN = 0;
+ private final int NAME_COLUMN = 0;
private final int VALUE_COLUMN = 1;
private final String[] columnNames = {
- Resources.getText("Name"),
- Resources.getText("Value")
+ Messages.NAME,
+ Messages.VALUE
};
private JTable infoTable = new JTable();
private JTable descTable = new JTable();
@@ -163,7 +164,7 @@
descTable.setAutoResizeMode(JTable.AUTO_RESIZE_SUBSEQUENT_COLUMNS);
JScrollPane descTableScrollPane = new JScrollPane(descTable);
descBorderPanel.setBorder(
- BorderFactory.createTitledBorder(Resources.getText("Descriptor")));
+ BorderFactory.createTitledBorder(Messages.DESCRIPTOR));
descBorderPanel.add(descTableScrollPane);
// Add the two tables to the grid
//
@@ -230,20 +231,20 @@
emptyInfoTable();
emptyDescTable();
((TitledBorder) infoBorderPanel.getBorder()).setTitle(
- Resources.getText("MBeanInfo"));
- String text = Resources.getText("Info") + ":";
+ Messages.MBEAN_INFO);
+ String text = Messages.INFO + ":";
DefaultTableModel tableModel = (DefaultTableModel) infoTable.getModel();
Object rowData[] = new Object[2];
rowData[0] = new TableRowDivider(text);
rowData[1] = new TableRowDivider("");
tableModel.addRow(rowData);
- rowData[0] = Resources.getText("ObjectName");
+ rowData[0] = Messages.OBJECT_NAME;
rowData[1] = mbean.getObjectName();
tableModel.addRow(rowData);
- rowData[0] = Resources.getText("ClassName");
+ rowData[0] = Messages.CLASS_NAME;
rowData[1] = mbeanInfo.getClassName();
tableModel.addRow(rowData);
- rowData[0] = Resources.getText("Description");
+ rowData[0] = Messages.DESCRIPTION;
rowData[1] = mbeanInfo.getDescription();
tableModel.addRow(rowData);
addDescriptor(mbeanInfo.getDescriptor(), text);
@@ -252,13 +253,13 @@
int i = 0;
for (MBeanConstructorInfo mbci : mbeanInfo.getConstructors()) {
addMBeanConstructorInfo(mbci,
- Resources.getText("Constructor") + "-" + i + ":");
+ Messages.CONSTRUCTOR + "-" + i + ":");
// MBeanParameterInfo
//
int j = 0;
for (MBeanParameterInfo mbpi : mbci.getSignature()) {
addMBeanParameterInfo(mbpi,
- Resources.getText("Parameter") + "-" + i + "-" + j + ":");
+ Messages.PARAMETER + "-" + i + "-" + j + ":");
j++;
}
i++;
@@ -271,29 +272,29 @@
emptyInfoTable();
emptyDescTable();
((TitledBorder) infoBorderPanel.getBorder()).setTitle(
- Resources.getText("MBeanAttributeInfo"));
- String text = Resources.getText("Attribute") + ":";
+ Messages.MBEAN_ATTRIBUTE_INFO);
+ String text = Messages.ATTRIBUTE + ":";
DefaultTableModel tableModel = (DefaultTableModel) infoTable.getModel();
Object rowData[] = new Object[2];
rowData[0] = new TableRowDivider(text);
rowData[1] = new TableRowDivider("");
tableModel.addRow(rowData);
- rowData[0] = Resources.getText("Name");
+ rowData[0] = Messages.NAME;
rowData[1] = mbai.getName();
tableModel.addRow(rowData);
- rowData[0] = Resources.getText("Description");
+ rowData[0] = Messages.DESCRIPTION;
rowData[1] = mbai.getDescription();
tableModel.addRow(rowData);
- rowData[0] = Resources.getText("Readable");
+ rowData[0] = Messages.READABLE;
rowData[1] = mbai.isReadable();
tableModel.addRow(rowData);
- rowData[0] = Resources.getText("Writable");
+ rowData[0] = Messages.WRITABLE;
rowData[1] = mbai.isWritable();
tableModel.addRow(rowData);
- rowData[0] = Resources.getText("Is");
+ rowData[0] = Messages.IS;
rowData[1] = mbai.isIs();
tableModel.addRow(rowData);
- rowData[0] = Resources.getText("Type");
+ rowData[0] = Messages.TYPE;
rowData[1] = mbai.getType();
tableModel.addRow(rowData);
addDescriptor(mbai.getDescriptor(), text);
@@ -305,36 +306,36 @@
emptyInfoTable();
emptyDescTable();
((TitledBorder) infoBorderPanel.getBorder()).setTitle(
- Resources.getText("MBeanOperationInfo"));
- String text = Resources.getText("Operation") + ":";
+ Messages.MBEAN_OPERATION_INFO);
+ String text = Messages.OPERATION + ":";
DefaultTableModel tableModel = (DefaultTableModel) infoTable.getModel();
Object rowData[] = new Object[2];
rowData[0] = new TableRowDivider(text);
rowData[1] = new TableRowDivider("");
tableModel.addRow(rowData);
- rowData[0] = Resources.getText("Name");
+ rowData[0] = Messages.NAME;
rowData[1] = mboi.getName();
tableModel.addRow(rowData);
- rowData[0] = Resources.getText("Description");
+ rowData[0] = Messages.DESCRIPTION;
rowData[1] = mboi.getDescription();
tableModel.addRow(rowData);
- rowData[0] = Resources.getText("Impact");
+ rowData[0] = Messages.IMPACT;
switch (mboi.getImpact()) {
case MBeanOperationInfo.INFO:
- rowData[1] = Resources.getText("INFO");
+ rowData[1] = Messages.INFO_CAPITALIZED;
break;
case MBeanOperationInfo.ACTION:
- rowData[1] = Resources.getText("ACTION");
+ rowData[1] = Messages.ACTION_CAPITALIZED;
break;
case MBeanOperationInfo.ACTION_INFO:
- rowData[1] = Resources.getText("ACTION_INFO");
+ rowData[1] = Messages.ACTION_INFO_CAPITALIZED;
break;
case MBeanOperationInfo.UNKNOWN:
- rowData[1] = Resources.getText("UNKNOWN");
+ rowData[1] = Messages.UNKNOWN_CAPITALIZED;
break;
}
tableModel.addRow(rowData);
- rowData[0] = Resources.getText("ReturnType");
+ rowData[0] = Messages.RETURN_TYPE;
rowData[1] = mboi.getReturnType();
tableModel.addRow(rowData);
addDescriptor(mboi.getDescriptor(), text);
@@ -343,7 +344,7 @@
int i = 0;
for (MBeanParameterInfo mbpi : mboi.getSignature()) {
addMBeanParameterInfo(mbpi,
- Resources.getText("Parameter") + "-" + i++ + ":");
+ Messages.PARAMETER + "-" + i++ + ":");
}
tableModel.newDataAvailable(new TableModelEvent(tableModel));
}
@@ -353,20 +354,20 @@
emptyInfoTable();
emptyDescTable();
((TitledBorder) infoBorderPanel.getBorder()).setTitle(
- Resources.getText("MBeanNotificationInfo"));
- String text = Resources.getText("Notification") + ":";
+ Messages.MBEAN_NOTIFICATION_INFO);
+ String text = Messages.NOTIFICATION + ":";
DefaultTableModel tableModel = (DefaultTableModel) infoTable.getModel();
Object rowData[] = new Object[2];
rowData[0] = new TableRowDivider(text);
rowData[1] = new TableRowDivider("");
tableModel.addRow(rowData);
- rowData[0] = Resources.getText("Name");
+ rowData[0] = Messages.NAME;
rowData[1] = mbni.getName();
tableModel.addRow(rowData);
- rowData[0] = Resources.getText("Description");
+ rowData[0] = Messages.DESCRIPTION;
rowData[1] = mbni.getDescription();
tableModel.addRow(rowData);
- rowData[0] = Resources.getText("NotifTypes");
+ rowData[0] = Messages.NOTIF_TYPES;
rowData[1] = Arrays.toString(mbni.getNotifTypes());
tableModel.addRow(rowData);
addDescriptor(mbni.getDescriptor(), text);
@@ -380,10 +381,10 @@
rowData[0] = new TableRowDivider(text);
rowData[1] = new TableRowDivider("");
tableModel.addRow(rowData);
- rowData[0] = Resources.getText("Name");
+ rowData[0] = Messages.NAME;
rowData[1] = mbci.getName();
tableModel.addRow(rowData);
- rowData[0] = Resources.getText("Description");
+ rowData[0] = Messages.DESCRIPTION;
rowData[1] = mbci.getDescription();
tableModel.addRow(rowData);
addDescriptor(mbci.getDescriptor(), text);
@@ -397,13 +398,13 @@
rowData[0] = new TableRowDivider(text);
rowData[1] = new TableRowDivider("");
tableModel.addRow(rowData);
- rowData[0] = Resources.getText("Name");
+ rowData[0] = Messages.NAME;
rowData[1] = mbpi.getName();
tableModel.addRow(rowData);
- rowData[0] = Resources.getText("Description");
+ rowData[0] = Messages.DESCRIPTION;
rowData[1] = mbpi.getDescription();
tableModel.addRow(rowData);
- rowData[0] = Resources.getText("Type");
+ rowData[0] = Messages.TYPE;
rowData[1] = mbpi.getType();
tableModel.addRow(rowData);
addDescriptor(mbpi.getDescriptor(), text);
diff --git a/src/share/classes/sun/tools/jconsole/inspector/XMBeanNotifications.java b/src/share/classes/sun/tools/jconsole/inspector/XMBeanNotifications.java
index 2d11b8a..5077797 100644
--- a/src/share/classes/sun/tools/jconsole/inspector/XMBeanNotifications.java
+++ b/src/share/classes/sun/tools/jconsole/inspector/XMBeanNotifications.java
@@ -26,7 +26,6 @@
package sun.tools.jconsole.inspector;
import javax.swing.*;
-import javax.swing.event.*;
import javax.swing.table.*;
import javax.swing.tree.*;
import java.awt.Font;
@@ -46,19 +45,19 @@
import javax.management.openmbean.TabularData;
import sun.tools.jconsole.JConsole;
-import sun.tools.jconsole.Resources;
+import sun.tools.jconsole.Messages;
@SuppressWarnings("serial")
public class XMBeanNotifications extends JTable implements NotificationListener {
private final static String[] columnNames = {
- Resources.getText("TimeStamp"),
- Resources.getText("Type"),
- Resources.getText("UserData"),
- Resources.getText("SeqNum"),
- Resources.getText("Message"),
- Resources.getText("Event"),
- Resources.getText("Source")
+ Messages.TIME_STAMP,
+ Messages.TYPE,
+ Messages.USER_DATA,
+ Messages.SEQ_NUM,
+ Messages.MESSAGE,
+ Messages.EVENT,
+ Messages.SOURCE
};
private HashMap<ObjectName, XMBeanNotificationsListener> listeners =
new HashMap<ObjectName, XMBeanNotificationsListener>();
@@ -183,7 +182,7 @@
}
if (cell != null) {
- toolTip = Resources.getText("Double click to expand/collapse") +
+ toolTip = Messages.DOUBLE_CLICK_TO_EXPAND_FORWARD_SLASH_COLLAPSE+
". " + cell.toString();
} else {
Object val =
@@ -599,7 +598,6 @@
class XMBeanNotificationsListener implements NotificationListener {
- private String[] columnNames;
private XMBean xmbean;
private DefaultMutableTreeNode node;
private volatile long received;
@@ -615,7 +613,6 @@
this.notifications = notifications;
this.xmbean = xmbean;
this.node = node;
- this.columnNames = columnNames;
register(node);
}
diff --git a/src/share/classes/sun/tools/jconsole/inspector/XObject.java b/src/share/classes/sun/tools/jconsole/inspector/XObject.java
index 9e56286..303090a 100644
--- a/src/share/classes/sun/tools/jconsole/inspector/XObject.java
+++ b/src/share/classes/sun/tools/jconsole/inspector/XObject.java
@@ -28,17 +28,6 @@
// java import
import javax.swing.*;
-//
-
-// java import
-import java.io.*;
-import java.awt.*;
-import java.awt.dnd.*;
-import java.awt.datatransfer.*;
-import java.net.*;
-//
-
-
/**
* This provides a wrapper to the Object class to allow it to be
displayed/manipulated as a GUI object.
diff --git a/src/share/classes/sun/tools/jconsole/inspector/XOpenTypeViewer.java b/src/share/classes/sun/tools/jconsole/inspector/XOpenTypeViewer.java
index fb4ddf1..108ff7a 100644
--- a/src/share/classes/sun/tools/jconsole/inspector/XOpenTypeViewer.java
+++ b/src/share/classes/sun/tools/jconsole/inspector/XOpenTypeViewer.java
@@ -28,33 +28,21 @@
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.table.*;
-import javax.swing.tree.*;
-import javax.swing.border.*;
import java.awt.BorderLayout;
-import java.awt.GridLayout;
import java.awt.FlowLayout;
import java.awt.Component;
-import java.awt.EventQueue;
import java.awt.Color;
import java.awt.Font;
-import java.awt.Rectangle;
import java.awt.event.*;
-import java.awt.Insets;
import java.awt.Dimension;
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
import java.util.*;
-import java.io.*;
import java.lang.reflect.Array;
-import javax.management.*;
import javax.management.openmbean.*;
-import sun.tools.jconsole.BorderedComponent;
import sun.tools.jconsole.JConsole;
-import sun.tools.jconsole.LabeledComponent;
+import sun.tools.jconsole.Messages;
import sun.tools.jconsole.Resources;
-import sun.tools.jconsole.VariableGridLayout;
@SuppressWarnings("serial")
public class XOpenTypeViewer extends JPanel implements ActionListener {
@@ -65,9 +53,9 @@
XOpenTypeDataListener listener = new XOpenTypeDataListener();
private static final String compositeNavigationSingle =
- Resources.getText("MBeansTab.compositeNavigationSingle");
+ Messages.MBEANS_TAB_COMPOSITE_NAVIGATION_SINGLE;
private static final String tabularNavigationSingle =
- Resources.getText("MBeansTab.tabularNavigationSingle");
+ Messages.MBEANS_TAB_TABULAR_NAVIGATION_SINGLE;
private static TableCellEditor editor =
new Utils.ReadOnlyTableCellEditor(new JTextField());
@@ -121,7 +109,6 @@
static abstract class XOpenTypeData extends JTable {
XOpenTypeData parent;
- private Color defaultColor;
protected int col1Width = -1;
protected int col2Width = -1;
private boolean init;
@@ -139,7 +126,7 @@
Object value = getModel().getValueAt(row, col);
if (value != null) {
if(isClickableElement(value))
- return Resources.getText("Double click to visualize")
+ return Messages.DOUBLE_CLICK_TO_VISUALIZE
+ ". " + value.toString();
else
return value.toString();
@@ -265,7 +252,7 @@
Object c1 = o1.get(key);
Object c2 = o2.get(key);
if (c1 instanceof Comparable && c2 instanceof Comparable) {
- int result = ((Comparable) c1).compareTo(c2);
+ int result = ((Comparable<Object>) c1).compareTo(c2);
if (result != 0)
return result;
}
@@ -358,7 +345,7 @@
static class XCompositeData extends XOpenTypeData {
protected final String[] columnNames = {
- Resources.getText("Name"), Resources.getText("Value")
+ Messages.NAME, Messages.VALUE
};
CompositeData composite;
@@ -398,8 +385,8 @@
private void load(CompositeData data) {
CompositeType type = data.getCompositeType();
- Set keys = type.keySet();
- Iterator it = keys.iterator();
+ Set<String> keys = type.keySet();
+ Iterator<String> it = keys.iterator();
Object[] rowData = new Object[2];
while (it.hasNext()) {
String key = (String) it.next();
@@ -408,13 +395,13 @@
if (val == null) {
rowData[1] = "";
} else {
- OpenType openType = type.getType(key);
+ OpenType<?> openType = type.getType(key);
if (openType instanceof CompositeType) {
rowData[1] =
new XCompositeData(this, (CompositeData) val);
} else if (openType instanceof ArrayType) {
rowData[1] =
- new XArrayData(this, (ArrayType) openType, val);
+ new XArrayData(this, (ArrayType<?>) openType, val);
} else if (openType instanceof SimpleType) {
rowData[1] = val;
} else if (openType instanceof TabularType) {
@@ -453,21 +440,21 @@
private int dimension;
private int size;
- private OpenType elemType;
+ private OpenType<?> elemType;
private Object val;
private boolean isCompositeType;
private boolean isTabularType;
private int currentIndex;
private CompositeData[] elements;
- private final String[] arrayColumns = {Resources.getText("Value")};
+ private final String[] arrayColumns = {Messages.VALUE};
private Font normalFont, boldFont;
- XArrayData(XOpenTypeData parent, ArrayType type, Object val) {
+ XArrayData(XOpenTypeData parent, ArrayType<?> type, Object val) {
this(parent, type.getDimension(), type.getElementOpenType(), val);
}
XArrayData(XOpenTypeData parent, int dimension,
- OpenType elemType, Object val) {
+ OpenType<?> elemType, Object val) {
super(parent);
this.dimension = dimension;
this.elemType = elemType;
@@ -486,10 +473,9 @@
public void viewed(XOpenTypeViewer viewer) throws Exception {
if (size == 0)
- throw new Exception(Resources.getText("Empty array"));
+ throw new Exception(Messages.EMPTY_ARRAY);
if (dimension > 1)
- throw new Exception(Resources.getText("Dimension is not " +
- "supported:") +
+ throw new Exception(Messages.DIMENSION_IS_NOT_SUPPORTED_COLON +
dimension);
super.viewed(viewer);
}
@@ -565,7 +551,7 @@
public String toString() {
if (dimension > 1) {
- return Resources.getText("Dimension is not supported:") +
+ return Messages.DIMENSION_IS_NOT_SUPPORTED_COLON +
dimension;
} else {
return elemType.getTypeName() + "[" + size + "]";
@@ -694,7 +680,7 @@
tabular.canIncrement() || tabular.canDecrement();
if (hasMoreThanOneElement) {
tabularLabel.setText(
- Resources.getText("MBeansTab.tabularNavigationMultiple",
+ Resources.format(Messages.MBEANS_TAB_TABULAR_NAVIGATION_MULTIPLE,
String.format("%d", tabular.getSelectedElementIndex() + 1),
String.format("%d", tabular.getElementCount())));
} else {
@@ -717,7 +703,7 @@
array.canIncrement() || array.canDecrement();
if (hasMoreThanOneElement) {
compositeLabel.setText(
- Resources.getText("MBeansTab.compositeNavigationMultiple",
+ Resources.format(Messages.MBEANS_TAB_COMPOSITE_NAVIGATION_MULTIPLE,
String.format("%d", array.getSelectedElementIndex() + 1),
String.format("%d", array.getElementCount())));
} else {
@@ -781,8 +767,8 @@
JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
JPanel buttons = new JPanel(new FlowLayout(FlowLayout.LEFT));
- tabularPrev = new JButton(Resources.getText("<"));
- tabularNext = new JButton(Resources.getText(">"));
+ tabularPrev = new JButton(Messages.LESS_THAN);
+ tabularNext = new JButton(Messages.GREATER_THAN);
JPanel tabularButtons = new JPanel(new FlowLayout(FlowLayout.LEFT));
tabularButtons.add(tabularPrev);
tabularPrev.addActionListener(this);
@@ -793,13 +779,13 @@
tabularNext.addActionListener(this);
tabularButtons.setBackground(Color.white);
- prev = new JButton(Resources.getText("<<"));
+ prev = new JButton(Messages.A_LOT_LESS_THAN);
prev.addActionListener(this);
buttons.add(prev);
- incr = new JButton(Resources.getText(">"));
+ incr = new JButton(Messages.GREATER_THAN);
incr.addActionListener(this);
- decr = new JButton(Resources.getText("<"));
+ decr = new JButton(Messages.LESS_THAN);
decr.addActionListener(this);
JPanel array = new JPanel();
diff --git a/src/share/classes/sun/tools/jconsole/inspector/XOperations.java b/src/share/classes/sun/tools/jconsole/inspector/XOperations.java
index a6e7f8b..b4f24fa 100644
--- a/src/share/classes/sun/tools/jconsole/inspector/XOperations.java
+++ b/src/share/classes/sun/tools/jconsole/inspector/XOperations.java
@@ -26,22 +26,18 @@
package sun.tools.jconsole.inspector;
import javax.swing.*;
-import javax.swing.event.*;
-import javax.swing.table.*;
-import javax.swing.tree.*;
import java.awt.BorderLayout;
import java.awt.GridLayout;
import java.awt.FlowLayout;
import java.awt.Component;
import java.awt.event.*;
import java.util.*;
-import java.io.*;
import javax.management.*;
-import sun.tools.jconsole.Resources;
import sun.tools.jconsole.MBeansTab;
import sun.tools.jconsole.JConsole;
+import sun.tools.jconsole.Messages;
public abstract class XOperations extends JPanel implements ActionListener {
@@ -185,8 +181,8 @@
} else {
new ThreadDialog(
button,
- Resources.getText("Method successfully invoked"),
- Resources.getText("Info"),
+ Messages.METHOD_SUCCESSFULLY_INVOKED,
+ Messages.INFO,
JOptionPane.INFORMATION_MESSAGE).run();
}
} catch (Throwable t) {
@@ -196,9 +192,9 @@
}
new ThreadDialog(
button,
- Resources.getText("Problem invoking") + " " +
+ Messages.PROBLEM_INVOKING + " " +
button.getText() + " : " + t.toString(),
- Resources.getText("Error"),
+ Messages.ERROR,
JOptionPane.ERROR_MESSAGE).run();
}
}
diff --git a/src/share/classes/sun/tools/jconsole/inspector/XPlotter.java b/src/share/classes/sun/tools/jconsole/inspector/XPlotter.java
index bcb34ad..00fdff8 100644
--- a/src/share/classes/sun/tools/jconsole/inspector/XPlotter.java
+++ b/src/share/classes/sun/tools/jconsole/inspector/XPlotter.java
@@ -27,7 +27,6 @@
import sun.tools.jconsole.Plotter;
import javax.swing.JTable;
-import java.awt.Graphics;
@SuppressWarnings("serial")
public class XPlotter extends Plotter {
diff --git a/src/share/classes/sun/tools/jconsole/inspector/XPlottingViewer.java b/src/share/classes/sun/tools/jconsole/inspector/XPlottingViewer.java
index 280759f..f1e768c 100644
--- a/src/share/classes/sun/tools/jconsole/inspector/XPlottingViewer.java
+++ b/src/share/classes/sun/tools/jconsole/inspector/XPlottingViewer.java
@@ -45,10 +45,7 @@
new HashMap<String, XPlottingViewer>();
private static HashMap<String, Timer> timerCache =
new HashMap<String, Timer>();
- private JPanel bordered;
- private Number value;
private MBeansTab tab;
- private XMBean mbean;
private String attributeName;
private String key;
private JTable table;
@@ -62,7 +59,6 @@
this.tab = tab;
this.key = key;
- this.mbean = mbean;
this.table = table;
this.attributeName = attributeName;
Plotter plotter = createPlotter(mbean, attributeName, key, table);
@@ -70,9 +66,9 @@
}
static void dispose(MBeansTab tab) {
- Iterator it = plotterCache.keySet().iterator();
+ Iterator<String> it = plotterCache.keySet().iterator();
while(it.hasNext()) {
- String key = (String) it.next();
+ String key = it.next();
if(key.startsWith(String.valueOf(tab.hashCode()))) {
it.remove();
}
@@ -187,7 +183,7 @@
final GridBagLayout gbl = new GridBagLayout();
buttonPanel.setLayout(gbl);
setLayout(new BorderLayout());
- plotButton = new JButton(Resources.getText("Discard chart"));
+ plotButton = new JButton(Messages.DISCARD_CHART);
plotButton.addActionListener(this);
plotButton.setEnabled(true);
diff --git a/src/share/classes/sun/tools/jconsole/inspector/XSheet.java b/src/share/classes/sun/tools/jconsole/inspector/XSheet.java
index 3739f40..f9f5bc4 100644
--- a/src/share/classes/sun/tools/jconsole/inspector/XSheet.java
+++ b/src/share/classes/sun/tools/jconsole/inspector/XSheet.java
@@ -57,8 +57,6 @@
import sun.tools.jconsole.*;
import sun.tools.jconsole.inspector.XNodeInfo.Type;
-import static sun.tools.jconsole.Resources.*;
-
@SuppressWarnings("serial")
public class XSheet extends JPanel
implements ActionListener, NotificationListener {
@@ -106,28 +104,24 @@
southPanel = new JPanel();
add(southPanel, BorderLayout.SOUTH);
// create the refresh button
- String refreshButtonKey = "MBeansTab.refreshAttributesButton";
- refreshButton = new JButton(getText(refreshButtonKey));
- refreshButton.setMnemonic(getMnemonicInt(refreshButtonKey));
- refreshButton.setToolTipText(getText(refreshButtonKey + ".toolTip"));
+ refreshButton = new JButton(Messages.MBEANS_TAB_REFRESH_ATTRIBUTES_BUTTON);
+ refreshButton.setMnemonic(Resources.getMnemonicInt(Messages.MBEANS_TAB_REFRESH_ATTRIBUTES_BUTTON));
+ refreshButton.setToolTipText(Messages.MBEANS_TAB_REFRESH_ATTRIBUTES_BUTTON_TOOLTIP);
refreshButton.addActionListener(this);
// create the clear button
- String clearButtonKey = "MBeansTab.clearNotificationsButton";
- clearButton = new JButton(getText(clearButtonKey));
- clearButton.setMnemonic(getMnemonicInt(clearButtonKey));
- clearButton.setToolTipText(getText(clearButtonKey + ".toolTip"));
+ clearButton = new JButton(Messages.MBEANS_TAB_CLEAR_NOTIFICATIONS_BUTTON);
+ clearButton.setMnemonic(Resources.getMnemonicInt(Messages.MBEANS_TAB_CLEAR_NOTIFICATIONS_BUTTON));
+ clearButton.setToolTipText(Messages.MBEANS_TAB_CLEAR_NOTIFICATIONS_BUTTON_TOOLTIP);
clearButton.addActionListener(this);
// create the subscribe button
- String subscribeButtonKey = "MBeansTab.subscribeNotificationsButton";
- subscribeButton = new JButton(getText(subscribeButtonKey));
- subscribeButton.setMnemonic(getMnemonicInt(subscribeButtonKey));
- subscribeButton.setToolTipText(getText(subscribeButtonKey + ".toolTip"));
+ subscribeButton = new JButton(Messages.MBEANS_TAB_SUBSCRIBE_NOTIFICATIONS_BUTTON);
+ subscribeButton.setMnemonic(Resources.getMnemonicInt(Messages.MBEANS_TAB_SUBSCRIBE_NOTIFICATIONS_BUTTON));
+ subscribeButton.setToolTipText(Messages.MBEANS_TAB_SUBSCRIBE_NOTIFICATIONS_BUTTON_TOOLTIP);
subscribeButton.addActionListener(this);
// create the unsubscribe button
- String unsubscribeButtonKey = "MBeansTab.unsubscribeNotificationsButton";
- unsubscribeButton = new JButton(getText(unsubscribeButtonKey));
- unsubscribeButton.setMnemonic(getMnemonicInt(unsubscribeButtonKey));
- unsubscribeButton.setToolTipText(getText(unsubscribeButtonKey + ".toolTip"));
+ unsubscribeButton = new JButton(Messages.MBEANS_TAB_UNSUBSCRIBE_NOTIFICATIONS_BUTTON);
+ unsubscribeButton.setMnemonic(Resources.getMnemonicInt(Messages.MBEANS_TAB_UNSUBSCRIBE_NOTIFICATIONS_BUTTON));
+ unsubscribeButton.setToolTipText(Messages.MBEANS_TAB_UNSUBSCRIBE_NOTIFICATIONS_BUTTON_TOOLTIP);
unsubscribeButton.addActionListener(this);
// create XMBeanAttributes container
mbeanAttributes = new XMBeanAttributes(mbeansTab);
@@ -238,7 +232,7 @@
t.printStackTrace();
}
showErrorDialog(t.toString(),
- Resources.getText("Problem displaying MBean"));
+ Messages.PROBLEM_DISPLAYING_MBEAN);
}
}
};
@@ -279,7 +273,7 @@
new JPanel(new BorderLayout());
attributeBorderPanel.setBorder(
BorderFactory.createTitledBorder(
- Resources.getText("Attribute value")));
+ Messages.ATTRIBUTE_VALUE));
JPanel attributeValuePanel =
new JPanel(new BorderLayout());
attributeValuePanel.setBorder(
@@ -314,7 +308,7 @@
t.printStackTrace();
}
showErrorDialog(t.toString(),
- Resources.getText("Problem displaying MBean"));
+ Messages.PROBLEM_DISPLAYING_MBEAN);
}
}
};
@@ -333,7 +327,7 @@
JPanel operationPanel = new JPanel(new BorderLayout());
JPanel operationBorderPanel = new JPanel(new BorderLayout());
operationBorderPanel.setBorder(BorderFactory.createTitledBorder(
- Resources.getText("Operation invocation")));
+ Messages.OPERATION_INVOCATION));
operationBorderPanel.add(new JScrollPane(mbeanOperations));
operationPanel.add(operationBorderPanel, BorderLayout.NORTH);
mbi.addMBeanOperationInfo(mboi);
@@ -389,7 +383,7 @@
mainPanel.removeAll();
JPanel borderPanel = new JPanel(new BorderLayout());
borderPanel.setBorder(BorderFactory.createTitledBorder(
- Resources.getText("Attribute values")));
+ Messages.ATTRIBUTE_VALUES));
borderPanel.add(new JScrollPane(mbeanAttributes));
mainPanel.add(borderPanel, BorderLayout.CENTER);
// add the refresh button to the south panel
@@ -409,7 +403,7 @@
t.printStackTrace();
}
showErrorDialog(t.toString(),
- Resources.getText("Problem displaying MBean"));
+ Messages.PROBLEM_DISPLAYING_MBEAN);
}
}
};
@@ -442,7 +436,7 @@
mainPanel.removeAll();
JPanel borderPanel = new JPanel(new BorderLayout());
borderPanel.setBorder(BorderFactory.createTitledBorder(
- Resources.getText("Operation invocation")));
+ Messages.OPERATION_INVOCATION));
borderPanel.add(new JScrollPane(mbeanOperations));
mainPanel.add(borderPanel, BorderLayout.CENTER);
southPanel.setVisible(false);
@@ -459,7 +453,7 @@
t.printStackTrace();
}
showErrorDialog(t.toString(),
- Resources.getText("Problem displaying MBean"));
+ Messages.PROBLEM_DISPLAYING_MBEAN);
}
}
};
@@ -479,7 +473,7 @@
mainPanel.removeAll();
JPanel borderPanel = new JPanel(new BorderLayout());
borderPanel.setBorder(BorderFactory.createTitledBorder(
- Resources.getText("Notification buffer")));
+ Messages.NOTIFICATION_BUFFER));
borderPanel.add(new JScrollPane(mbeanNotifications));
mainPanel.add(borderPanel, BorderLayout.CENTER);
// add the subscribe/unsubscribe/clear buttons to the south panel
@@ -528,7 +522,7 @@
t.printStackTrace();
}
showErrorDialog(t.getMessage(),
- Resources.getText("Problem adding listener"));
+ Messages.PROBLEM_ADDING_LISTENER);
}
}
}.execute();
@@ -557,7 +551,7 @@
t.printStackTrace();
}
showErrorDialog(t.getMessage(),
- Resources.getText("Problem removing listener"));
+ Messages.PROBLEM_REMOVING_LISTENER);
}
}
}.execute();
@@ -586,7 +580,7 @@
// Call on EDT
private void updateReceivedNotifications(
DefaultMutableTreeNode emitter, long received, boolean bold) {
- String text = Resources.getText("Notifications") + "[" + received + "]";
+ String text = Messages.NOTIFICATIONS + "[" + received + "]";
DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode) mbeansTab.getTree().getLastSelectedPathComponent();
if (bold && emitter != selectedNode) {
text = "<html><b>" + text + "</b></html>";
@@ -600,7 +594,7 @@
// Call on EDT
private void clearNotifications() {
updateNotificationsNodeLabel(currentNode,
- Resources.getText("Notifications"));
+ Messages.NOTIFICATIONS);
}
/**
@@ -609,7 +603,7 @@
// Call on EDT
private void clearNotifications0() {
updateNotificationsNodeLabel(currentNode,
- Resources.getText("Notifications") + "[0]");
+ Messages.NOTIFICATIONS + "[0]");
}
/**
@@ -712,7 +706,7 @@
new ThreadDialog(
(Component) e.getSource(),
message,
- Resources.getText("Operation return value"),
+ Messages.OPERATION_RETURN_VALUE,
JOptionPane.INFORMATION_MESSAGE).run();
} // Got notification
else if (e.getType().equals(
diff --git a/src/share/classes/sun/tools/jconsole/inspector/XTable.java b/src/share/classes/sun/tools/jconsole/inspector/XTable.java
index 3d090d6..172ded8 100644
--- a/src/share/classes/sun/tools/jconsole/inspector/XTable.java
+++ b/src/share/classes/sun/tools/jconsole/inspector/XTable.java
@@ -36,7 +36,7 @@
public abstract class XTable extends JTable {
static final int NAME_COLUMN = 0;
static final int VALUE_COLUMN = 1;
- private Color defaultColor, editableColor, droppableColor, errorColor;
+ private Color defaultColor, editableColor, errorColor;
private Font normalFont, boldFont;
public XTable () {
@@ -139,7 +139,6 @@
if (defaultColor == null) {
defaultColor = tcr.getForeground();
editableColor = Color.blue;
- droppableColor = Color.green;
errorColor = Color.red;
// this sometimes happens for some reason
if (defaultColor == null) {
diff --git a/src/share/classes/sun/tools/jconsole/inspector/XTextField.java b/src/share/classes/sun/tools/jconsole/inspector/XTextField.java
index 882a427..2cb2359 100644
--- a/src/share/classes/sun/tools/jconsole/inspector/XTextField.java
+++ b/src/share/classes/sun/tools/jconsole/inspector/XTextField.java
@@ -26,12 +26,7 @@
package sun.tools.jconsole.inspector;
import java.awt.*;
-import java.awt.dnd.*;
import java.awt.event.*;
-import java.awt.datatransfer.*;
-import java.io.*;
-import java.util.*;
-import javax.swing.plaf.*;
import javax.swing.event.*;
import javax.swing.*;
@@ -44,16 +39,8 @@
implements DocumentListener,
ActionListener {
- private static final Color selF = Color.red;
- private static final Color selB = Color.yellow;
- private Color fore=null, back=null;
- private HashMap items = null; //used for popup menu selection
private XObject selectedObject;
- private XObject currentObject;
- private Class expectedClass;
- private Object value;
protected JTextField textField;
- private JButton browseObjects;
private static boolean allowNullSelection = false;
@@ -81,13 +68,12 @@
}
public XTextField(Object value,
- Class expectedClass,
+ Class<?> expectedClass,
int colWidth,
boolean isCallable,
JButton button,
XOperations operation) {
super(new BorderLayout());
- this.expectedClass = expectedClass;
this.button = button;
this.operation = operation;
add(textField = new JTextField(value.toString(),colWidth),
@@ -112,17 +98,13 @@
return allowNullSelection;
}
- protected void init(Object value, Class expectedClass) {
- this.expectedClass = expectedClass;
- this.value = value;
- boolean fieldEditable = Utils.isEditableType(expectedClass.getName());
+ protected void init(Object value, Class<?> expectedClass) {
+ boolean fieldEditable = Utils.isEditableType(expectedClass.getName());
clearObject();
if (value != null) {
- currentObject = new XObject(value);
textField.setText(value.toString());
}
else {
- currentObject = XObject.NULL_OBJECT;
//null String value for the moment
textField.setText("");
}
@@ -140,35 +122,12 @@
}
}
-
-
-
-
- private synchronized void setObject(XObject object) {
- clearObject();
- selectedObject = object;
- currentObject = object;
- setSelectedColors();
- textField.setText(object.getText());
- textField.getDocument().addDocumentListener(this);
- paintImmediately(getVisibleRect());
- }
-
private synchronized void clearObject() {
textField.getDocument().removeDocumentListener(this);
selectedObject = null;
- currentObject = null;
setDefaultColors();
}
- private synchronized void setSelectedColors() {
- // fore = textField.getForeground();
- // back = textField.getBackground();
-
- //textField.setForeground(Color.red);
- // textField.setBackground(Color.yellow);
- }
-
private synchronized void setDefaultColors() {
// if (fore != null) textField.setForeground(fore);
// if (back != null) textField.setBackground(back);
@@ -194,12 +153,6 @@
}
}
- private JPopupMenu buildEditPopupMenu() {
- JPopupMenu menu = new JPopupMenu();
- return menu;
- }
-
-
// ACTIONLISTENER IMPLEMENTATION
public void actionPerformed(ActionEvent e) {
if (e.getSource() instanceof JTextField) {
diff --git a/src/share/classes/sun/tools/jconsole/inspector/XTree.java b/src/share/classes/sun/tools/jconsole/inspector/XTree.java
index f81160e..303d9dc 100644
--- a/src/share/classes/sun/tools/jconsole/inspector/XTree.java
+++ b/src/share/classes/sun/tools/jconsole/inspector/XTree.java
@@ -32,7 +32,7 @@
import javax.swing.tree.*;
import sun.tools.jconsole.JConsole;
import sun.tools.jconsole.MBeansTab;
-import sun.tools.jconsole.Resources;
+import sun.tools.jconsole.Messages;
import sun.tools.jconsole.inspector.XNodeInfo;
import static sun.tools.jconsole.inspector.XNodeInfo.Type;
@@ -182,7 +182,7 @@
* Returns true if any of the children nodes is a non MBean metadata node.
*/
private boolean hasNonMetadataNodes(DefaultMutableTreeNode node) {
- for (Enumeration e = node.children(); e.hasMoreElements();) {
+ for (Enumeration<?> e = node.children(); e.hasMoreElements();) {
DefaultMutableTreeNode n = (DefaultMutableTreeNode) e.nextElement();
Object uo = n.getUserObject();
if (uo instanceof XNodeInfo) {
@@ -205,7 +205,7 @@
* Returns true if any of the children nodes is an MBean metadata node.
*/
public boolean hasMetadataNodes(DefaultMutableTreeNode node) {
- for (Enumeration e = node.children(); e.hasMoreElements();) {
+ for (Enumeration<?> e = node.children(); e.hasMoreElements();) {
DefaultMutableTreeNode n = (DefaultMutableTreeNode) e.nextElement();
Object uo = n.getUserObject();
if (uo instanceof XNodeInfo) {
@@ -251,7 +251,7 @@
Set<DefaultMutableTreeNode> metadataNodes =
new HashSet<DefaultMutableTreeNode>();
DefaultTreeModel model = (DefaultTreeModel) getModel();
- for (Enumeration e = node.children(); e.hasMoreElements();) {
+ for (Enumeration<?> e = node.children(); e.hasMoreElements();) {
DefaultMutableTreeNode n = (DefaultMutableTreeNode) e.nextElement();
Object uo = n.getUserObject();
if (uo instanceof XNodeInfo) {
@@ -596,7 +596,7 @@
if (ai != null && ai.length > 0) {
DefaultMutableTreeNode attributes = new DefaultMutableTreeNode();
XNodeInfo attributesUO = new XNodeInfo(Type.ATTRIBUTES, mbean,
- Resources.getText("Attributes"), null);
+ Messages.ATTRIBUTES, null);
attributes.setUserObject(attributesUO);
node.insert(attributes, childIndex++);
for (MBeanAttributeInfo mbai : ai) {
@@ -613,7 +613,7 @@
if (oi != null && oi.length > 0) {
DefaultMutableTreeNode operations = new DefaultMutableTreeNode();
XNodeInfo operationsUO = new XNodeInfo(Type.OPERATIONS, mbean,
- Resources.getText("Operations"), null);
+ Messages.OPERATIONS, null);
operations.setUserObject(operationsUO);
node.insert(operations, childIndex++);
for (MBeanOperationInfo mboi : oi) {
@@ -646,7 +646,7 @@
if (isBroadcaster != null && isBroadcaster.booleanValue()) {
DefaultMutableTreeNode notifications = new DefaultMutableTreeNode();
XNodeInfo notificationsUO = new XNodeInfo(Type.NOTIFICATIONS, mbean,
- Resources.getText("Notifications"), null);
+ Messages.NOTIFICATIONS, null);
notifications.setUserObject(notificationsUO);
node.insert(notifications, childIndex++);
if (ni != null && ni.length > 0) {
diff --git a/src/share/classes/sun/tools/jconsole/inspector/XTreeRenderer.java b/src/share/classes/sun/tools/jconsole/inspector/XTreeRenderer.java
index 62b8843..fb885d7 100644
--- a/src/share/classes/sun/tools/jconsole/inspector/XTreeRenderer.java
+++ b/src/share/classes/sun/tools/jconsole/inspector/XTreeRenderer.java
@@ -30,8 +30,6 @@
import javax.swing.JTree;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeCellRenderer;
-import sun.tools.jconsole.Resources;
-import sun.tools.jconsole.inspector.XNodeInfo.Type;
@SuppressWarnings("serial")
public class XTreeRenderer extends DefaultTreeCellRenderer {
diff --git a/src/share/classes/sun/tools/jconsole/resources/JConsoleResources.java b/src/share/classes/sun/tools/jconsole/resources/JConsoleResources.java
deleted file mode 100644
index 2bbc087..0000000
--- a/src/share/classes/sun/tools/jconsole/resources/JConsoleResources.java
+++ /dev/null
@@ -1,462 +0,0 @@
-/*
- * Copyright (c) 2004, 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. 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 sun.tools.jconsole.resources;
-
-import java.util.*;
-
-import static java.awt.event.KeyEvent.*;
-
-/**
- * <p> This class represents the <code>ResourceBundle</code>
- * for the following package(s):
- *
- * <ol>
- * <li> sun.tools.jconsole
- * </ol>
- *
- * <P>
- * Subclasses must override <code>getContents0</code> and provide an array,
- * where each item in the array consists of a <code>String</code> key,
- * and either a <code>String</code> value associated with that key,
- * or if the keys ends with ".mnemonic", an element
- * representing a mnemomic keycode <code>int</code> or <code>char</code>.
- */
-public class JConsoleResources extends ListResourceBundle {
-
- /**
- * Returns the contents of this <code>ResourceBundle</code>.
- *
- * <p>
- *
- * @return the contents of this <code>ResourceBundle</code>.
- */
- protected Object[][] getContents0() {
- Object[][] temp = new Object[][] {
- // NOTE 1: The value strings in this file containing "{0}" are
- // processed by the java.text.MessageFormat class. Any
- // single quotes appearing in these strings need to be
- // doubled up.
- //
- // NOTE 2: To make working with this file a bit easier, please
- // maintain these messages in ASCII sorted order by
- // message key.
- //
- // LOCALIZE THIS
- {" 1 day"," 1 day"},
- {" 1 hour"," 1 hour"},
- {" 1 min"," 1 min"},
- {" 1 month"," 1 month"},
- {" 1 year"," 1 year"},
- {" 2 hours"," 2 hours"},
- {" 3 hours"," 3 hours"},
- {" 3 months"," 3 months"},
- {" 5 min"," 5 min"},
- {" 6 hours"," 6 hours"},
- {" 6 months"," 6 months"},
- {" 7 days"," 7 days"},
- {"10 min","10 min"},
- {"12 hours","12 hours"},
- {"30 min","30 min"},
- {"<","<"},
- {"<<","<<"},
- {">",">"},
- {"ACTION","ACTION"},
- {"ACTION_INFO","ACTION_INFO"},
- {"All","All"},
- {"Apply","Apply"},
- {"Architecture","Architecture"},
- {"Array, OpenType", "Array, OpenType"},
- {"Array, OpenType, Numeric value viewer","Array, OpenType, Numeric value viewer"},
- {"Attribute","Attribute"},
- {"Attribute value","Attribute value"},
- {"Attribute values","Attribute values"},
- {"Attributes","Attributes"},
- {"Blank", "Blank"},
- {"BlockedCount WaitedCount",
- "Total blocked: {0} Total waited: {1}\n"},
- {"Boot class path","Boot class path"},
- {"BorderedComponent.moreOrLessButton.toolTip", "Toggle to show more or less information"},
- {"CPU Usage","CPU Usage"},
- {"CPUUsageFormat","CPU Usage: {0}%"},
- {"Cancel","Cancel"},
- {"Cascade", "Cascade"},
- {"Cascade.mnemonic", 'C'},
- {"Chart:", "Chart:"},
- {"Chart:.mnemonic", 'C'},
- {"Class path","Class path"},
- {"Class","Class"},
- {"ClassName","ClassName"},
- {"ClassTab.infoLabelFormat", "<html>Loaded: {0} Unloaded: {1} Total: {2}</html>"},
- {"ClassTab.loadedClassesPlotter.accessibleName", "Chart for Loaded Classes."},
- {"Classes","Classes"},
- {"Close","Close"},
- {"Column.Name", "Name"},
- {"Column.PID", "PID"},
- {"Committed memory","Committed memory"},
- {"Committed virtual memory","Committed virtual memory"},
- {"Committed", "Committed"},
- {"Compiler","Compiler"},
- {"CompositeData","CompositeData"},
- {"Config","Config"},
- {"Connect", "Connect"},
- {"Connect.mnemonic", 'C'},
- {"Connect...","Connect..."},
- {"ConnectDialog.connectButton.toolTip", "Connect to Java Virtual Machine"},
- {"ConnectDialog.accessibleDescription", "Dialog for making a new connection to a local or remote Java Virtual Machine"},
- {"ConnectDialog.masthead.accessibleName", "Masthead Graphic"},
- {"ConnectDialog.masthead.title", "New Connection"},
- {"ConnectDialog.statusBar.accessibleName", "Status Bar"},
- {"ConnectDialog.title", "JConsole: New Connection"},
- {"Connected. Click to disconnect.","Connected. Click to disconnect."},
- {"Connection failed","Connection failed"},
- {"Connection", "Connection"},
- {"Connection.mnemonic", 'C'},
- {"Connection name", "Connection name"},
- {"ConnectionName (disconnected)","{0} (disconnected)"},
- {"Constructor","Constructor"},
- {"Current classes loaded", "Current classes loaded"},
- {"Current heap size","Current heap size"},
- {"Current value","Current value: {0}"},
- {"Create", "Create"},
- {"Daemon threads","Daemon threads"},
- {"Disconnected. Click to connect.","Disconnected. Click to connect."},
- {"Double click to expand/collapse","Double click to expand/collapse"},
- {"Double click to visualize", "Double click to visualize"},
- {"Description", "Description"},
- {"Description: ", "Description: "},
- {"Descriptor", "Descriptor"},
- {"Details", "Details"},
- {"Detect Deadlock", "Detect Deadlock"},
- {"Detect Deadlock.mnemonic", 'D'},
- {"Detect Deadlock.toolTip", "Detect deadlocked threads"},
- {"Dimension is not supported:","Dimension is not supported:"},
- {"Discard chart", "Discard chart"},
- {"DurationDaysHoursMinutes","{0,choice,1#{0,number,integer} day |1.0<{0,number,integer} days }" +
- "{1,choice,0<{1,number,integer} hours |1#{1,number,integer} hour |1<{1,number,integer} hours }" +
- "{2,choice,0<{2,number,integer} minutes|1#{2,number,integer} minute|1.0<{2,number,integer} minutes}"},
-
- {"DurationHoursMinutes","{0,choice,1#{0,number,integer} hour |1<{0,number,integer} hours }" +
- "{1,choice,0<{1,number,integer} minutes|1#{1,number,integer} minute|1.0<{1,number,integer} minutes}"},
-
- {"DurationMinutes","{0,choice,1#{0,number,integer} minute|1.0<{0,number,integer} minutes}"},
- {"DurationSeconds","{0} seconds"},
- {"Empty array", "Empty array"},
- {"Empty opentype viewer", "Empty opentype viewer"},
- {"Error","Error"},
- {"Error: MBeans already exist","Error: MBeans already exist"},
- {"Error: MBeans do not exist","Error: MBeans do not exist"},
- {"Error:","Error:"},
- {"Event","Event"},
- {"Exit", "Exit"},
- {"Exit.mnemonic", 'x'},
- {"Fail to load plugin", "Warning: Fail to load plugin: {0}"},
- {"FileChooser.fileExists.cancelOption", "Cancel"},
- {"FileChooser.fileExists.message", "<html><center>File already exists:<br>{0}<br>Do you want to replace it?"},
- {"FileChooser.fileExists.okOption", "Replace"},
- {"FileChooser.fileExists.title", "File Exists"},
- {"FileChooser.savedFile", "<html>Saved to file:<br>{0}<br>({1} bytes)"},
- {"FileChooser.saveFailed.message", "<html><center>Save to file failed:<br>{0}<br>{1}"},
- {"FileChooser.saveFailed.title", "Save Failed"},
- {"Free physical memory","Free physical memory"},
- {"Free swap space","Free swap space"},
- {"Garbage collector","Garbage collector"},
- {"GTK","GTK"},
- {"GcInfo","Name = ''{0}'', Collections = {1,choice,-1#Unavailable|0#{1,number,integer}}, Total time spent = {2}"},
- {"GC time","GC time"},
- {"GC time details","{0} on {1} ({2} collections)"},
- {"Heap Memory Usage","Heap Memory Usage"},
- {"Heap", "Heap"},
- {"Help.AboutDialog.accessibleDescription", "Dialog containing information about JConsole and JDK versions"},
- {"Help.AboutDialog.jConsoleVersion", "JConsole version:<br>{0}"},
- {"Help.AboutDialog.javaVersion", "Java VM version:<br>{0}"},
- {"Help.AboutDialog.masthead.accessibleName", "Masthead Graphic"},
- {"Help.AboutDialog.masthead.title", "About JConsole"},
- {"Help.AboutDialog.title", "JConsole: About"},
- {"Help.AboutDialog.userGuideLink", "JConsole User Guide:<br>{0}"},
- {"Help.AboutDialog.userGuideLink.mnemonic", 'U'},
- {"Help.AboutDialog.userGuideLink.url", "http://java.sun.com/javase/6/docs/technotes/guides/management/jconsole.html"},
- {"HelpMenu.About.title", "About JConsole"},
- {"HelpMenu.About.title.mnemonic", 'A'},
- {"HelpMenu.UserGuide.title", "Online User Guide"},
- {"HelpMenu.UserGuide.title.mnemonic", 'U'},
- {"HelpMenu.title", "Help"},
- {"HelpMenu.title.mnemonic", 'H'},
- {"Hotspot MBeans...", "Hotspot MBeans..."},
- {"Hotspot MBeans....mnemonic", 'H'},
- {"Hotspot MBeans.dialog.accessibleDescription", "Dialog for managing Hotspot MBeans"},
- {"Impact","Impact"},
- {"Info","Info"},
- {"INFO","INFO"},
- {"Invalid plugin path", "Warning: Invalid plugin path: {0}"},
- {"Invalid URL", "Invalid URL: {0}"},
- {"Is","Is"},
- {"Java Monitoring & Management Console", "Java Monitoring & Management Console"},
- {"JConsole: ","JConsole: {0}"},
- {"JConsole version","JConsole version \"{0}\""},
- {"JConsole.accessibleDescription", "Java Monitoring & Management Console"},
- {"JIT compiler","JIT compiler"},
- {"Java Virtual Machine","Java Virtual Machine"},
- {"Java","Java"},
- {"Library path","Library path"},
- {"Listeners","Listeners"},
- {"Live Threads","Live threads"},
- {"Loaded", "Loaded"},
- {"Local Process:", "Local Process:"},
- {"Local Process:.mnemonic", 'L'},
- {"Look and Feel","Look and Feel"},
- {"Masthead.font", "Dialog-PLAIN-25"},
- {"Management Not Enabled","<b>Note</b>: The management agent is not enabled on this process."},
- {"Management Will Be Enabled","<b>Note</b>: The management agent will be enabled on this process."},
- {"MBeanAttributeInfo","MBeanAttributeInfo"},
- {"MBeanInfo","MBeanInfo"},
- {"MBeanNotificationInfo","MBeanNotificationInfo"},
- {"MBeanOperationInfo","MBeanOperationInfo"},
- {"MBeans","MBeans"},
- {"MBeansTab.clearNotificationsButton", "Clear"},
- {"MBeansTab.clearNotificationsButton.mnemonic", 'C'},
- {"MBeansTab.clearNotificationsButton.toolTip", "Clear notifications"},
- {"MBeansTab.compositeNavigationMultiple", "Composite Navigation {0}/{1}"},
- {"MBeansTab.compositeNavigationSingle", "Composite Navigation"},
- {"MBeansTab.refreshAttributesButton", "Refresh"},
- {"MBeansTab.refreshAttributesButton.mnemonic", 'R'},
- {"MBeansTab.refreshAttributesButton.toolTip", "Refresh attributes"},
- {"MBeansTab.subscribeNotificationsButton", "Subscribe"},
- {"MBeansTab.subscribeNotificationsButton.mnemonic", 'S'},
- {"MBeansTab.subscribeNotificationsButton.toolTip", "Start listening for notifications"},
- {"MBeansTab.tabularNavigationMultiple", "Tabular Navigation {0}/{1}"},
- {"MBeansTab.tabularNavigationSingle", "Tabular Navigation"},
- {"MBeansTab.unsubscribeNotificationsButton", "Unsubscribe"},
- {"MBeansTab.unsubscribeNotificationsButton.mnemonic", 'U'},
- {"MBeansTab.unsubscribeNotificationsButton.toolTip", "Stop listening for notifications"},
- {"Manage Hotspot MBeans in: ", "Manage Hotspot MBeans in: "},
- {"Max","Max"},
- {"Maximum heap size","Maximum heap size"},
- {"Memory","Memory"},
- {"MemoryPoolLabel", "Memory Pool \"{0}\""},
- {"MemoryTab.heapPlotter.accessibleName", "Memory usage chart for heap."},
- {"MemoryTab.infoLabelFormat", "<html>Used: {0} Committed: {1} Max: {2}</html>"},
- {"MemoryTab.nonHeapPlotter.accessibleName", "Memory usage chart for non heap."},
- {"MemoryTab.poolChart.aboveThreshold", "which is above the threshold of {0}.\n"},
- {"MemoryTab.poolChart.accessibleName", "Memory Pool Usage Chart."},
- {"MemoryTab.poolChart.belowThreshold", "which is below the threshold of {0}.\n"},
- {"MemoryTab.poolPlotter.accessibleName", "Memory usage chart for {0}."},
- {"Message","Message"},
- {"Method successfully invoked", "Method successfully invoked"},
- {"Minimize All", "Minimize All"},
- {"Minimize All.mnemonic", 'M'},
- {"Minus Version", "This is {0} version {1}"},
- {"Monitor locked",
- " - locked {0}\n"},
- {"Motif","Motif"},
- {"Name Build and Mode","{0} (build {1}, {2})"},
- {"Name and Build","{0} (build {1})"},
- {"Name","Name"},
- {"Name: ","Name: "},
- {"Name State",
- "Name: {0}\n" +
- "State: {1}\n"},
- {"Name State LockName",
- "Name: {0}\n" +
- "State: {1} on {2}\n"},
- {"Name State LockName LockOwner",
- "Name: {0}\n" +
- "State: {1} on {2} owned by: {3}\n"},
- {"New Connection...", "New Connection..."},
- {"New Connection....mnemonic", 'N'},
- {"New value applied","New value applied"},
- {"No attribute selected","No attribute selected"},
- {"No deadlock detected","No deadlock detected"},
- {"No value selected","No value selected"},
- {"Non-Heap Memory Usage","Non-Heap Memory Usage"},
- {"Non-Heap", "Non-Heap"},
- {"Not Yet Implemented","Not Yet Implemented"},
- {"Not a valid event broadcaster", "Not a valid event broadcaster"},
- {"Notification","Notification"},
- {"Notification buffer","Notification buffer"},
- {"Notifications","Notifications"},
- {"NotifTypes", "NotifTypes"},
- {"Number of Threads","Number of Threads"},
- {"Number of Loaded Classes","Number of Loaded Classes"},
- {"Number of processors","Number of processors"},
- {"ObjectName","ObjectName"},
- {"Operating System","Operating System"},
- {"Operation","Operation"},
- {"Operation invocation","Operation invocation"},
- {"Operation return value", "Operation return value"},
- {"Operations","Operations"},
- {"Overview","Overview"},
- {"OverviewPanel.plotter.accessibleName", "Chart for {0}."},
- {"Parameter", "Parameter"},
- {"Password: ", "Password: "},
- {"Password: .mnemonic", 'P'},
- {"Password.accessibleName", "Password"},
- {"Peak","Peak"},
- {"Perform GC", "Perform GC"},
- {"Perform GC.mnemonic", 'G'},
- {"Perform GC.toolTip", "Request Garbage Collection"},
- {"Plotter.accessibleName", "Chart"},
- {"Plotter.accessibleName.keyAndValue", "{0}={1}\n"},
- {"Plotter.accessibleName.noData", "No data plotted."},
- {"Plotter.saveAsMenuItem", "Save data as..."},
- {"Plotter.saveAsMenuItem.mnemonic", 'a'},
- {"Plotter.timeRangeMenu", "Time Range"},
- {"Plotter.timeRangeMenu.mnemonic", 'T'},
- {"Problem adding listener","Problem adding listener"},
- {"Problem displaying MBean", "Problem displaying MBean"},
- {"Problem invoking", "Problem invoking"},
- {"Problem removing listener","Problem removing listener"},
- {"Problem setting attribute","Problem setting attribute"},
- {"Process CPU time","Process CPU time"},
- {"R/W","R/W"},
- {"Readable","Readable"},
- {"Received","Received"},
- {"Reconnect","Reconnect"},
- {"Remote Process:", "Remote Process:"},
- {"Remote Process:.mnemonic", 'R'},
- {"Remote Process.textField.accessibleName", "Remote Process"},
- {"Remove","Remove"},
- {"Restore All", "Restore All"},
- {"Restore All.mnemonic", 'R'},
- {"Return value", "Return value"},
- {"ReturnType", "ReturnType"},
- {"SeqNum","SeqNum"},
- {"Size Bytes", "{0,number,integer} bytes"},
- {"Size Gb","{0} Gb"},
- {"Size Kb","{0} Kb"},
- {"Size Mb","{0} Mb"},
- {"Source","Source"},
- {"Stack trace",
- "\nStack trace: \n"},
- {"Success:","Success:"},
- // Note: SummaryTab.headerDateTimeFormat can be one the following:
- // 1. A combination of two styles for date and time, using the
- // constants from class DateFormat: SHORT, MEDIUM, LONG, FULL.
- // Example: "MEDIUM,MEDIUM" or "FULL,SHORT"
- // 2. An explicit string pattern used for creating an instance
- // of the class SimpleDateFormat.
- // Example: "yyyy-MM-dd HH:mm:ss" or "M/d/yyyy h:mm:ss a"
- {"SummaryTab.headerDateTimeFormat", "FULL,FULL"},
- {"SummaryTab.pendingFinalization.label", "Pending finalization"},
- {"SummaryTab.pendingFinalization.value", "{0} objects"},
- {"SummaryTab.tabName", "VM Summary"},
- {"SummaryTab.vmVersion","{0} version {1}"},
- {"TabularData are not supported", "TabularData are not supported"},
- {"Threads","Threads"},
- {"ThreadTab.infoLabelFormat", "<html>Live: {0} Peak: {1} Total: {2}</html>"},
- {"ThreadTab.threadInfo.accessibleName", "Thread Information"},
- {"ThreadTab.threadPlotter.accessibleName", "Chart for number of threads."},
- {"Threshold","Threshold"},
- {"Tile", "Tile"},
- {"Tile.mnemonic", 'T'},
- {"Time Range:", "Time Range:"},
- {"Time Range:.mnemonic", 'T'},
- {"Time", "Time"},
- {"TimeStamp","TimeStamp"},
- {"Total Loaded", "Total Loaded"},
- {"Total classes loaded","Total classes loaded"},
- {"Total classes unloaded","Total classes unloaded"},
- {"Total compile time","Total compile time"},
- {"Total physical memory","Total physical memory"},
- {"Total threads started","Total threads started"},
- {"Total swap space","Total swap space"},
- {"Type","Type"},
- {"Unavailable","Unavailable"},
- {"UNKNOWN","UNKNOWN"},
- {"Unknown Host","Unknown Host: {0}"},
- {"Unregister", "Unregister"},
- {"Uptime","Uptime"},
- {"Uptime: ","Uptime: "},
- {"Usage Threshold","Usage Threshold"},
- {"remoteTF.usage","<b>Usage</b>: <hostname>:<port> OR service:jmx:<protocol>:<sap>"},
- {"Used","Used"},
- {"Username: ", "Username: "},
- {"Username: .mnemonic", 'U'},
- {"Username.accessibleName", "User Name"},
- {"UserData","UserData"},
- {"Virtual Machine","Virtual Machine"},
- {"VM arguments","VM arguments"},
- {"VM","VM"},
- {"VMInternalFrame.accessibleDescription", "Internal frame for monitoring a Java Virtual Machine"},
- {"Value","Value"},
- {"Vendor", "Vendor"},
- {"Verbose Output","Verbose Output"},
- {"Verbose Output.toolTip", "Enable verbose output for class loading system"},
- {"View value", "View value"},
- {"View","View"},
- {"Window", "Window"},
- {"Window.mnemonic", 'W'},
- {"Windows","Windows"},
- {"Writable","Writable"},
- {"You cannot drop a class here", "You cannot drop a class here"},
- {"collapse", "collapse"},
- {"connectionFailed1","Connection Failed: Retry?"},
- {"connectionFailed2","The connection to {0} did not succeed.<br>" +
- "Would you like to try again?"},
- {"connectionLost1","Connection Lost: Reconnect?"},
- {"connectionLost2","The connection to {0} has been lost " +
- "because the remote process has been terminated.<br>" +
- "Would you like to reconnect?"},
- {"connectingTo1","Connecting to {0}"},
- {"connectingTo2","You are currently being connected to {0}.<br>" +
- "This will take a few moments."},
- {"deadlockAllTab","All"},
- {"deadlockTab","Deadlock"},
- {"deadlockTabN","Deadlock {0}"},
- {"expand", "expand"},
- {"kbytes","{0} kbytes"},
- {"operation","operation"},
- {"plot", "plot"},
- {"visualize","visualize"},
- {"zz usage text",
- "Usage: {0} [ -interval=n ] [ -notile ] [ -pluginpath <path> ] [ -version ] [ connection ... ]\n\n" +
- " -interval Set the update interval to n seconds (default is 4 seconds)\n" +
- " -notile Do not tile windows initially (for two or more connections)\n" +
- " -pluginpath Specify the path that jconsole uses to look up the plugins\n" +
- " -version Print program version\n\n" +
- " connection = pid || host:port || JMX URL (service:jmx:<protocol>://...)\n" +
- " pid The process id of a target process\n" +
- " host A remote host name or IP address\n" +
- " port The port number for the remote connection\n\n" +
- " -J Specify the input arguments to the Java virtual machine\n" +
- " on which jconsole is running"},
- // END OF MATERIAL TO LOCALIZE
- };
-
- String ls = System.getProperty("line.separator");
- for(int i=0;i<temp.length;i++) {
- if (temp[i][1] instanceof String){
- temp[i][1] = temp[i][1].toString().replaceAll("\n",ls);
- }
- }
-
- return temp;
-
- }
-
- public synchronized Object[][] getContents() {
- return getContents0();
- }
-}
diff --git a/src/share/classes/sun/tools/jconsole/resources/JConsoleResources_ja.java b/src/share/classes/sun/tools/jconsole/resources/JConsoleResources_ja.java
deleted file mode 100644
index f25e410..0000000
--- a/src/share/classes/sun/tools/jconsole/resources/JConsoleResources_ja.java
+++ /dev/null
@@ -1,442 +0,0 @@
-/*
- * Copyright (c) 2004, 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 sun.tools.jconsole.resources;
-
-import java.util.*;
-
-import static java.awt.event.KeyEvent.*;
-
-/**
- * <p> This class represents the <code>ResourceBundle</code>
- * for the following package(s):
- *
- * <ol>
- * <li> sun.tools.jconsole
- * </ol>
- *
- * <P>
- * Subclasses must override <code>getContents0</code> and provide an array,
- * where each item in the array consists of a <code>String</code> key,
- * and either a <code>String</code> value associated with that key,
- * or if the keys ends with ".mnemonic", an element
- * representing a mnemomic keycode <code>int</code> or <code>char</code>.
- */
-public class JConsoleResources_ja extends JConsoleResources {
-
- /**
- * Returns the contents of this <code>ResourceBundle</code>.
- *
- * <p>
- *
- * @return the contents of this <code>ResourceBundle</code>.
- */
- protected Object[][] getContents0() {
- Object[][] temp = new Object[][] {
- // NOTE 1: The value strings in this file containing "{0}" are
- // processed by the java.text.MessageFormat class. Any
- // single quotes appearing in these strings need to be
- // doubled up.
- //
- // NOTE 2: To make working with this file a bit easier, please
- // maintain these messages in ASCII sorted order by
- // message key.
- //
- // LOCALIZE THIS
- {" 1 day"," 1\u65E5"},
- {" 1 hour"," 1\u6642\u9593"},
- {" 1 min"," 1\u5206"},
- {" 1 month"," 1\u304B\u6708"},
- {" 1 year"," 1\u5E74"},
- {" 2 hours"," 2\u6642\u9593"},
- {" 3 hours"," 3\u6642\u9593"},
- {" 3 months"," 3\u304B\u6708"},
- {" 5 min"," 5\u5206"},
- {" 6 hours"," 6\u6642\u9593"},
- {" 6 months"," 6\u304B\u6708"},
- {" 7 days"," 7\u65E5"},
- {"10 min","10\u5206"},
- {"12 hours","12\u6642\u9593"},
- {"30 min","30\u5206"},
- {"<","<"},
- {"<<","<<"},
- {">",">"},
- {"ACTION","ACTION"},
- {"ACTION_INFO","ACTION_INFO"},
- {"All","\u3059\u3079\u3066"},
- {"Apply","\u9069\u7528"},
- {"Architecture","\u30A2\u30FC\u30AD\u30C6\u30AF\u30C1\u30E3"},
- {"Array, OpenType", "\u914D\u5217\u3001OpenType"},
- {"Array, OpenType, Numeric value viewer","\u914D\u5217\u3001OpenType\u3001\u6570\u5024\u30D3\u30E5\u30FC\u30A2"},
- {"Attribute","\u5C5E\u6027"},
- {"Attribute value","\u5C5E\u6027\u5024"},
- {"Attribute values","\u5C5E\u6027\u5024"},
- {"Attributes","\u5C5E\u6027"},
- {"Blank", "\u30D6\u30E9\u30F3\u30AF"},
- {"BlockedCount WaitedCount",
- "\u30D6\u30ED\u30C3\u30AF\u6E08\u5408\u8A08: {0} \u5F85\u6A5F\u6E08\u5408\u8A08: {1}\n"},
- {"Boot class path","\u30D6\u30FC\u30C8\u30FB\u30AF\u30E9\u30B9\u30D1\u30B9"},
- {"BorderedComponent.moreOrLessButton.toolTip", "\u8868\u793A\u3059\u308B\u60C5\u5831\u91CF\u3092\u5897\u6E1B\u3059\u308B\u30C8\u30B0\u30EB"},
- {"CPU Usage","CPU\u4F7F\u7528\u7387"},
- {"CPUUsageFormat","CPU\u4F7F\u7528\u7387: {0}%"},
- {"Cancel","\u53D6\u6D88"},
- {"Cascade", "\u91CD\u306D\u3066\u8868\u793A(C)"},
- {"Cascade.mnemonic", 'C'},
- {"Chart:", "\u30C1\u30E3\u30FC\u30C8(C):"},
- {"Chart:.mnemonic", 'C'},
- {"Class path","\u30AF\u30E9\u30B9\u30D1\u30B9"},
- {"Class","\u30AF\u30E9\u30B9"},
- {"ClassName","ClassName"},
- {"ClassTab.infoLabelFormat", "<html>\u30ED\u30FC\u30C9\u6E08: {0} \u672A\u30ED\u30FC\u30C9: {1} \u5408\u8A08: {2}</html>"},
- {"ClassTab.loadedClassesPlotter.accessibleName", "\u30ED\u30FC\u30C9\u6E08\u30AF\u30E9\u30B9\u306E\u30C1\u30E3\u30FC\u30C8\u3002"},
- {"Classes","\u30AF\u30E9\u30B9"},
- {"Close","\u9589\u3058\u308B"},
- {"Column.Name", "\u540D\u524D"},
- {"Column.PID", "PID"},
- {"Committed memory","\u30B3\u30DF\u30C3\u30C8\u6E08\u30E1\u30E2\u30EA\u30FC"},
- {"Committed virtual memory","\u30B3\u30DF\u30C3\u30C8\u6E08\u4EEE\u60F3\u30E1\u30E2\u30EA\u30FC"},
- {"Committed", "\u30B3\u30DF\u30C3\u30C8\u6E08"},
- {"Compiler","\u30B3\u30F3\u30D1\u30A4\u30E9"},
- {"CompositeData","CompositeData"},
- {"Config","\u69CB\u6210"},
- {"Connect", "\u63A5\u7D9A(C)"},
- {"Connect.mnemonic", 'C'},
- {"Connect...","\u63A5\u7D9A..."},
- {"ConnectDialog.connectButton.toolTip", "Java\u4EEE\u60F3\u30DE\u30B7\u30F3\u306B\u63A5\u7D9A"},
- {"ConnectDialog.accessibleDescription", "\u30ED\u30FC\u30AB\u30EB\u307E\u305F\u306F\u30EA\u30E2\u30FC\u30C8\u306EJava\u4EEE\u60F3\u30DE\u30B7\u30F3\u3078\u306E\u65B0\u898F\u63A5\u7D9A\u3092\u884C\u3046\u30C0\u30A4\u30A2\u30ED\u30B0"},
- {"ConnectDialog.masthead.accessibleName", "\u30DE\u30B9\u30C8\u30D8\u30C3\u30C9\u56F3\u5F62"},
- {"ConnectDialog.masthead.title", "\u65B0\u898F\u63A5\u7D9A"},
- {"ConnectDialog.statusBar.accessibleName", "\u30B9\u30C6\u30FC\u30BF\u30B9\u30FB\u30D0\u30FC"},
- {"ConnectDialog.title", "JConsole: \u65B0\u898F\u63A5\u7D9A"},
- {"Connected. Click to disconnect.","\u63A5\u7D9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u30AF\u30EA\u30C3\u30AF\u3059\u308B\u3068\u5207\u65AD\u3057\u307E\u3059\u3002"},
- {"Connection failed","\u63A5\u7D9A\u306B\u5931\u6557\u3057\u307E\u3057\u305F"},
- {"Connection", "\u63A5\u7D9A(C)"},
- {"Connection.mnemonic", 'C'},
- {"Connection name", "\u63A5\u7D9A\u540D"},
- {"ConnectionName (disconnected)","{0} (\u5207\u65AD\u6E08)"},
- {"Constructor","\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF"},
- {"Current classes loaded", "\u30ED\u30FC\u30C9\u6E08\u306E\u73FE\u5728\u306E\u30AF\u30E9\u30B9"},
- {"Current heap size","\u73FE\u5728\u306E\u30D2\u30FC\u30D7\u30FB\u30B5\u30A4\u30BA"},
- {"Current value","\u73FE\u5728\u5024: {0}"},
- {"Create", "\u4F5C\u6210"},
- {"Daemon threads","\u30C7\u30FC\u30E2\u30F3\u30FB\u30B9\u30EC\u30C3\u30C9"},
- {"Disconnected. Click to connect.","\u5207\u65AD\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u30AF\u30EA\u30C3\u30AF\u3059\u308B\u3068\u63A5\u7D9A\u3057\u307E\u3059\u3002"},
- {"Double click to expand/collapse","\u5C55\u958B\u307E\u305F\u306F\u7E2E\u5C0F\u3059\u308B\u306B\u306F\u30C0\u30D6\u30EB\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u304F\u3060\u3055\u3044"},
- {"Double click to visualize", "\u8996\u899A\u5316\u3059\u308B\u306B\u306F\u30C0\u30D6\u30EB\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u304F\u3060\u3055\u3044"},
- {"Description", "\u8AAC\u660E"},
- {"Description: ", "\u8AAC\u660E: "},
- {"Descriptor", "\u8A18\u8FF0\u5B50"},
- {"Details", "\u8A73\u7D30"},
- {"Detect Deadlock", "\u30C7\u30C3\u30C9\u30ED\u30C3\u30AF\u306E\u691C\u51FA(D)"},
- {"Detect Deadlock.mnemonic", 'D'},
- {"Detect Deadlock.toolTip", "\u30C7\u30C3\u30C9\u30ED\u30C3\u30AF\u6E08\u30B9\u30EC\u30C3\u30C9\u306E\u691C\u51FA"},
- {"Dimension is not supported:","\u6B21\u5143\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093:"},
- {"Discard chart", "\u30C1\u30E3\u30FC\u30C8\u306E\u7834\u68C4"},
- {"DurationDaysHoursMinutes","{0,choice,1#{0,number,integer}\u65E5|1.0<{0,number,integer}\u65E5}{1,choice,0<{1,number,integer}\u6642\u9593|1#{1,number,integer}\u6642\u9593|1<{1,number,integer}\u6642\u9593}{2,choice,0<{2,number,integer}\u5206|1#{2,number,integer}\u5206|1.0<{2,number,integer}\u5206}"},
-
- {"DurationHoursMinutes","{0,choice,1#{0,number,integer}\u6642\u9593|1<{0,number,integer}\u6642\u9593}{1,choice,0<{1,number,integer}\u5206|1#{1,number,integer}\u5206|1.0<{1,number,integer}\u5206}"},
-
- {"DurationMinutes","{0,choice,1#{0,number,integer}\u5206|1.0<{0,number,integer}\u5206}"},
- {"DurationSeconds","{0}\u79D2"},
- {"Empty array", "\u7A7A\u306E\u914D\u5217"},
- {"Empty opentype viewer", "\u7A7A\u306Eopentype\u30D3\u30E5\u30FC\u30A2"},
- {"Error","\u30A8\u30E9\u30FC"},
- {"Error: MBeans already exist","\u30A8\u30E9\u30FC: MBeans\u306F\u3059\u3067\u306B\u5B58\u5728\u3057\u307E\u3059"},
- {"Error: MBeans do not exist","\u30A8\u30E9\u30FC: MBeans\u306F\u5B58\u5728\u3057\u307E\u305B\u3093"},
- {"Error:","\u30A8\u30E9\u30FC:"},
- {"Event","\u30A4\u30D9\u30F3\u30C8"},
- {"Exit", "\u7D42\u4E86(X)"},
- {"Exit.mnemonic", 'X'},
- {"Fail to load plugin", "\u8B66\u544A: \u30D7\u30E9\u30B0\u30A4\u30F3\u306E\u30ED\u30FC\u30C9\u306B\u5931\u6557\u3057\u307E\u3057\u305F: {0}"},
- {"FileChooser.fileExists.cancelOption", "\u53D6\u6D88"},
- {"FileChooser.fileExists.message", "<html><center>\u30D5\u30A1\u30A4\u30EB\u306F\u3059\u3067\u306B\u5B58\u5728\u3057\u3066\u3044\u307E\u3059:<br>{0}<br>\u7F6E\u63DB\u3057\u3066\u3082\u3088\u308D\u3057\u3044\u3067\u3059\u304B\u3002"},
- {"FileChooser.fileExists.okOption", "\u7F6E\u63DB"},
- {"FileChooser.fileExists.title", "\u30D5\u30A1\u30A4\u30EB\u304C\u5B58\u5728\u3057\u3066\u3044\u307E\u3059"},
- {"FileChooser.savedFile", "<html>\u30D5\u30A1\u30A4\u30EB\u306B\u4FDD\u5B58\u3057\u307E\u3057\u305F:<br>{0}<br>({1}\u30D0\u30A4\u30C8)"},
- {"FileChooser.saveFailed.message", "<html><center>\u30D5\u30A1\u30A4\u30EB\u3078\u306E\u4FDD\u5B58\u306B\u5931\u6557\u3057\u307E\u3057\u305F:<br>{0}<br>{1}"},
- {"FileChooser.saveFailed.title", "\u4FDD\u5B58\u306B\u5931\u6557\u3057\u307E\u3057\u305F"},
- {"Free physical memory","\u7A7A\u304D\u7269\u7406\u30E1\u30E2\u30EA\u30FC"},
- {"Free swap space","\u7A7A\u304D\u30B9\u30EF\u30C3\u30D7\u30FB\u30B9\u30DA\u30FC\u30B9"},
- {"Garbage collector","\u30AC\u30D9\u30FC\u30B8\u30FB\u30B3\u30EC\u30AF\u30BF"},
- {"GTK","GTK"},
- {"GcInfo","\u540D\u524D= ''{0}''\u3001\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3= {1,choice,-1#\u3042\u308A\u307E\u305B\u3093|0#{1,number,integer}\u500B}\u3001\u5408\u8A08\u6D88\u8CBB\u6642\u9593= {2}"},
- {"GC time","GC\u6642\u9593"},
- {"GC time details","{1}\u3067{0} ({2}\u500B\u306E\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3)"},
- {"Heap Memory Usage","\u30D2\u30FC\u30D7\u30FB\u30E1\u30E2\u30EA\u30FC\u4F7F\u7528\u7387"},
- {"Heap", "\u30D2\u30FC\u30D7"},
- {"Help.AboutDialog.accessibleDescription", "JConsole\u3068JDK\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u306B\u3064\u3044\u3066\u306E\u60C5\u5831\u3092\u542B\u3080\u30C0\u30A4\u30A2\u30ED\u30B0"},
- {"Help.AboutDialog.jConsoleVersion", "JConsole\u30D0\u30FC\u30B8\u30E7\u30F3:<br>{0}"},
- {"Help.AboutDialog.javaVersion", "Java VM\u30D0\u30FC\u30B8\u30E7\u30F3:<br>{0}"},
- {"Help.AboutDialog.masthead.accessibleName", "\u30DE\u30B9\u30C8\u30D8\u30C3\u30C9\u56F3\u5F62"},
- {"Help.AboutDialog.masthead.title", "JConsole\u306B\u3064\u3044\u3066"},
- {"Help.AboutDialog.title", "JConsole: \u8A73\u7D30"},
- {"Help.AboutDialog.userGuideLink", "JConsole\u30E6\u30FC\u30B6\u30FC\u30FB\u30AC\u30A4\u30C9(U):<br>{0}"},
- {"Help.AboutDialog.userGuideLink.mnemonic", 'U'},
- {"Help.AboutDialog.userGuideLink.url", "http://java.sun.com/javase/6/docs/technotes/guides/management/jconsole.html"},
- {"HelpMenu.About.title", "JConsole\u306B\u3064\u3044\u3066(A)"},
- {"HelpMenu.About.title.mnemonic", 'A'},
- {"HelpMenu.UserGuide.title", "\u30AA\u30F3\u30E9\u30A4\u30F3\u30FB\u30E6\u30FC\u30B6\u30FC\u30FB\u30AC\u30A4\u30C9"},
- {"HelpMenu.UserGuide.title.mnemonic", 'U'},
- {"HelpMenu.title", "\u30D8\u30EB\u30D7(H)"},
- {"HelpMenu.title.mnemonic", 'H'},
- {"Hotspot MBeans...", "Hotspot MBeans(H)..."},
- {"Hotspot MBeans....mnemonic", 'H'},
- {"Hotspot MBeans.dialog.accessibleDescription", "Hotspot MBeans\u306E\u7BA1\u7406\u7528\u30C0\u30A4\u30A2\u30ED\u30B0"},
- {"Impact","\u5F71\u97FF"},
- {"Info","\u60C5\u5831"},
- {"INFO","\u60C5\u5831"},
- {"Invalid plugin path", "\u8B66\u544A: \u7121\u52B9\u306A\u30D7\u30E9\u30B0\u30A4\u30F3\u30FB\u30D1\u30B9: {0}"},
- {"Invalid URL", "\u7121\u52B9\u306AURL: {0}"},
- {"Is","\u6B21\u306B\u4E00\u81F4\u3059\u308B"},
- {"Java Monitoring & Management Console", "Java Monitoring & Management Console"},
- {"JConsole: ","JConsole: {0}"},
- {"JConsole version","JConsole\u30D0\u30FC\u30B8\u30E7\u30F3\"{0}\""},
- {"JConsole.accessibleDescription", "Java Monitoring & Management Console"},
- {"JIT compiler","JIT\u30B3\u30F3\u30D1\u30A4\u30E9"},
- {"Java Virtual Machine","Java\u4EEE\u60F3\u30DE\u30B7\u30F3"},
- {"Java","Java"},
- {"Library path","\u30E9\u30A4\u30D6\u30E9\u30EA\u30FB\u30D1\u30B9"},
- {"Listeners","\u30EA\u30B9\u30CA\u30FC"},
- {"Live Threads","\u5B9F\u884C\u4E2D\u306E\u30B9\u30EC\u30C3\u30C9"},
- {"Loaded", "\u30ED\u30FC\u30C9\u6E08"},
- {"Local Process:", "\u30ED\u30FC\u30AB\u30EB\u30FB\u30D7\u30ED\u30BB\u30B9(L):"},
- {"Local Process:.mnemonic", 'L'},
- {"Look and Feel","Look&Feel"},
- {"Masthead.font", "Dialog-PLAIN-25"},
- {"Management Not Enabled","<b>\u6CE8\u610F</b>: \u7BA1\u7406\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u306F\u3053\u306E\u30D7\u30ED\u30BB\u30B9\u3067\u306F\u6709\u52B9\u5316\u3055\u308C\u307E\u305B\u3093\u3002"},
- {"Management Will Be Enabled","<b>\u6CE8\u610F</b>: \u7BA1\u7406\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u306F\u3053\u306E\u30D7\u30ED\u30BB\u30B9\u3067\u6709\u52B9\u5316\u3055\u308C\u307E\u3059\u3002"},
- {"MBeanAttributeInfo","MBeanAttributeInfo"},
- {"MBeanInfo","MBeanInfo"},
- {"MBeanNotificationInfo","MBeanNotificationInfo"},
- {"MBeanOperationInfo","MBeanOperationInfo"},
- {"MBeans","MBeans"},
- {"MBeansTab.clearNotificationsButton", "\u30AF\u30EA\u30A2(C)"},
- {"MBeansTab.clearNotificationsButton.mnemonic", 'C'},
- {"MBeansTab.clearNotificationsButton.toolTip", "\u901A\u77E5\u306E\u30AF\u30EA\u30A2"},
- {"MBeansTab.compositeNavigationMultiple", "\u30B3\u30F3\u30DD\u30B8\u30C3\u30C8\u30FB\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3{0}/{1}"},
- {"MBeansTab.compositeNavigationSingle", "\u30B3\u30F3\u30DD\u30B8\u30C3\u30C8\u30FB\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3"},
- {"MBeansTab.refreshAttributesButton", "\u30EA\u30D5\u30EC\u30C3\u30B7\u30E5(R)"},
- {"MBeansTab.refreshAttributesButton.mnemonic", 'R'},
- {"MBeansTab.refreshAttributesButton.toolTip", "\u5C5E\u6027\u306E\u30EA\u30D5\u30EC\u30C3\u30B7\u30E5"},
- {"MBeansTab.subscribeNotificationsButton", "\u30B5\u30D6\u30B9\u30AF\u30E9\u30A4\u30D6(S)"},
- {"MBeansTab.subscribeNotificationsButton.mnemonic", 'S'},
- {"MBeansTab.subscribeNotificationsButton.toolTip", "\u901A\u77E5\u30EA\u30B9\u30CB\u30F3\u30B0\u306E\u958B\u59CB"},
- {"MBeansTab.tabularNavigationMultiple", "\u30BF\u30D6\u30FB\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3{0}/{1}"},
- {"MBeansTab.tabularNavigationSingle", "\u30BF\u30D6\u30FB\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3"},
- {"MBeansTab.unsubscribeNotificationsButton", "\u30B5\u30D6\u30B9\u30AF\u30E9\u30A4\u30D6\u89E3\u9664(U)"},
- {"MBeansTab.unsubscribeNotificationsButton.mnemonic", 'U'},
- {"MBeansTab.unsubscribeNotificationsButton.toolTip", "\u901A\u77E5\u30EA\u30B9\u30CB\u30F3\u30B0\u306E\u505C\u6B62"},
- {"Manage Hotspot MBeans in: ", "Hotspot MBeans\u306E\u7BA1\u7406: "},
- {"Max","\u6700\u5927"},
- {"Maximum heap size","\u6700\u5927\u30D2\u30FC\u30D7\u30FB\u30B5\u30A4\u30BA"},
- {"Memory","\u30E1\u30E2\u30EA\u30FC"},
- {"MemoryPoolLabel", "\u30E1\u30E2\u30EA\u30FC\u30FB\u30D7\u30FC\u30EB\"{0}\""},
- {"MemoryTab.heapPlotter.accessibleName", "\u30D2\u30FC\u30D7\u7528\u306E\u30E1\u30E2\u30EA\u30FC\u4F7F\u7528\u7387\u30C1\u30E3\u30FC\u30C8\u3002"},
- {"MemoryTab.infoLabelFormat", "<html>\u4F7F\u7528\u6E08: {0} \u30B3\u30DF\u30C3\u30C8\u6E08: {1} \u6700\u5927: {2}</html>"},
- {"MemoryTab.nonHeapPlotter.accessibleName", "\u975E\u30D2\u30FC\u30D7\u7528\u306E\u30E1\u30E2\u30EA\u30FC\u4F7F\u7528\u7387\u30C1\u30E3\u30FC\u30C8\u3002"},
- {"MemoryTab.poolChart.aboveThreshold", "{0}\u306E\u3057\u304D\u3044\u5024\u3088\u308A\u4E0A\u3067\u3059\u3002\n"},
- {"MemoryTab.poolChart.accessibleName", "\u30E1\u30E2\u30EA\u30FC\u30FB\u30D7\u30FC\u30EB\u4F7F\u7528\u7387\u30C1\u30E3\u30FC\u30C8\u3002"},
- {"MemoryTab.poolChart.belowThreshold", "{0}\u306E\u3057\u304D\u3044\u5024\u3088\u308A\u4E0B\u3067\u3059\u3002\n"},
- {"MemoryTab.poolPlotter.accessibleName", "{0}\u306E\u30E1\u30E2\u30EA\u30FC\u4F7F\u7528\u7387\u30C1\u30E3\u30FC\u30C8\u3002"},
- {"Message","\u30E1\u30C3\u30BB\u30FC\u30B8"},
- {"Method successfully invoked", "\u30E1\u30BD\u30C3\u30C9\u304C\u6B63\u5E38\u306B\u8D77\u52D5\u3055\u308C\u307E\u3057\u305F"},
- {"Minimize All", "\u3059\u3079\u3066\u6700\u5C0F\u5316(M)"},
- {"Minimize All.mnemonic", 'M'},
- {"Minus Version", "\u3053\u308C\u306F{0}\u306E\u30D0\u30FC\u30B8\u30E7\u30F3{1}\u3067\u3059"},
- {"Monitor locked",
- " - \u30ED\u30C3\u30AF\u6E08{0}\n"},
- {"Motif","Motif"},
- {"Name Build and Mode","{0} (\u30D3\u30EB\u30C9{1}, {2})"},
- {"Name and Build","{0} (\u30D3\u30EB\u30C9{1})"},
- {"Name","\u540D\u524D"},
- {"Name: ","\u540D\u524D: "},
- {"Name State",
- "\u540D\u524D: {0}\n\u72B6\u614B: {1}\n"},
- {"Name State LockName",
- "\u540D\u524D: {0}\n\u72B6\u614B: {2}\u306E{1}\n"},
- {"Name State LockName LockOwner",
- "\u540D\u524D: {0}\n\u72B6\u614B: {2}\u306E{1}\u3001\u6240\u6709\u8005: {3}\n"},
- {"New Connection...", "\u65B0\u898F\u63A5\u7D9A(N)..."},
- {"New Connection....mnemonic", 'N'},
- {"New value applied","\u9069\u7528\u3055\u308C\u305F\u65B0\u898F\u5024"},
- {"No attribute selected","\u5C5E\u6027\u304C\u9078\u629E\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F"},
- {"No deadlock detected","\u30C7\u30C3\u30C9\u30ED\u30C3\u30AF\u304C\u691C\u51FA\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F"},
- {"No value selected","\u5024\u304C\u9078\u629E\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F"},
- {"Non-Heap Memory Usage","\u975E\u30D2\u30FC\u30D7\u30FB\u30E1\u30E2\u30EA\u30FC\u4F7F\u7528\u7387"},
- {"Non-Heap", "\u975E\u30D2\u30FC\u30D7"},
- {"Not Yet Implemented","\u307E\u3060\u5B9F\u88C5\u3055\u308C\u3066\u3044\u307E\u305B\u3093"},
- {"Not a valid event broadcaster", "\u6709\u52B9\u306A\u30A4\u30D9\u30F3\u30C8\u30FB\u30D6\u30ED\u30FC\u30C9\u30AD\u30E3\u30B9\u30BF\u3067\u306F\u3042\u308A\u307E\u305B\u3093"},
- {"Notification","\u901A\u77E5"},
- {"Notification buffer","\u901A\u77E5\u30D0\u30C3\u30D5\u30A1"},
- {"Notifications","\u901A\u77E5"},
- {"NotifTypes", "NotifTypes"},
- {"Number of Threads","\u30B9\u30EC\u30C3\u30C9\u6570"},
- {"Number of Loaded Classes","\u30ED\u30FC\u30C9\u6E08\u30AF\u30E9\u30B9\u6570"},
- {"Number of processors","\u30D7\u30ED\u30BB\u30C3\u30B5\u6570"},
- {"ObjectName","ObjectName"},
- {"Operating System","\u30AA\u30DA\u30EC\u30FC\u30C6\u30A3\u30F3\u30B0\u30FB\u30B7\u30B9\u30C6\u30E0"},
- {"Operation","\u64CD\u4F5C"},
- {"Operation invocation","\u64CD\u4F5C\u306E\u547C\u51FA\u3057"},
- {"Operation return value", "\u64CD\u4F5C\u306E\u623B\u308A\u5024"},
- {"Operations","\u64CD\u4F5C"},
- {"Overview","\u6982\u8981"},
- {"OverviewPanel.plotter.accessibleName", "{0}\u306E\u30C1\u30E3\u30FC\u30C8\u3002"},
- {"Parameter", "\u30D1\u30E9\u30E1\u30FC\u30BF"},
- {"Password: ", "\u30D1\u30B9\u30EF\u30FC\u30C9(P): "},
- {"Password: .mnemonic", 'P'},
- {"Password.accessibleName", "\u30D1\u30B9\u30EF\u30FC\u30C9"},
- {"Peak","\u30D4\u30FC\u30AF"},
- {"Perform GC", "GC\u306E\u5B9F\u884C"},
- {"Perform GC.mnemonic", 'G'},
- {"Perform GC.toolTip", "\u30AC\u30D9\u30FC\u30B8\u30FB\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3\u306E\u30EA\u30AF\u30A8\u30B9\u30C8"},
- {"Plotter.accessibleName", "\u30C1\u30E3\u30FC\u30C8"},
- {"Plotter.accessibleName.keyAndValue", "{0}={1}\n"},
- {"Plotter.accessibleName.noData", "\u30C7\u30FC\u30BF\u304C\u30D7\u30ED\u30C3\u30C8\u3055\u308C\u307E\u305B\u3093\u3002"},
- {"Plotter.saveAsMenuItem", "\u540D\u524D\u3092\u4ED8\u3051\u3066\u30C7\u30FC\u30BF\u3092\u4FDD\u5B58(A)..."},
- {"Plotter.saveAsMenuItem.mnemonic", 'A'},
- {"Plotter.timeRangeMenu", "\u6642\u9593\u7BC4\u56F2(T)"},
- {"Plotter.timeRangeMenu.mnemonic", 'T'},
- {"Problem adding listener","\u30EA\u30B9\u30CA\u30FC\u8FFD\u52A0\u4E2D\u306E\u554F\u984C"},
- {"Problem displaying MBean", "MBean\u8868\u793A\u4E2D\u306E\u554F\u984C"},
- {"Problem invoking", "\u547C\u51FA\u3057\u4E2D\u306E\u554F\u984C"},
- {"Problem removing listener","\u30EA\u30B9\u30CA\u30FC\u524A\u9664\u4E2D\u306E\u554F\u984C"},
- {"Problem setting attribute","\u5C5E\u6027\u8A2D\u5B9A\u4E2D\u306E\u554F\u984C"},
- {"Process CPU time","\u30D7\u30ED\u30BB\u30B9CPU\u6642\u9593"},
- {"R/W","R/W"},
- {"Readable","\u8AAD\u53D6\u308A\u53EF\u80FD"},
- {"Received","\u53D7\u4FE1\u6E08"},
- {"Reconnect","\u518D\u63A5\u7D9A"},
- {"Remote Process:", "\u30EA\u30E2\u30FC\u30C8\u30FB\u30D7\u30ED\u30BB\u30B9(R):"},
- {"Remote Process:.mnemonic", 'R'},
- {"Remote Process.textField.accessibleName", "\u30EA\u30E2\u30FC\u30C8\u30FB\u30D7\u30ED\u30BB\u30B9"},
- {"Remove","\u524A\u9664"},
- {"Restore All", "\u3059\u3079\u3066\u5FA9\u5143(R)"},
- {"Restore All.mnemonic", 'R'},
- {"Return value", "\u623B\u308A\u5024"},
- {"ReturnType", "ReturnType"},
- {"SeqNum","SeqNum"},
- {"Size Bytes", "{0,number,integer}\u30D0\u30A4\u30C8"},
- {"Size Gb","{0} Gb"},
- {"Size Kb","{0} Kb"},
- {"Size Mb","{0} Mb"},
- {"Source","\u30BD\u30FC\u30B9"},
- {"Stack trace",
- "\n\u30B9\u30BF\u30C3\u30AF\u30FB\u30C8\u30EC\u30FC\u30B9: \n"},
- {"Success:","\u6210\u529F:"},
- // Note: SummaryTab.headerDateTimeFormat can be one the following:
- // 1. A combination of two styles for date and time, using the
- // constants from class DateFormat: SHORT, MEDIUM, LONG, FULL.
- // Example: "MEDIUM,MEDIUM" or "FULL,SHORT"
- // 2. An explicit string pattern used for creating an instance
- // of the class SimpleDateFormat.
- // Example: "yyyy-MM-dd HH:mm:ss" or "M/d/yyyy h:mm:ss a"
- {"SummaryTab.headerDateTimeFormat", "FULL,FULL"},
- {"SummaryTab.pendingFinalization.label", "\u30D5\u30A1\u30A4\u30CA\u30E9\u30A4\u30BA\u306E\u30DA\u30F3\u30C7\u30A3\u30F3\u30B0"},
- {"SummaryTab.pendingFinalization.value", "{0}\u500B\u306E\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8"},
- {"SummaryTab.tabName", "VM\u30B5\u30DE\u30EA\u30FC"},
- {"SummaryTab.vmVersion","{0}\u30D0\u30FC\u30B8\u30E7\u30F3{1}"},
- {"TabularData are not supported", "TabularData \u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093"},
- {"Threads","\u30B9\u30EC\u30C3\u30C9"},
- {"ThreadTab.infoLabelFormat", "<html>\u5B9F\u884C\u4E2D: {0} \u30D4\u30FC\u30AF: {1} \u5408\u8A08: {2}</html>"},
- {"ThreadTab.threadInfo.accessibleName", "\u30B9\u30EC\u30C3\u30C9\u60C5\u5831"},
- {"ThreadTab.threadPlotter.accessibleName", "\u30B9\u30EC\u30C3\u30C9\u6570\u306E\u30C1\u30E3\u30FC\u30C8\u3002"},
- {"Threshold","\u3057\u304D\u3044\u5024"},
- {"Tile", "\u4E26\u3079\u3066\u8868\u793A(T)"},
- {"Tile.mnemonic", 'T'},
- {"Time Range:", "\u6642\u9593\u7BC4\u56F2(T):"},
- {"Time Range:.mnemonic", 'T'},
- {"Time", "\u6642\u9593"},
- {"TimeStamp","TimeStamp"},
- {"Total Loaded", "\u30ED\u30FC\u30C9\u6E08\u5408\u8A08"},
- {"Total classes loaded","\u30ED\u30FC\u30C9\u6E08\u30AF\u30E9\u30B9\u5408\u8A08"},
- {"Total classes unloaded","\u30A2\u30F3\u30ED\u30FC\u30C9\u6E08\u30AF\u30E9\u30B9\u5408\u8A08"},
- {"Total compile time","\u5408\u8A08\u30B3\u30F3\u30D1\u30A4\u30EB\u6642\u9593"},
- {"Total physical memory","\u5408\u8A08\u7269\u7406\u30E1\u30E2\u30EA\u30FC"},
- {"Total threads started","\u958B\u59CB\u6E08\u5408\u8A08\u30B9\u30EC\u30C3\u30C9"},
- {"Total swap space","\u5408\u8A08\u30B9\u30EF\u30C3\u30D7\u30FB\u30B9\u30DA\u30FC\u30B9"},
- {"Type","\u578B"},
- {"Unavailable","\u5229\u7528\u4E0D\u53EF"},
- {"UNKNOWN","UNKNOWN"},
- {"Unknown Host","\u4E0D\u660E\u306A\u30DB\u30B9\u30C8: {0}"},
- {"Unregister", "\u767B\u9332\u89E3\u9664"},
- {"Uptime","\u7A3C\u50CD\u6642\u9593"},
- {"Uptime: ","\u7A3C\u50CD\u6642\u9593: "},
- {"Usage Threshold","\u4F7F\u7528\u3057\u304D\u3044\u5024"},
- {"remoteTF.usage","<b>\u4F7F\u7528\u65B9\u6CD5</b>: <hostname>:<port>\u307E\u305F\u306Fservice:jmx:<protocol>:<sap>"},
- {"Used","\u4F7F\u7528\u6E08"},
- {"Username: ", "\u30E6\u30FC\u30B6\u30FC\u540D(U): "},
- {"Username: .mnemonic", 'U'},
- {"Username.accessibleName", "\u30E6\u30FC\u30B6\u30FC\u540D"},
- {"UserData","UserData"},
- {"Virtual Machine","\u4EEE\u60F3\u30DE\u30B7\u30F3"},
- {"VM arguments","VM\u5F15\u6570"},
- {"VM","VM"},
- {"VMInternalFrame.accessibleDescription", "Java\u4EEE\u60F3\u30DE\u30B7\u30F3\u306E\u30E2\u30CB\u30BF\u30FC\u7528\u306E\u5185\u90E8\u30D5\u30EC\u30FC\u30E0"},
- {"Value","\u5024"},
- {"Vendor", "\u30D9\u30F3\u30C0\u30FC"},
- {"Verbose Output","\u8A73\u7D30\u51FA\u529B"},
- {"Verbose Output.toolTip", "\u30AF\u30E9\u30B9\u8AAD\u8FBC\u307F\u30B7\u30B9\u30C6\u30E0\u3067\u8A73\u7D30\u51FA\u529B\u3092\u6709\u52B9\u306B\u3059\u308B"},
- {"View value", "\u5024\u306E\u8868\u793A"},
- {"View","\u8868\u793A"},
- {"Window", "\u30A6\u30A3\u30F3\u30C9\u30A6(W)"},
- {"Window.mnemonic", 'W'},
- {"Windows","\u30A6\u30A3\u30F3\u30C9\u30A6"},
- {"Writable","\u66F8\u8FBC\u307F\u53EF\u80FD"},
- {"You cannot drop a class here", "\u30AF\u30E9\u30B9\u3092\u3053\u3053\u306B\u30C9\u30ED\u30C3\u30D7\u3067\u304D\u307E\u305B\u3093"},
- {"collapse", "\u7E2E\u5C0F"},
- {"connectionFailed1","\u63A5\u7D9A\u306B\u5931\u6557\u3057\u307E\u3057\u305F: \u518D\u8A66\u884C\u3057\u307E\u3059\u304B\u3002"},
- {"connectionFailed2","{0}\u3078\u306E\u63A5\u7D9A\u304C\u6210\u529F\u3057\u307E\u305B\u3093\u3067\u3057\u305F\u3002<br>\u3082\u3046\u4E00\u5EA6\u8A66\u3057\u307E\u3059\u304B\u3002"},
- {"connectionLost1","\u63A5\u7D9A\u304C\u5931\u308F\u308C\u307E\u3057\u305F: \u518D\u63A5\u7D9A\u3057\u307E\u3059\u304B\u3002"},
- {"connectionLost2","\u30EA\u30E2\u30FC\u30C8\u30FB\u30D7\u30ED\u30BB\u30B9\u304C\u7D42\u4E86\u3057\u305F\u305F\u3081{0}\u3078\u306E\u63A5\u7D9A\u304C\u5931\u308F\u308C\u307E\u3057\u305F\u3002<br>\u518D\u63A5\u7D9A\u3057\u307E\u3059\u304B\u3002"},
- {"connectingTo1","{0}\u306B\u63A5\u7D9A\u4E2D"},
- {"connectingTo2","{0}\u306B\u73FE\u5728\u63A5\u7D9A\u4E2D\u3067\u3059\u3002<br>\u3053\u308C\u306B\u306F\u6570\u5206\u304B\u304B\u308A\u307E\u3059\u3002"},
- {"deadlockAllTab","\u3059\u3079\u3066"},
- {"deadlockTab","\u30C7\u30C3\u30C9\u30ED\u30C3\u30AF"},
- {"deadlockTabN","\u30C7\u30C3\u30C9\u30ED\u30C3\u30AF{0}"},
- {"expand", "\u5C55\u958B"},
- {"kbytes","{0} KB"},
- {"operation","\u64CD\u4F5C"},
- {"plot", "\u30D7\u30ED\u30C3\u30C8"},
- {"visualize","\u8996\u899A\u5316"},
- {"zz usage text",
- "\u4F7F\u7528\u65B9\u6CD5: {0} [ -interval=n ] [ -notile ] [ -pluginpath <path> ] [ -version ] [ connection ... ]\n\n -interval \u66F4\u65B0\u9593\u9694\u3092n\u79D2\u306B\u8A2D\u5B9A\u3059\u308B(\u30C7\u30D5\u30A9\u30EB\u30C8\u306F4\u79D2)\n -notile \u30A6\u30A3\u30F3\u30C9\u30A6\u3092\u6700\u521D\u306B\u4E26\u3079\u3066\u8868\u793A\u3057\u306A\u3044(2\u3064\u4EE5\u4E0A\u306E\u63A5\u7D9A\u306B\u3064\u3044\u3066)\n -pluginpath JConsole\u304C\u30D7\u30E9\u30B0\u30A4\u30F3\u3092\u53C2\u7167\u3059\u308B\u305F\u3081\u306B\u4F7F\u7528\u3059\u308B\u30D1\u30B9\u3092\u6307\u5B9A\u3059\u308B\n -version \u30D7\u30ED\u30B0\u30E9\u30E0\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u5370\u5237\u3059\u308B\n\n connection = pid || host:port || JMX URL (service:jmx:<protocol>://...)\n pid \u30BF\u30FC\u30B2\u30C3\u30C8\u30FB\u30D7\u30ED\u30BB\u30B9\u306E\u30D7\u30ED\u30BB\u30B9ID\n host \u30EA\u30E2\u30FC\u30C8\u30FB\u30DB\u30B9\u30C8\u540D\u307E\u305F\u306FIP\u30A2\u30C9\u30EC\u30B9\n port \u30EA\u30E2\u30FC\u30C8\u63A5\u7D9A\u7528\u306E\u30DD\u30FC\u30C8\u756A\u53F7\n\n -J JConsole\u304C\u5B9F\u884C\u4E2D\u306EJava\u4EEE\u60F3\u30DE\u30B7\u30F3\u3078\u306E\n \u5165\u529B\u5F15\u6570\u3092\u6307\u5B9A\u3059\u308B"},
- // END OF MATERIAL TO LOCALIZE
- };
-
- String ls = System.getProperty("line.separator");
- for(int i=0;i<temp.length;i++) {
- if (temp[i][1] instanceof String){
- temp[i][1] = temp[i][1].toString().replaceAll("\n",ls);
- }
- }
-
- return temp;
-
- }
-
- public synchronized Object[][] getContents() {
- return getContents0();
- }
-}
diff --git a/src/share/classes/sun/tools/jconsole/resources/JConsoleResources_zh_CN.java b/src/share/classes/sun/tools/jconsole/resources/JConsoleResources_zh_CN.java
deleted file mode 100644
index 4eb63ed..0000000
--- a/src/share/classes/sun/tools/jconsole/resources/JConsoleResources_zh_CN.java
+++ /dev/null
@@ -1,442 +0,0 @@
-/*
- * Copyright (c) 2004, 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 sun.tools.jconsole.resources;
-
-import java.util.*;
-
-import static java.awt.event.KeyEvent.*;
-
-/**
- * <p> This class represents the <code>ResourceBundle</code>
- * for the following package(s):
- *
- * <ol>
- * <li> sun.tools.jconsole
- * </ol>
- *
- * <P>
- * Subclasses must override <code>getContents0</code> and provide an array,
- * where each item in the array consists of a <code>String</code> key,
- * and either a <code>String</code> value associated with that key,
- * or if the keys ends with ".mnemonic", an element
- * representing a mnemomic keycode <code>int</code> or <code>char</code>.
- */
-public class JConsoleResources_zh_CN extends JConsoleResources {
-
- /**
- * Returns the contents of this <code>ResourceBundle</code>.
- *
- * <p>
- *
- * @return the contents of this <code>ResourceBundle</code>.
- */
- protected Object[][] getContents0() {
- Object[][] temp = new Object[][] {
- // NOTE 1: The value strings in this file containing "{0}" are
- // processed by the java.text.MessageFormat class. Any
- // single quotes appearing in these strings need to be
- // doubled up.
- //
- // NOTE 2: To make working with this file a bit easier, please
- // maintain these messages in ASCII sorted order by
- // message key.
- //
- // LOCALIZE THIS
- {" 1 day"," 1 \u5929"},
- {" 1 hour"," 1 \u5C0F\u65F6"},
- {" 1 min"," 1 \u5206\u949F"},
- {" 1 month"," 1 \u4E2A\u6708"},
- {" 1 year"," 1 \u5E74"},
- {" 2 hours"," 2 \u5C0F\u65F6"},
- {" 3 hours"," 3 \u5C0F\u65F6"},
- {" 3 months"," 3 \u4E2A\u6708"},
- {" 5 min"," 5 \u5206\u949F"},
- {" 6 hours"," 6 \u5C0F\u65F6"},
- {" 6 months"," 6 \u4E2A\u6708"},
- {" 7 days"," 7 \u5929"},
- {"10 min","10 \u5206\u949F"},
- {"12 hours","12 \u5C0F\u65F6"},
- {"30 min","30 \u5206\u949F"},
- {"<","<"},
- {"<<","<<"},
- {">",">"},
- {"ACTION","ACTION"},
- {"ACTION_INFO","ACTION_INFO"},
- {"All","\u5168\u90E8"},
- {"Apply","\u5E94\u7528"},
- {"Architecture","\u4F53\u7CFB\u7ED3\u6784"},
- {"Array, OpenType", "\u6570\u7EC4, OpenType"},
- {"Array, OpenType, Numeric value viewer","\u6570\u7EC4, OpenType, \u6570\u503C\u67E5\u770B\u5668"},
- {"Attribute","\u5C5E\u6027"},
- {"Attribute value","\u5C5E\u6027\u503C"},
- {"Attribute values","\u5C5E\u6027\u503C"},
- {"Attributes","\u5C5E\u6027"},
- {"Blank", "\u7A7A\u767D"},
- {"BlockedCount WaitedCount",
- "\u603B\u963B\u6B62\u6570: {0}, \u603B\u7B49\u5F85\u6570: {1}\n"},
- {"Boot class path","\u5F15\u5BFC\u7C7B\u8DEF\u5F84"},
- {"BorderedComponent.moreOrLessButton.toolTip", "\u5207\u6362\u4EE5\u663E\u793A\u66F4\u591A\u6216\u66F4\u5C11\u4FE1\u606F"},
- {"CPU Usage","CPU \u5360\u7528\u7387"},
- {"CPUUsageFormat","CPU \u5360\u7528\u7387: {0}%"},
- {"Cancel","\u53D6\u6D88"},
- {"Cascade", "\u5C42\u53E0(C)"},
- {"Cascade.mnemonic", 'C'},
- {"Chart:", "\u56FE\u8868(C):"},
- {"Chart:.mnemonic", 'C'},
- {"Class path","\u7C7B\u8DEF\u5F84"},
- {"Class","\u7C7B"},
- {"ClassName","ClassName"},
- {"ClassTab.infoLabelFormat", "<html>\u5DF2\u52A0\u8F7D: {0} \u5DF2\u5378\u8F7D: {1} \u603B\u8BA1: {2}</html>"},
- {"ClassTab.loadedClassesPlotter.accessibleName", "\u5DF2\u52A0\u8F7D\u7C7B\u7684\u56FE\u8868\u3002"},
- {"Classes","\u7C7B"},
- {"Close","\u5173\u95ED"},
- {"Column.Name", "\u540D\u79F0"},
- {"Column.PID", "PID"},
- {"Committed memory","\u63D0\u4EA4\u7684\u5185\u5B58"},
- {"Committed virtual memory","\u63D0\u4EA4\u7684\u865A\u62DF\u5185\u5B58"},
- {"Committed", "\u5DF2\u63D0\u4EA4"},
- {"Compiler","\u7F16\u8BD1\u5668"},
- {"CompositeData","CompositeData"},
- {"Config","\u914D\u7F6E"},
- {"Connect", "\u8FDE\u63A5(C)"},
- {"Connect.mnemonic", 'C'},
- {"Connect...","\u8FDE\u63A5..."},
- {"ConnectDialog.connectButton.toolTip", "\u8FDE\u63A5\u5230 Java \u865A\u62DF\u673A"},
- {"ConnectDialog.accessibleDescription", "\u7528\u4E8E\u4E0E\u672C\u5730\u6216\u8FDC\u7A0B Java \u865A\u62DF\u673A\u5EFA\u7ACB\u65B0\u8FDE\u63A5\u7684\u5BF9\u8BDD\u6846"},
- {"ConnectDialog.masthead.accessibleName", "\u62A5\u5934\u56FE"},
- {"ConnectDialog.masthead.title", "\u65B0\u5EFA\u8FDE\u63A5"},
- {"ConnectDialog.statusBar.accessibleName", "\u72B6\u6001\u680F"},
- {"ConnectDialog.title", "JConsole: \u65B0\u5EFA\u8FDE\u63A5"},
- {"Connected. Click to disconnect.","\u5DF2\u8FDE\u63A5\u3002\u5355\u51FB\u53EF\u65AD\u5F00\u8FDE\u63A5\u3002"},
- {"Connection failed","\u8FDE\u63A5\u5931\u8D25"},
- {"Connection", "\u8FDE\u63A5(C)"},
- {"Connection.mnemonic", 'C'},
- {"Connection name", "\u8FDE\u63A5\u540D\u79F0"},
- {"ConnectionName (disconnected)","{0} (\u5DF2\u65AD\u5F00\u8FDE\u63A5)"},
- {"Constructor","\u6784\u9020\u5668"},
- {"Current classes loaded", "\u5DF2\u52A0\u88C5\u5F53\u524D\u7C7B"},
- {"Current heap size","\u5F53\u524D\u5806\u5927\u5C0F"},
- {"Current value","\u5F53\u524D\u503C: {0}"},
- {"Create", "\u521B\u5EFA"},
- {"Daemon threads","\u5B88\u62A4\u7A0B\u5E8F\u7EBF\u7A0B"},
- {"Disconnected. Click to connect.","\u5DF2\u65AD\u5F00\u8FDE\u63A5\u3002\u5355\u51FB\u53EF\u8FDE\u63A5\u3002"},
- {"Double click to expand/collapse","\u53CC\u51FB\u4EE5\u5C55\u5F00/\u9690\u85CF"},
- {"Double click to visualize", "\u53CC\u51FB\u4EE5\u4F7F\u5176\u53EF\u89C1"},
- {"Description", "\u8BF4\u660E"},
- {"Description: ", "\u8BF4\u660E: "},
- {"Descriptor", "\u63CF\u8FF0\u7B26"},
- {"Details", "\u8BE6\u7EC6\u8D44\u6599"},
- {"Detect Deadlock", "\u68C0\u6D4B\u6B7B\u9501(D)"},
- {"Detect Deadlock.mnemonic", 'D'},
- {"Detect Deadlock.toolTip", "\u68C0\u6D4B\u5904\u4E8E\u6B7B\u9501\u72B6\u6001\u7684\u7EBF\u7A0B"},
- {"Dimension is not supported:","\u4E0D\u652F\u6301\u7EF4:"},
- {"Discard chart", "\u653E\u5F03\u56FE\u8868"},
- {"DurationDaysHoursMinutes","{0,choice,1#{0,number,integer} \u5929 |1.0<{0,number,integer} \u5929 }{1,choice,0<{1,number,integer} \u5C0F\u65F6 |1#{1,number,integer} \u5C0F\u65F6 |1<{1,number,integer} \u5C0F\u65F6 }{2,choice,0<{2,number,integer} \u5206\u949F|1#{2,number,integer} \u5206\u949F|1.0<{2,number,integer} \u5206\u949F}"},
-
- {"DurationHoursMinutes","{0,choice,1#{0,number,integer} \u5C0F\u65F6 |1<{0,number,integer} \u5C0F\u65F6 }{1,choice,0<{1,number,integer} \u5206\u949F|1#{1,number,integer} \u5206\u949F|1.0<{1,number,integer} \u5206\u949F}"},
-
- {"DurationMinutes","{0,choice,1#{0,number,integer} \u5206\u949F|1.0<{0,number,integer} \u5206\u949F}"},
- {"DurationSeconds","{0} \u79D2"},
- {"Empty array", "\u7A7A\u6570\u7EC4"},
- {"Empty opentype viewer", "\u7A7A opentype \u67E5\u770B\u5668"},
- {"Error","\u9519\u8BEF"},
- {"Error: MBeans already exist","\u9519\u8BEF: MBean \u5DF2\u5B58\u5728"},
- {"Error: MBeans do not exist","\u9519\u8BEF: MBean \u4E0D\u5B58\u5728"},
- {"Error:","\u9519\u8BEF:"},
- {"Event","\u4E8B\u4EF6"},
- {"Exit", "\u9000\u51FA(X)"},
- {"Exit.mnemonic", 'X'},
- {"Fail to load plugin", "\u8B66\u544A: \u65E0\u6CD5\u52A0\u8F7D\u63D2\u4EF6: {0}"},
- {"FileChooser.fileExists.cancelOption", "\u53D6\u6D88"},
- {"FileChooser.fileExists.message", "<html><center>\u6587\u4EF6\u5DF2\u5B58\u5728:<br>{0}<br>\u662F\u5426\u8981\u66FF\u6362?"},
- {"FileChooser.fileExists.okOption", "\u66FF\u6362"},
- {"FileChooser.fileExists.title", "\u6587\u4EF6\u5DF2\u5B58\u5728"},
- {"FileChooser.savedFile", "<html>\u5DF2\u4FDD\u5B58\u5230\u6587\u4EF6:<br>{0}<br>({1} \u5B57\u8282)"},
- {"FileChooser.saveFailed.message", "<html><center>\u672A\u80FD\u4FDD\u5B58\u5230\u6587\u4EF6:<br>{0}<br>{1}"},
- {"FileChooser.saveFailed.title", "\u4FDD\u5B58\u5931\u8D25"},
- {"Free physical memory","\u7A7A\u95F2\u7269\u7406\u5185\u5B58"},
- {"Free swap space","\u7A7A\u95F2\u4EA4\u6362\u7A7A\u95F4"},
- {"Garbage collector","\u5783\u573E\u6536\u96C6\u5668"},
- {"GTK","GTK"},
- {"GcInfo","\u540D\u79F0 = ''{0}'', \u6536\u96C6 = {1,choice,-1#Unavailable|0#{1,number,integer}}, \u603B\u82B1\u8D39\u65F6\u95F4 = {2}"},
- {"GC time","GC \u65F6\u95F4"},
- {"GC time details","{1}\u4E0A\u7684{0} ({2}\u6536\u96C6)"},
- {"Heap Memory Usage","\u5806\u5185\u5B58\u4F7F\u7528\u91CF"},
- {"Heap", "\u5806"},
- {"Help.AboutDialog.accessibleDescription", "\u5305\u542B\u6709\u5173 JConsole \u548C JDK \u7248\u672C\u4FE1\u606F\u7684\u5BF9\u8BDD\u6846"},
- {"Help.AboutDialog.jConsoleVersion", "JConsole \u7248\u672C:<br>{0}"},
- {"Help.AboutDialog.javaVersion", "Java VM \u7248\u672C:<br>{0}"},
- {"Help.AboutDialog.masthead.accessibleName", "\u62A5\u5934\u56FE"},
- {"Help.AboutDialog.masthead.title", "\u5173\u4E8E JConsole"},
- {"Help.AboutDialog.title", "JConsole: \u5173\u4E8E"},
- {"Help.AboutDialog.userGuideLink", "JConsole \u7528\u6237\u6307\u5357(U):<br>{0}"},
- {"Help.AboutDialog.userGuideLink.mnemonic", 'U'},
- {"Help.AboutDialog.userGuideLink.url", "http://java.sun.com/javase/6/docs/technotes/guides/management/jconsole.html"},
- {"HelpMenu.About.title", "\u5173\u4E8E JConsole(A)"},
- {"HelpMenu.About.title.mnemonic", 'A'},
- {"HelpMenu.UserGuide.title", "\u8054\u673A\u7528\u6237\u6307\u5357"},
- {"HelpMenu.UserGuide.title.mnemonic", 'U'},
- {"HelpMenu.title", "\u5E2E\u52A9(H)"},
- {"HelpMenu.title.mnemonic", 'H'},
- {"Hotspot MBeans...", "HotSpot MBean(H)..."},
- {"Hotspot MBeans....mnemonic", 'H'},
- {"Hotspot MBeans.dialog.accessibleDescription", "\u7528\u4E8E\u7BA1\u7406 HotSpot MBean \u7684\u5BF9\u8BDD\u6846"},
- {"Impact","\u5F71\u54CD"},
- {"Info","\u4FE1\u606F"},
- {"INFO","INFO"},
- {"Invalid plugin path", "\u8B66\u544A: \u63D2\u4EF6\u8DEF\u5F84\u65E0\u6548: {0}"},
- {"Invalid URL", "URL \u65E0\u6548: {0}"},
- {"Is","\u662F"},
- {"Java Monitoring & Management Console", "Java \u76D1\u89C6\u548C\u7BA1\u7406\u63A7\u5236\u53F0"},
- {"JConsole: ","JConsole: {0}"},
- {"JConsole version","JConsole \u7248\u672C \"{0}\""},
- {"JConsole.accessibleDescription", "Java \u76D1\u89C6\u548C\u7BA1\u7406\u63A7\u5236\u53F0"},
- {"JIT compiler","JIT \u7F16\u8BD1\u5668"},
- {"Java Virtual Machine","Java \u865A\u62DF\u673A"},
- {"Java","Java"},
- {"Library path","\u5E93\u8DEF\u5F84"},
- {"Listeners","\u76D1\u542C\u7A0B\u5E8F"},
- {"Live Threads","\u6D3B\u52A8\u7EBF\u7A0B"},
- {"Loaded", "\u5DF2\u52A0\u8F7D"},
- {"Local Process:", "\u672C\u5730\u8FDB\u7A0B(L):"},
- {"Local Process:.mnemonic", 'L'},
- {"Look and Feel","\u5916\u89C2"},
- {"Masthead.font", "Dialog-PLAIN-25"},
- {"Management Not Enabled","<b>\u6CE8</b>: \u672A\u5BF9\u6B64\u8FDB\u7A0B\u542F\u7528\u7BA1\u7406\u4EE3\u7406\u3002"},
- {"Management Will Be Enabled","<b>\u6CE8</b>: \u5C06\u5BF9\u6B64\u8FDB\u7A0B\u542F\u7528\u7BA1\u7406\u4EE3\u7406\u3002"},
- {"MBeanAttributeInfo","MBeanAttributeInfo"},
- {"MBeanInfo","MBeanInfo"},
- {"MBeanNotificationInfo","MBeanNotificationInfo"},
- {"MBeanOperationInfo","MBeanOperationInfo"},
- {"MBeans","MBean"},
- {"MBeansTab.clearNotificationsButton", "\u6E05\u9664(C)"},
- {"MBeansTab.clearNotificationsButton.mnemonic", 'C'},
- {"MBeansTab.clearNotificationsButton.toolTip", "\u6E05\u9664\u901A\u77E5"},
- {"MBeansTab.compositeNavigationMultiple", "\u7EC4\u5408\u5BFC\u822A{0}/{1}"},
- {"MBeansTab.compositeNavigationSingle", "\u7EC4\u5408\u5BFC\u822A"},
- {"MBeansTab.refreshAttributesButton", "\u5237\u65B0(R)"},
- {"MBeansTab.refreshAttributesButton.mnemonic", 'R'},
- {"MBeansTab.refreshAttributesButton.toolTip", "\u5237\u65B0\u5C5E\u6027"},
- {"MBeansTab.subscribeNotificationsButton", "\u8BA2\u9605(S)"},
- {"MBeansTab.subscribeNotificationsButton.mnemonic", 'S'},
- {"MBeansTab.subscribeNotificationsButton.toolTip", "\u5F00\u59CB\u76D1\u542C\u901A\u77E5"},
- {"MBeansTab.tabularNavigationMultiple", "\u8868\u683C\u5F0F\u5BFC\u822A{0}/{1}"},
- {"MBeansTab.tabularNavigationSingle", "\u8868\u683C\u5F0F\u5BFC\u822A"},
- {"MBeansTab.unsubscribeNotificationsButton", "\u53D6\u6D88\u8BA2\u9605(U)"},
- {"MBeansTab.unsubscribeNotificationsButton.mnemonic", 'U'},
- {"MBeansTab.unsubscribeNotificationsButton.toolTip", "\u505C\u6B62\u76D1\u542C\u901A\u77E5"},
- {"Manage Hotspot MBeans in: ", "\u7BA1\u7406\u4EE5\u4E0B\u4F4D\u7F6E\u7684 HotSpot MBean: "},
- {"Max","\u6700\u5927\u503C"},
- {"Maximum heap size","\u6700\u5927\u5806\u5927\u5C0F"},
- {"Memory","\u5185\u5B58"},
- {"MemoryPoolLabel", "\u5185\u5B58\u6C60 \"{0}\""},
- {"MemoryTab.heapPlotter.accessibleName", "\u5806\u7684\u5185\u5B58\u4F7F\u7528\u91CF\u56FE\u8868\u3002"},
- {"MemoryTab.infoLabelFormat", "<html>\u5DF2\u7528: {0} \u5DF2\u63D0\u4EA4: {1} \u6700\u5927: {2}</html>"},
- {"MemoryTab.nonHeapPlotter.accessibleName", "\u975E\u5806\u7684\u5185\u5B58\u4F7F\u7528\u91CF\u56FE\u8868\u3002"},
- {"MemoryTab.poolChart.aboveThreshold", "\u5927\u4E8E{0}\u7684\u9608\u503C\u3002\n"},
- {"MemoryTab.poolChart.accessibleName", "\u5185\u5B58\u6C60\u4F7F\u7528\u91CF\u56FE\u8868\u3002"},
- {"MemoryTab.poolChart.belowThreshold", "\u4F4E\u4E8E{0}\u7684\u9608\u503C\u3002\n"},
- {"MemoryTab.poolPlotter.accessibleName", "{0}\u7684\u5185\u5B58\u4F7F\u7528\u91CF\u56FE\u8868\u3002"},
- {"Message","\u6D88\u606F"},
- {"Method successfully invoked", "\u5DF2\u6210\u529F\u8C03\u7528\u65B9\u6CD5"},
- {"Minimize All", "\u5168\u90E8\u6700\u5C0F\u5316(M)"},
- {"Minimize All.mnemonic", 'M'},
- {"Minus Version", "\u8FD9\u662F{0}\u7248\u672C {1}"},
- {"Monitor locked",
- " - \u5DF2\u9501\u5B9A{0}\n"},
- {"Motif","Motif"},
- {"Name Build and Mode","{0} (\u5DE5\u4F5C\u7248\u672C {1}, {2})"},
- {"Name and Build","{0} (\u5DE5\u4F5C\u7248\u672C {1})"},
- {"Name","\u540D\u79F0"},
- {"Name: ","\u540D\u79F0: "},
- {"Name State",
- "\u540D\u79F0: {0}\n\u72B6\u6001: {1}\n"},
- {"Name State LockName",
- "\u540D\u79F0: {0}\n\u72B6\u6001: {2}\u4E0A\u7684{1}\n"},
- {"Name State LockName LockOwner",
- "\u540D\u79F0: {0}\n\u72B6\u6001: {2}\u4E0A\u7684{1}, \u62E5\u6709\u8005: {3}\n"},
- {"New Connection...", "\u65B0\u5EFA\u8FDE\u63A5(N)..."},
- {"New Connection....mnemonic", 'N'},
- {"New value applied","\u5DF2\u5E94\u7528\u65B0\u503C"},
- {"No attribute selected","\u672A\u9009\u62E9\u5C5E\u6027"},
- {"No deadlock detected","\u672A\u68C0\u6D4B\u5230\u6B7B\u9501"},
- {"No value selected","\u672A\u9009\u62E9\u503C"},
- {"Non-Heap Memory Usage","\u975E\u5806\u5185\u5B58\u4F7F\u7528\u91CF"},
- {"Non-Heap", "\u975E\u5806"},
- {"Not Yet Implemented","\u5C1A\u672A\u5B9E\u73B0"},
- {"Not a valid event broadcaster", "\u4E0D\u662F\u6709\u6548\u7684\u4E8B\u4EF6\u5E7F\u64AD\u8005"},
- {"Notification","\u901A\u77E5"},
- {"Notification buffer","\u901A\u77E5\u7F13\u51B2\u533A"},
- {"Notifications","\u901A\u77E5"},
- {"NotifTypes", "NotifTypes"},
- {"Number of Threads","\u7EBF\u7A0B\u6570"},
- {"Number of Loaded Classes","\u5DF2\u52A0\u8F7D\u7C7B\u6570"},
- {"Number of processors","\u5904\u7406\u7A0B\u5E8F\u6570"},
- {"ObjectName","ObjectName"},
- {"Operating System","\u64CD\u4F5C\u7CFB\u7EDF"},
- {"Operation","\u64CD\u4F5C"},
- {"Operation invocation","\u64CD\u4F5C\u8C03\u7528"},
- {"Operation return value", "\u64CD\u4F5C\u8FD4\u56DE\u503C"},
- {"Operations","\u64CD\u4F5C"},
- {"Overview","\u6982\u89C8"},
- {"OverviewPanel.plotter.accessibleName", "{0}\u7684\u56FE\u8868\u3002"},
- {"Parameter", "\u53C2\u6570"},
- {"Password: ", "\u53E3\u4EE4(P): "},
- {"Password: .mnemonic", 'P'},
- {"Password.accessibleName", "\u53E3\u4EE4"},
- {"Peak","\u5CF0\u503C"},
- {"Perform GC", "\u6267\u884C GC"},
- {"Perform GC.mnemonic", 'G'},
- {"Perform GC.toolTip", "\u8BF7\u6C42\u5783\u573E\u6536\u96C6"},
- {"Plotter.accessibleName", "\u56FE\u8868"},
- {"Plotter.accessibleName.keyAndValue", "{0}={1}\n"},
- {"Plotter.accessibleName.noData", "\u672A\u7ED8\u5236\u6570\u636E\u3002"},
- {"Plotter.saveAsMenuItem", "\u5C06\u6570\u636E\u53E6\u5B58\u4E3A(A)..."},
- {"Plotter.saveAsMenuItem.mnemonic", 'A'},
- {"Plotter.timeRangeMenu", "\u65F6\u95F4\u8303\u56F4(T)"},
- {"Plotter.timeRangeMenu.mnemonic", 'T'},
- {"Problem adding listener","\u6DFB\u52A0\u76D1\u542C\u7A0B\u5E8F\u65F6\u51FA\u73B0\u95EE\u9898"},
- {"Problem displaying MBean", "\u663E\u793A MBean \u65F6\u51FA\u73B0\u95EE\u9898"},
- {"Problem invoking", "\u8C03\u7528\u65F6\u51FA\u73B0\u95EE\u9898"},
- {"Problem removing listener","\u5220\u9664\u76D1\u542C\u7A0B\u5E8F\u65F6\u51FA\u73B0\u95EE\u9898"},
- {"Problem setting attribute","\u8BBE\u7F6E\u5C5E\u6027\u65F6\u51FA\u73B0\u95EE\u9898"},
- {"Process CPU time","\u8FDB\u7A0B CPU \u65F6\u95F4"},
- {"R/W","\u8BFB\u5199"},
- {"Readable","\u53EF\u8BFB"},
- {"Received","\u6536\u5230"},
- {"Reconnect","\u91CD\u65B0\u8FDE\u63A5"},
- {"Remote Process:", "\u8FDC\u7A0B\u8FDB\u7A0B(R):"},
- {"Remote Process:.mnemonic", 'R'},
- {"Remote Process.textField.accessibleName", "\u8FDC\u7A0B\u8FDB\u7A0B"},
- {"Remove","\u5220\u9664"},
- {"Restore All", "\u5168\u90E8\u8FD8\u539F(R)"},
- {"Restore All.mnemonic", 'R'},
- {"Return value", "\u8FD4\u56DE\u503C"},
- {"ReturnType", "ReturnType"},
- {"SeqNum","SeqNum"},
- {"Size Bytes", "{0,number,integer} \u5B57\u8282"},
- {"Size Gb","{0} GB"},
- {"Size Kb","{0} KB"},
- {"Size Mb","{0} MB"},
- {"Source","\u6E90"},
- {"Stack trace",
- "\n\u5806\u6808\u8DDF\u8E2A: \n"},
- {"Success:","\u6210\u529F:"},
- // Note: SummaryTab.headerDateTimeFormat can be one the following:
- // 1. A combination of two styles for date and time, using the
- // constants from class DateFormat: SHORT, MEDIUM, LONG, FULL.
- // Example: "MEDIUM,MEDIUM" or "FULL,SHORT"
- // 2. An explicit string pattern used for creating an instance
- // of the class SimpleDateFormat.
- // Example: "yyyy-MM-dd HH:mm:ss" or "M/d/yyyy h:mm:ss a"
- {"SummaryTab.headerDateTimeFormat", "FULL,FULL"},
- {"SummaryTab.pendingFinalization.label", "\u6682\u6302\u6700\u7EC8\u5904\u7406"},
- {"SummaryTab.pendingFinalization.value", "{0}\u5BF9\u8C61"},
- {"SummaryTab.tabName", "VM \u6982\u8981"},
- {"SummaryTab.vmVersion","{0}\u7248\u672C {1}"},
- {"TabularData are not supported", "\u4E0D\u652F\u6301 TabularData"},
- {"Threads","\u7EBF\u7A0B"},
- {"ThreadTab.infoLabelFormat", "<html>\u6D3B\u52A8: {0} \u5CF0\u503C: {1} \u603B\u8BA1: {2}</html>"},
- {"ThreadTab.threadInfo.accessibleName", "\u7EBF\u7A0B\u4FE1\u606F"},
- {"ThreadTab.threadPlotter.accessibleName", "\u8868\u793A\u7EBF\u7A0B\u6570\u7684\u56FE\u8868\u3002"},
- {"Threshold","\u9608\u503C"},
- {"Tile", "\u5E73\u94FA(T)"},
- {"Tile.mnemonic", 'T'},
- {"Time Range:", "\u65F6\u95F4\u8303\u56F4(T):"},
- {"Time Range:.mnemonic", 'T'},
- {"Time", "\u65F6\u95F4"},
- {"TimeStamp","TimeStamp"},
- {"Total Loaded", "\u52A0\u8F7D\u603B\u6570"},
- {"Total classes loaded","\u5DF2\u52A0\u8F7D\u7C7B\u603B\u6570"},
- {"Total classes unloaded","\u5DF2\u5378\u8F7D\u7C7B\u603B\u6570"},
- {"Total compile time","\u603B\u7F16\u8BD1\u65F6\u95F4"},
- {"Total physical memory","\u603B\u7269\u7406\u5185\u5B58"},
- {"Total threads started","\u542F\u52A8\u7684\u7EBF\u7A0B\u603B\u6570"},
- {"Total swap space","\u603B\u4EA4\u6362\u7A7A\u95F4"},
- {"Type","\u7C7B\u578B"},
- {"Unavailable","\u4E0D\u53EF\u7528"},
- {"UNKNOWN","UNKNOWN"},
- {"Unknown Host","\u672A\u77E5\u4E3B\u673A: {0}"},
- {"Unregister", "\u6CE8\u9500"},
- {"Uptime","\u8FD0\u884C\u65F6\u95F4"},
- {"Uptime: ","\u8FD0\u884C\u65F6\u95F4: "},
- {"Usage Threshold","\u7528\u6CD5\u9608\u503C"},
- {"remoteTF.usage","<b>\u7528\u6CD5</b>: <hostname>:<port> \u6216 service:jmx:<protocol>:<sap>"},
- {"Used","\u5DF2\u7528"},
- {"Username: ", "\u7528\u6237\u540D(U): "},
- {"Username: .mnemonic", 'U'},
- {"Username.accessibleName", "\u7528\u6237\u540D"},
- {"UserData","UserData"},
- {"Virtual Machine","\u865A\u62DF\u673A"},
- {"VM arguments","VM \u53C2\u6570"},
- {"VM","VM"},
- {"VMInternalFrame.accessibleDescription", "\u7528\u4E8E\u76D1\u89C6 Java \u865A\u62DF\u673A\u7684\u5185\u90E8\u6846\u67B6"},
- {"Value","\u503C"},
- {"Vendor", "\u5382\u5546"},
- {"Verbose Output","\u8BE6\u7EC6\u8F93\u51FA"},
- {"Verbose Output.toolTip", "\u4E3A\u7C7B\u52A0\u8F7D\u7CFB\u7EDF\u542F\u7528\u8BE6\u7EC6\u8F93\u51FA"},
- {"View value", "\u89C6\u56FE\u503C"},
- {"View","\u89C6\u56FE"},
- {"Window", "\u7A97\u53E3(W)"},
- {"Window.mnemonic", 'W'},
- {"Windows","Windows"},
- {"Writable","\u53EF\u5199"},
- {"You cannot drop a class here", "\u65E0\u6CD5\u5220\u9664\u6B64\u5904\u7684\u7C7B"},
- {"collapse", "\u9690\u85CF"},
- {"connectionFailed1","\u8FDE\u63A5\u5931\u8D25: \u662F\u5426\u91CD\u8BD5?"},
- {"connectionFailed2","\u672A\u6210\u529F\u8FDE\u63A5\u5230{0}\u3002<br>\u662F\u5426\u8981\u91CD\u8BD5?"},
- {"connectionLost1","\u8FDE\u63A5\u4E22\u5931: \u662F\u5426\u91CD\u65B0\u8FDE\u63A5?"},
- {"connectionLost2","\u7531\u4E8E\u8FDC\u7A0B\u8FDB\u7A0B\u5DF2\u7EC8\u6B62, \u4E0E{0}\u7684\u8FDE\u63A5\u4E22\u5931\u3002<br>\u662F\u5426\u8981\u91CD\u65B0\u8FDE\u63A5?"},
- {"connectingTo1","\u6B63\u5728\u8FDE\u63A5\u5230{0}"},
- {"connectingTo2","\u60A8\u5F53\u524D\u6B63\u5728\u8FDE\u63A5\u5230{0}\u3002<br>\u8FD9\u5C06\u9700\u8981\u51E0\u5206\u949F\u7684\u65F6\u95F4\u3002"},
- {"deadlockAllTab","\u5168\u90E8"},
- {"deadlockTab","\u6B7B\u9501"},
- {"deadlockTabN","\u6B7B\u9501{0}"},
- {"expand", "\u5C55\u5F00"},
- {"kbytes","{0} KB"},
- {"operation","\u64CD\u4F5C"},
- {"plot", "\u7ED8\u56FE"},
- {"visualize","\u53EF\u89C6\u5316"},
- {"zz usage text",
- "\u7528\u6CD5: {0} [ -interval=n ] [ -notile ] [ -pluginpath <path> ] [ -version ] [ connection ... ]\n\n -interval \u5C06\u66F4\u65B0\u95F4\u9694\u8BBE\u7F6E\u4E3A n \u79D2 (\u9ED8\u8BA4\u503C\u4E3A 4 \u79D2)\n -notile \u521D\u59CB\u4E0D\u5E73\u94FA\u7A97\u53E3 (\u5BF9\u4E8E\u4E24\u4E2A\u6216\u591A\u4E2A\u8FDE\u63A5)\n -pluginpath \u6307\u5B9A jconsole \u7528\u4E8E\u67E5\u627E\u63D2\u4EF6\u7684\u8DEF\u5F84\n -version \u8F93\u51FA\u7A0B\u5E8F\u7248\u672C\n\n connection = pid || host:port || JMX URL (service:jmx:<\u534F\u8BAE>://...)\n pid \u76EE\u6807\u8FDB\u7A0B\u7684\u8FDB\u7A0B ID\n host \u8FDC\u7A0B\u4E3B\u673A\u540D\u6216 IP \u5730\u5740\n port \u8FDC\u7A0B\u8FDE\u63A5\u7684\u7AEF\u53E3\u53F7\n\n -J \u6307\u5B9A\u8FD0\u884C jconsole \u7684 Java \u865A\u62DF\u673A\n \u7684\u8F93\u5165\u53C2\u6570"},
- // END OF MATERIAL TO LOCALIZE
- };
-
- String ls = System.getProperty("line.separator");
- for(int i=0;i<temp.length;i++) {
- if (temp[i][1] instanceof String){
- temp[i][1] = temp[i][1].toString().replaceAll("\n",ls);
- }
- }
-
- return temp;
-
- }
-
- public synchronized Object[][] getContents() {
- return getContents0();
- }
-}
diff --git a/src/share/classes/sun/tools/jconsole/resources/messages.properties b/src/share/classes/sun/tools/jconsole/resources/messages.properties
new file mode 100644
index 0000000..b89146e
--- /dev/null
+++ b/src/share/classes/sun/tools/jconsole/resources/messages.properties
@@ -0,0 +1,273 @@
+ONE_DAY=\ 1 day
+ONE_HOUR=\ 1 hour
+ONE_MIN=\ 1 min
+ONE_MONTH=\ 1 month
+ONE_YEAR=\ 1 year
+TWO_HOURS=\ 2 hours
+THREE_HOURS=\ 3 hours
+THREE_MONTHS=\ 3 months
+FIVE_MIN=\ 5 min
+SIX_HOURS=\ 6 hours
+SIX_MONTHS=\ 6 months
+SEVEN_DAYS=\ 7 days
+TEN_MIN=10 min
+TWELVE_HOURS=12 hours
+THIRTY_MIN=30 min
+LESS_THAN=<
+A_LOT_LESS_THAN=<<
+GREATER_THAN=>
+ACTION_CAPITALIZED=ACTION
+ACTION_INFO_CAPITALIZED=ACTION_INFO
+ALL=All
+ARCHITECTURE=Architecture
+ATTRIBUTE=Attribute
+ATTRIBUTE_VALUE=Attribute value
+ATTRIBUTE_VALUES=Attribute values
+ATTRIBUTES=Attributes
+BLANK=Blank
+BLOCKED_COUNT_WAITED_COUNT=Total blocked: {0} Total waited: {1}\n
+BOOT_CLASS_PATH=Boot class path
+BORDERED_COMPONENT_MORE_OR_LESS_BUTTON_TOOLTIP=Toggle to show more or less information
+CPU_USAGE=CPU Usage
+CPU_USAGE_FORMAT=CPU Usage: {0}%
+CANCEL=Cancel
+CASCADE=&Cascade
+CHART_COLON=&Chart:
+CLASS_PATH=Class path
+CLASS_NAME=ClassName
+CLASS_TAB_INFO_LABEL_FORMAT=<html>Loaded: {0} Unloaded: {1} Total: {2}</html>
+CLASS_TAB_LOADED_CLASSES_PLOTTER_ACCESSIBLE_NAME=Chart for Loaded Classes.
+CLASSES=Classes
+CLOSE=Close
+COLUMN_NAME=Name
+COLUMN_PID=PID
+COMMITTED_MEMORY=Committed memory
+COMMITTED_VIRTUAL_MEMORY=Committed virtual memory
+COMMITTED=Committed
+CONNECT=&Connect
+CONNECT_DIALOG_CONNECT_BUTTON_TOOLTIP=Connect to Java Virtual Machine
+CONNECT_DIALOG_ACCESSIBLE_DESCRIPTION=Dialog for making a new connection to a local or remote Java Virtual Machine
+CONNECT_DIALOG_MASTHEAD_ACCESSIBLE_NAME=Masthead Graphic
+CONNECT_DIALOG_MASTHEAD_TITLE=New Connection
+CONNECT_DIALOG_STATUS_BAR_ACCESSIBLE_NAME=Status Bar
+CONNECT_DIALOG_TITLE=JConsole: New Connection
+CONNECTED_PUNCTUATION_CLICK_TO_DISCONNECT_=Connected. Click to disconnect.
+CONNECTION_FAILED=Connection failed
+CONNECTION=&Connection
+CONNECTION_NAME=Connection name
+CONNECTION_NAME__DISCONNECTED_={0} (disconnected)
+CONSTRUCTOR=Constructor
+CURRENT_CLASSES_LOADED=Current classes loaded
+CURRENT_HEAP_SIZE=Current heap size
+CURRENT_VALUE=Current value: {0}
+CREATE=Create
+DAEMON_THREADS=Daemon threads
+DISCONNECTED_PUNCTUATION_CLICK_TO_CONNECT_=Disconnected. Click to connect.
+DOUBLE_CLICK_TO_EXPAND_FORWARD_SLASH_COLLAPSE=Double click to expand/collapse
+DOUBLE_CLICK_TO_VISUALIZE=Double click to visualize
+DESCRIPTION=Description
+DESCRIPTOR=Descriptor
+DETAILS=Details
+DETECT_DEADLOCK=&Detect Deadlock
+DETECT_DEADLOCK_TOOLTIP=Detect deadlocked threads
+DIMENSION_IS_NOT_SUPPORTED_COLON=Dimension is not supported:
+DISCARD_CHART=Discard chart
+DURATION_DAYS_HOURS_MINUTES={0,choice,1#{0,number,integer} day |1.0<{0,number,integer} days }{1,choice,0<{1,number,integer} hours |1#{1,number,integer} hour |1<{1,number,integer} hours }{2,choice,0<{2,number,integer} minutes|1#{2,number,integer} minute|1.0<{2,number,integer} minutes}
+DURATION_HOURS_MINUTES={0,choice,1#{0,number,integer} hour |1<{0,number,integer} hours }{1,choice,0<{1,number,integer} minutes|1#{1,number,integer} minute|1.0<{1,number,integer} minutes}
+DURATION_MINUTES={0,choice,1#{0,number,integer} minute|1.0<{0,number,integer} minutes}
+DURATION_SECONDS={0} seconds
+EMPTY_ARRAY=Empty array
+ERROR=Error
+ERROR_COLON_MBEANS_ALREADY_EXIST=Error: MBeans already exist
+ERROR_COLON_MBEANS_DO_NOT_EXIST=Error: MBeans do not exist
+EVENT=Event
+EXIT=E&xit
+FAIL_TO_LOAD_PLUGIN=Warning: Fail to load plugin: {0}
+FILE_CHOOSER_FILE_EXISTS_CANCEL_OPTION=Cancel
+FILE_CHOOSER_FILE_EXISTS_MESSAGE=<html><center>File already exists:<br>{0}<br>Do you want to replace it?
+FILE_CHOOSER_FILE_EXISTS_OK_OPTION=Replace
+FILE_CHOOSER_FILE_EXISTS_TITLE=File Exists
+FILE_CHOOSER_SAVED_FILE=<html>Saved to file:<br>{0}<br>({1} bytes)
+FILE_CHOOSER_SAVE_FAILED_MESSAGE=<html><center>Save to file failed:<br>{0}<br>{1}
+FILE_CHOOSER_SAVE_FAILED_TITLE=Save Failed
+FREE_PHYSICAL_MEMORY=Free physical memory
+FREE_SWAP_SPACE=Free swap space
+GARBAGE_COLLECTOR=Garbage collector
+GC_INFO=Name = ''{0}'', Collections = {1,choice,-1#Unavailable|0#{1,number,integer}}, Total time spent = {2}
+GC_TIME=GC time
+GC_TIME_DETAILS={0} on {1} ({2} collections)
+HEAP_MEMORY_USAGE=Heap Memory Usage
+HEAP=Heap
+HELP_ABOUT_DIALOG_ACCESSIBLE_DESCRIPTION=Dialog containing information about JConsole and JDK versions
+HELP_ABOUT_DIALOG_JCONSOLE_VERSION=JConsole version:<br>{0}
+HELP_ABOUT_DIALOG_JAVA_VERSION=Java VM version:<br>{0}
+HELP_ABOUT_DIALOG_MASTHEAD_ACCESSIBLE_NAME=Masthead Graphic
+HELP_ABOUT_DIALOG_MASTHEAD_TITLE=About JConsole
+HELP_ABOUT_DIALOG_TITLE=JConsole: About
+HELP_ABOUT_DIALOG_USER_GUIDE_LINK=JConsole &User Guide:<br>{0}
+HELP_ABOUT_DIALOG_USER_GUIDE_LINK_URL=http://java.sun.com/javase/6/docs/technotes/guides/management/jconsole.html
+HELP_MENU_ABOUT_TITLE=&About JConsole
+HELP_MENU_USER_GUIDE_TITLE=Online &User Guide
+HELP_MENU_TITLE=&Help
+HOTSPOT_MBEANS_ELLIPSIS=&Hotspot MBeans...
+HOTSPOT_MBEANS_DIALOG_ACCESSIBLE_DESCRIPTION=Dialog for managing Hotspot MBeans
+IMPACT=Impact
+INFO=Info
+INFO_CAPITALIZED=INFO
+INVALID_PLUGIN_PATH=Warning: Invalid plugin path: {0}
+INVALID_URL=Invalid URL: {0}
+IS=Is
+JAVA_MONITORING___MANAGEMENT_CONSOLE=Java Monitoring && Management Console
+JCONSOLE_COLON_=JConsole: {0}
+JCONSOLE_VERSION=JConsole version "{0}"
+JCONSOLE_ACCESSIBLE_DESCRIPTION=Java Monitoring && Management Console
+JIT_COMPILER=JIT compiler
+LIBRARY_PATH=Library path
+LIVE_THREADS=Live threads
+LOADED=Loaded
+LOCAL_PROCESS_COLON=&Local Process:
+MASTHEAD_FONT=Dialog-PLAIN-25
+MANAGEMENT_NOT_ENABLED=<b>Note</b>: The management agent is not enabled on this process.
+MANAGEMENT_WILL_BE_ENABLED=<b>Note</b>: The management agent will be enabled on this process.
+MBEAN_ATTRIBUTE_INFO=MBeanAttributeInfo
+MBEAN_INFO=MBeanInfo
+MBEAN_NOTIFICATION_INFO=MBeanNotificationInfo
+MBEAN_OPERATION_INFO=MBeanOperationInfo
+MBEANS=MBeans
+MBEANS_TAB_CLEAR_NOTIFICATIONS_BUTTON=&Clear
+MBEANS_TAB_CLEAR_NOTIFICATIONS_BUTTON_TOOLTIP=Clear notifications
+MBEANS_TAB_COMPOSITE_NAVIGATION_MULTIPLE=Composite Navigation {0}/{1}
+MBEANS_TAB_COMPOSITE_NAVIGATION_SINGLE=Composite Navigation
+MBEANS_TAB_REFRESH_ATTRIBUTES_BUTTON=&Refresh
+MBEANS_TAB_REFRESH_ATTRIBUTES_BUTTON_TOOLTIP=Refresh attributes
+MBEANS_TAB_SUBSCRIBE_NOTIFICATIONS_BUTTON=&Subscribe
+MBEANS_TAB_SUBSCRIBE_NOTIFICATIONS_BUTTON_TOOLTIP=Start listening for notifications
+MBEANS_TAB_TABULAR_NAVIGATION_MULTIPLE=Tabular Navigation {0}/{1}
+MBEANS_TAB_TABULAR_NAVIGATION_SINGLE=Tabular Navigation
+MBEANS_TAB_UNSUBSCRIBE_NOTIFICATIONS_BUTTON=&Unsubscribe
+MBEANS_TAB_UNSUBSCRIBE_NOTIFICATIONS_BUTTON_TOOLTIP=Stop listening for notifications
+MANAGE_HOTSPOT_MBEANS_IN_COLON_=Manage Hotspot MBeans in:
+MAX=Max
+MAXIMUM_HEAP_SIZE=Maximum heap size
+MEMORY=Memory
+MEMORY_POOL_LABEL=Memory Pool "{0}"
+MEMORY_TAB_HEAP_PLOTTER_ACCESSIBLE_NAME=Memory usage chart for heap.
+MEMORY_TAB_INFO_LABEL_FORMAT=<html>Used: {0} Committed: {1} Max: {2}</html>
+MEMORY_TAB_NON_HEAP_PLOTTER_ACCESSIBLE_NAME=Memory usage chart for non heap.
+MEMORY_TAB_POOL_CHART_ABOVE_THRESHOLD=which is above the threshold of {0}.\n
+MEMORY_TAB_POOL_CHART_ACCESSIBLE_NAME=Memory Pool Usage Chart.
+MEMORY_TAB_POOL_CHART_BELOW_THRESHOLD=which is below the threshold of {0}.\n
+MEMORY_TAB_POOL_PLOTTER_ACCESSIBLE_NAME=Memory usage chart for {0}.
+MESSAGE=Message
+METHOD_SUCCESSFULLY_INVOKED=Method successfully invoked
+MINIMIZE_ALL=&Minimize All
+MONITOR_LOCKED=\ \ \ - locked {0}\n
+NAME=Name
+NAME_AND_BUILD={0} (build {1})
+NAME_STATE=Name: {0}\nState: {1}\n
+NAME_STATE_LOCK_NAME=Name: {0}\nState: {1} on {2}\n
+NAME_STATE_LOCK_NAME_LOCK_OWNER=Name: {0}\nState: {1} on {2} owned by: {3}\n
+NEW_CONNECTION_ELLIPSIS=&New Connection...
+NO_DEADLOCK_DETECTED=No deadlock detected
+NON_HEAP_MEMORY_USAGE=Non-Heap Memory Usage
+NON_HEAP=Non-Heap
+NOTIFICATION=Notification
+NOTIFICATION_BUFFER=Notification buffer
+NOTIFICATIONS=Notifications
+NOTIF_TYPES=NotifTypes
+NUMBER_OF_THREADS=Number of Threads
+NUMBER_OF_LOADED_CLASSES=Number of Loaded Classes
+NUMBER_OF_PROCESSORS=Number of processors
+OBJECT_NAME=ObjectName
+OPERATING_SYSTEM=Operating System
+OPERATION=Operation
+OPERATION_INVOCATION=Operation invocation
+OPERATION_RETURN_VALUE=Operation return value
+OPERATIONS=Operations
+OVERVIEW=Overview
+OVERVIEW_PANEL_PLOTTER_ACCESSIBLE_NAME=Chart for {0}.
+PARAMETER=Parameter
+PASSWORD_ACCESSIBLE_NAME=Password
+PASSWORD_COLON_=&Password:
+PEAK=Peak
+PERFORM_GC=Perform &GC
+PERFORM_GC_TOOLTIP=Request Garbage Collection
+PLOTTER_ACCESSIBLE_NAME=Chart
+PLOTTER_ACCESSIBLE_NAME_KEY_AND_VALUE={0}={1}\n
+PLOTTER_ACCESSIBLE_NAME_NO_DATA=No data plotted.
+PLOTTER_SAVE_AS_MENU_ITEM=Save data &as...
+PLOTTER_TIME_RANGE_MENU=&Time Range
+PROBLEM_ADDING_LISTENER=Problem adding listener
+PROBLEM_DISPLAYING_MBEAN=Problem displaying MBean
+PROBLEM_INVOKING=Problem invoking
+PROBLEM_REMOVING_LISTENER=Problem removing listener
+PROBLEM_SETTING_ATTRIBUTE=Problem setting attribute
+PROCESS_CPU_TIME=Process CPU time
+READABLE=Readable
+RECONNECT=Reconnect
+REMOTE_PROCESS_COLON=&Remote Process:
+REMOTE_PROCESS_TEXT_FIELD_ACCESSIBLE_NAME=Remote Process
+RESTORE_ALL=&Restore All
+RETURN_TYPE=ReturnType
+SEQ_NUM=SeqNum
+SIZE_BYTES={0,number,integer} bytes
+SIZE_GB={0} Gb
+SIZE_KB={0} Kb
+SIZE_MB={0} Mb
+SOURCE=Source
+STACK_TRACE=\nStack trace: \n
+SUMMARY_TAB_HEADER_DATE_TIME_FORMAT=FULL,FULL
+SUMMARY_TAB_PENDING_FINALIZATION_LABEL=Pending finalization
+SUMMARY_TAB_PENDING_FINALIZATION_VALUE={0} objects
+SUMMARY_TAB_TAB_NAME=VM Summary
+SUMMARY_TAB_VM_VERSION={0} version {1}
+THREADS=Threads
+THREAD_TAB_THREAD_INFO_ACCESSIBLE_NAME=Thread Information
+THREAD_TAB_THREAD_PLOTTER_ACCESSIBLE_NAME=Chart for number of threads.
+THRESHOLD=Threshold
+TILE=&Tile
+TIME_RANGE_COLON=&Time Range:
+TIME=Time
+TIME_STAMP=TimeStamp
+TOTAL_LOADED=Total Loaded
+TOTAL_CLASSES_LOADED=Total classes loaded
+TOTAL_CLASSES_UNLOADED=Total classes unloaded
+TOTAL_COMPILE_TIME=Total compile time
+TOTAL_PHYSICAL_MEMORY=Total physical memory
+TOTAL_THREADS_STARTED=Total threads started
+TOTAL_SWAP_SPACE=Total swap space
+TYPE=Type
+UNAVAILABLE=Unavailable
+UNKNOWN_CAPITALIZED=UNKNOWN
+UNKNOWN_HOST=Unknown Host: {0}
+UNREGISTER=Unregister
+UPTIME=Uptime
+USAGE_THRESHOLD=Usage Threshold
+REMOTE_TF_USAGE=<b>Usage</b>: <hostname>:<port> OR service:jmx:<protocol>:<sap>
+USED=Used
+USERNAME_COLON_=&Username:
+USERNAME_ACCESSIBLE_NAME=User Name
+USER_DATA=UserData
+VIRTUAL_MACHINE=Virtual Machine
+VM_ARGUMENTS=VM arguments
+VMINTERNAL_FRAME_ACCESSIBLE_DESCRIPTION=Internal frame for monitoring a Java Virtual Machine
+VALUE=Value
+VENDOR=Vendor
+VERBOSE_OUTPUT=Verbose Output
+VERBOSE_OUTPUT_TOOLTIP=Enable verbose output for class loading system
+VIEW=View
+WINDOW=&Window
+WINDOWS=Windows
+WRITABLE=Writable
+CONNECTION_FAILED1=Connection Failed: Retry?
+CONNECTION_FAILED2=The connection to {0} did not succeed.<br>Would you like to try again?
+CONNECTION_LOST1=Connection Lost: Reconnect?
+CONNECTING_TO1=Connecting to {0}
+CONNECTING_TO2=You are currently being connected to {0}.<br>This will take a few moments.
+DEADLOCK_TAB=Deadlock
+DEADLOCK_TAB_N=Deadlock {0}
+EXPAND=expand
+KBYTES={0} kbytes
+PLOT=plot
+VISUALIZE=visualize
+ZZ_USAGE_TEXT=Usage: {0} [ -interval=n ] [ -notile ] [ -pluginpath <path> ] [ -version ] [ connection ... ]\n\n -interval Set the update interval to n seconds (default is 4 seconds)\n -notile Do not tile windows initially (for two or more connections)\n -pluginpath Specify the path that jconsole uses to look up the plugins\n -version Print program version\n\n connection = pid || host:port || JMX URL (service:jmx:<protocol>://...)\n pid The process id of a target process\n host A remote host name or IP address\n port The port number for the remote connection\n\n -J Specify the input arguments to the Java virtual machine\n on which jconsole is running
diff --git a/src/share/classes/sun/tools/jconsole/resources/messages_ja.properties b/src/share/classes/sun/tools/jconsole/resources/messages_ja.properties
new file mode 100644
index 0000000..195a1fe
--- /dev/null
+++ b/src/share/classes/sun/tools/jconsole/resources/messages_ja.properties
@@ -0,0 +1,273 @@
+ONE_DAY=\ 1\u65e5
+ONE_HOUR=\ 1\u6642\u9593
+ONE_MIN=\ 1\u5206
+ONE_MONTH=\ 1\u304b\u6708
+ONE_YEAR=\ 1\u5e74
+TWO_HOURS=\ 2\u6642\u9593
+THREE_HOURS=\ 3\u6642\u9593
+THREE_MONTHS=\ 3\u304b\u6708
+FIVE_MIN=\ 5\u5206
+SIX_HOURS=\ 6\u6642\u9593
+SIX_MONTHS=\ 6\u304b\u6708
+SEVEN_DAYS=\ 7\u65e5
+TEN_MIN=10\u5206
+TWELVE_HOURS=12\u6642\u9593
+THIRTY_MIN=30\u5206
+LESS_THAN=<
+A_LOT_LESS_THAN=<<
+GREATER_THAN=>
+ACTION_CAPITALIZED=ACTION
+ACTION_INFO_CAPITALIZED=ACTION_INFO
+ALL=\u3059\u3079\u3066
+ARCHITECTURE=\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3
+ATTRIBUTE=\u5c5e\u6027
+ATTRIBUTE_VALUE=\u5c5e\u6027\u5024
+ATTRIBUTE_VALUES=\u5c5e\u6027\u5024
+ATTRIBUTES=\u5c5e\u6027
+BLANK=\u30d6\u30e9\u30f3\u30af
+BLOCKED_COUNT_WAITED_COUNT=\u30d6\u30ed\u30c3\u30af\u6e08\u5408\u8a08: {0} \u5f85\u6a5f\u6e08\u5408\u8a08: {1}\n
+BOOT_CLASS_PATH=\u30d6\u30fc\u30c8\u30fb\u30af\u30e9\u30b9\u30d1\u30b9
+BORDERED_COMPONENT_MORE_OR_LESS_BUTTON_TOOLTIP=\u8868\u793a\u3059\u308b\u60c5\u5831\u91cf\u3092\u5897\u6e1b\u3059\u308b\u30c8\u30b0\u30eb
+CPU_USAGE=CPU\u4f7f\u7528\u7387
+CPU_USAGE_FORMAT=CPU\u4f7f\u7528\u7387: {0}%
+CANCEL=\u53d6\u6d88
+CASCADE=\u91cd\u306d\u3066\u8868\u793a(&C)
+CHART_COLON=\u30c1\u30e3\u30fc\u30c8(&C):
+CLASS_PATH=\u30af\u30e9\u30b9\u30d1\u30b9
+CLASS_NAME=ClassName
+CLASS_TAB_INFO_LABEL_FORMAT=<html>\u30ed\u30fc\u30c9\u6e08: {0} \u672a\u30ed\u30fc\u30c9: {1} \u5408\u8a08: {2}</html>
+CLASS_TAB_LOADED_CLASSES_PLOTTER_ACCESSIBLE_NAME=\u30ed\u30fc\u30c9\u6e08\u30af\u30e9\u30b9\u306e\u30c1\u30e3\u30fc\u30c8\u3002
+CLASSES=\u30af\u30e9\u30b9
+CLOSE=\u9589\u3058\u308b
+COLUMN_NAME=\u540d\u524d
+COLUMN_PID=PID
+COMMITTED_MEMORY=\u30b3\u30df\u30c3\u30c8\u6e08\u30e1\u30e2\u30ea\u30fc
+COMMITTED_VIRTUAL_MEMORY=\u30b3\u30df\u30c3\u30c8\u6e08\u4eee\u60f3\u30e1\u30e2\u30ea\u30fc
+COMMITTED=\u30b3\u30df\u30c3\u30c8\u6e08
+CONNECT=\u63a5\u7d9a(&C)
+CONNECT_DIALOG_CONNECT_BUTTON_TOOLTIP=Java\u4eee\u60f3\u30de\u30b7\u30f3\u306b\u63a5\u7d9a
+CONNECT_DIALOG_ACCESSIBLE_DESCRIPTION=\u30ed\u30fc\u30ab\u30eb\u307e\u305f\u306f\u30ea\u30e2\u30fc\u30c8\u306eJava\u4eee\u60f3\u30de\u30b7\u30f3\u3078\u306e\u65b0\u898f\u63a5\u7d9a\u3092\u884c\u3046\u30c0\u30a4\u30a2\u30ed\u30b0
+CONNECT_DIALOG_MASTHEAD_ACCESSIBLE_NAME=\u30de\u30b9\u30c8\u30d8\u30c3\u30c9\u56f3\u5f62
+CONNECT_DIALOG_MASTHEAD_TITLE=\u65b0\u898f\u63a5\u7d9a
+CONNECT_DIALOG_STATUS_BAR_ACCESSIBLE_NAME=\u30b9\u30c6\u30fc\u30bf\u30b9\u30fb\u30d0\u30fc
+CONNECT_DIALOG_TITLE=JConsole: \u65b0\u898f\u63a5\u7d9a
+CONNECTED_PUNCTUATION_CLICK_TO_DISCONNECT_=\u63a5\u7d9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u5207\u65ad\u3057\u307e\u3059\u3002
+CONNECTION_FAILED=\u63a5\u7d9a\u306b\u5931\u6557\u3057\u307e\u3057\u305f
+CONNECTION=\u63a5\u7d9a(&C)
+CONNECTION_NAME=\u63a5\u7d9a\u540d
+CONNECTION_NAME__DISCONNECTED_={0} (\u5207\u65ad\u6e08)
+CONSTRUCTOR=\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf
+CURRENT_CLASSES_LOADED=\u30ed\u30fc\u30c9\u6e08\u306e\u73fe\u5728\u306e\u30af\u30e9\u30b9
+CURRENT_HEAP_SIZE=\u73fe\u5728\u306e\u30d2\u30fc\u30d7\u30fb\u30b5\u30a4\u30ba
+CURRENT_VALUE=\u73fe\u5728\u5024: {0}
+CREATE=\u4f5c\u6210
+DAEMON_THREADS=\u30c7\u30fc\u30e2\u30f3\u30fb\u30b9\u30ec\u30c3\u30c9
+DISCONNECTED_PUNCTUATION_CLICK_TO_CONNECT_=\u5207\u65ad\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u63a5\u7d9a\u3057\u307e\u3059\u3002
+DOUBLE_CLICK_TO_EXPAND_FORWARD_SLASH_COLLAPSE=\u5c55\u958b\u307e\u305f\u306f\u7e2e\u5c0f\u3059\u308b\u306b\u306f\u30c0\u30d6\u30eb\u30af\u30ea\u30c3\u30af\u3057\u3066\u304f\u3060\u3055\u3044
+DOUBLE_CLICK_TO_VISUALIZE=\u8996\u899a\u5316\u3059\u308b\u306b\u306f\u30c0\u30d6\u30eb\u30af\u30ea\u30c3\u30af\u3057\u3066\u304f\u3060\u3055\u3044
+DESCRIPTION=\u8aac\u660e
+DESCRIPTOR=\u8a18\u8ff0\u5b50
+DETAILS=\u8a73\u7d30
+DETECT_DEADLOCK=\u30c7\u30c3\u30c9\u30ed\u30c3\u30af\u306e\u691c\u51fa(&D)
+DETECT_DEADLOCK_TOOLTIP=\u30c7\u30c3\u30c9\u30ed\u30c3\u30af\u6e08\u30b9\u30ec\u30c3\u30c9\u306e\u691c\u51fa
+DIMENSION_IS_NOT_SUPPORTED_COLON=\u6b21\u5143\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u305b\u3093:
+DISCARD_CHART=\u30c1\u30e3\u30fc\u30c8\u306e\u7834\u68c4
+DURATION_DAYS_HOURS_MINUTES={0,choice,1#{0,number,integer}\u65e5|1.0<{0,number,integer}\u65e5}{1,choice,0<{1,number,integer}\u6642\u9593|1#{1,number,integer}\u6642\u9593|1<{1,number,integer}\u6642\u9593}{2,choice,0<{2,number,integer}\u5206|1#{2,number,integer}\u5206|1.0<{2,number,integer}\u5206}
+DURATION_HOURS_MINUTES={0,choice,1#{0,number,integer}\u6642\u9593|1<{0,number,integer}\u6642\u9593}{1,choice,0<{1,number,integer}\u5206|1#{1,number,integer}\u5206|1.0<{1,number,integer}\u5206}
+DURATION_MINUTES={0,choice,1#{0,number,integer}\u5206|1.0<{0,number,integer}\u5206}
+DURATION_SECONDS={0}\u79d2
+EMPTY_ARRAY=\u7a7a\u306e\u914d\u5217
+ERROR=\u30a8\u30e9\u30fc
+ERROR_COLON_MBEANS_ALREADY_EXIST=\u30a8\u30e9\u30fc: MBeans\u306f\u3059\u3067\u306b\u5b58\u5728\u3057\u307e\u3059
+ERROR_COLON_MBEANS_DO_NOT_EXIST=\u30a8\u30e9\u30fc: MBeans\u306f\u5b58\u5728\u3057\u307e\u305b\u3093
+EVENT=\u30a4\u30d9\u30f3\u30c8
+EXIT=\u7d42\u4e86(&X)
+FAIL_TO_LOAD_PLUGIN=\u8b66\u544a: \u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u30ed\u30fc\u30c9\u306b\u5931\u6557\u3057\u307e\u3057\u305f: {0}
+FILE_CHOOSER_FILE_EXISTS_CANCEL_OPTION=\u53d6\u6d88
+FILE_CHOOSER_FILE_EXISTS_MESSAGE=<html><center>\u30d5\u30a1\u30a4\u30eb\u306f\u3059\u3067\u306b\u5b58\u5728\u3057\u3066\u3044\u307e\u3059:<br>{0}<br>\u7f6e\u63db\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b\u3002
+FILE_CHOOSER_FILE_EXISTS_OK_OPTION=\u7f6e\u63db
+FILE_CHOOSER_FILE_EXISTS_TITLE=\u30d5\u30a1\u30a4\u30eb\u304c\u5b58\u5728\u3057\u3066\u3044\u307e\u3059
+FILE_CHOOSER_SAVED_FILE=<html>\u30d5\u30a1\u30a4\u30eb\u306b\u4fdd\u5b58\u3057\u307e\u3057\u305f:<br>{0}<br>({1}\u30d0\u30a4\u30c8)
+FILE_CHOOSER_SAVE_FAILED_MESSAGE=<html><center>\u30d5\u30a1\u30a4\u30eb\u3078\u306e\u4fdd\u5b58\u306b\u5931\u6557\u3057\u307e\u3057\u305f:<br>{0}<br>{1}
+FILE_CHOOSER_SAVE_FAILED_TITLE=\u4fdd\u5b58\u306b\u5931\u6557\u3057\u307e\u3057\u305f
+FREE_PHYSICAL_MEMORY=\u7a7a\u304d\u7269\u7406\u30e1\u30e2\u30ea\u30fc
+FREE_SWAP_SPACE=\u7a7a\u304d\u30b9\u30ef\u30c3\u30d7\u30fb\u30b9\u30da\u30fc\u30b9
+GARBAGE_COLLECTOR=\u30ac\u30d9\u30fc\u30b8\u30fb\u30b3\u30ec\u30af\u30bf
+GC_INFO=\u540d\u524d= ''{0}''\u3001\u30b3\u30ec\u30af\u30b7\u30e7\u30f3= {1,choice,-1#\u3042\u308a\u307e\u305b\u3093|0#{1,number,integer}\u500b}\u3001\u5408\u8a08\u6d88\u8cbb\u6642\u9593= {2}
+GC_TIME=GC\u6642\u9593
+GC_TIME_DETAILS={1}\u3067{0} ({2}\u500b\u306e\u30b3\u30ec\u30af\u30b7\u30e7\u30f3)
+HEAP_MEMORY_USAGE=\u30d2\u30fc\u30d7\u30fb\u30e1\u30e2\u30ea\u30fc\u4f7f\u7528\u7387
+HEAP=\u30d2\u30fc\u30d7
+HELP_ABOUT_DIALOG_ACCESSIBLE_DESCRIPTION=JConsole\u3068JDK\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u3064\u3044\u3066\u306e\u60c5\u5831\u3092\u542b\u3080\u30c0\u30a4\u30a2\u30ed\u30b0
+HELP_ABOUT_DIALOG_JCONSOLE_VERSION=JConsole\u30d0\u30fc\u30b8\u30e7\u30f3:<br>{0}
+HELP_ABOUT_DIALOG_JAVA_VERSION=Java VM\u30d0\u30fc\u30b8\u30e7\u30f3:<br>{0}
+HELP_ABOUT_DIALOG_MASTHEAD_ACCESSIBLE_NAME=\u30de\u30b9\u30c8\u30d8\u30c3\u30c9\u56f3\u5f62
+HELP_ABOUT_DIALOG_MASTHEAD_TITLE=JConsole\u306b\u3064\u3044\u3066
+HELP_ABOUT_DIALOG_TITLE=JConsole: \u8a73\u7d30
+HELP_ABOUT_DIALOG_USER_GUIDE_LINK=JConsole\u30e6\u30fc\u30b6\u30fc\u30fb\u30ac\u30a4\u30c9(&U):<br>{0}
+HELP_ABOUT_DIALOG_USER_GUIDE_LINK_URL=http://java.sun.com/javase/6/docs/technotes/guides/management/jconsole.html
+HELP_MENU_ABOUT_TITLE=JConsole\u306b\u3064\u3044\u3066(&A)
+HELP_MENU_USER_GUIDE_TITLE=\u30aa\u30f3\u30e9\u30a4\u30f3\u30fb\u30e6\u30fc\u30b6\u30fc\u30fb\u30ac\u30a4\u30c9(&U)
+HELP_MENU_TITLE=\u30d8\u30eb\u30d7(&H)
+HOTSPOT_MBEANS_ELLIPSIS=Hotspot MBeans(&H)...
+HOTSPOT_MBEANS_DIALOG_ACCESSIBLE_DESCRIPTION=Hotspot MBeans\u306e\u7ba1\u7406\u7528\u30c0\u30a4\u30a2\u30ed\u30b0
+IMPACT=\u5f71\u97ff
+INFO=\u60c5\u5831
+INFO_CAPITALIZED=\u60c5\u5831
+INVALID_PLUGIN_PATH=\u8b66\u544a: \u7121\u52b9\u306a\u30d7\u30e9\u30b0\u30a4\u30f3\u30fb\u30d1\u30b9: {0}
+INVALID_URL=\u7121\u52b9\u306aURL: {0}
+IS=\u6b21\u306b\u4e00\u81f4\u3059\u308b
+JAVA_MONITORING___MANAGEMENT_CONSOLE=Java Monitoring && Management Console
+JCONSOLE_COLON_=JConsole: {0}
+JCONSOLE_VERSION=JConsole\u30d0\u30fc\u30b8\u30e7\u30f3"{0}"
+JCONSOLE_ACCESSIBLE_DESCRIPTION=Java Monitoring && Management Console
+JIT_COMPILER=JIT\u30b3\u30f3\u30d1\u30a4\u30e9
+LIBRARY_PATH=\u30e9\u30a4\u30d6\u30e9\u30ea\u30fb\u30d1\u30b9
+LIVE_THREADS=\u5b9f\u884c\u4e2d\u306e\u30b9\u30ec\u30c3\u30c9
+LOADED=\u30ed\u30fc\u30c9\u6e08
+LOCAL_PROCESS_COLON=\u30ed\u30fc\u30ab\u30eb\u30fb\u30d7\u30ed\u30bb\u30b9(&L):
+MASTHEAD_FONT=Dialog-PLAIN-25
+MANAGEMENT_NOT_ENABLED=<b>\u6ce8\u610f</b>: \u7ba1\u7406\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u306f\u3053\u306e\u30d7\u30ed\u30bb\u30b9\u3067\u306f\u6709\u52b9\u5316\u3055\u308c\u307e\u305b\u3093\u3002
+MANAGEMENT_WILL_BE_ENABLED=<b>\u6ce8\u610f</b>: \u7ba1\u7406\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u306f\u3053\u306e\u30d7\u30ed\u30bb\u30b9\u3067\u6709\u52b9\u5316\u3055\u308c\u307e\u3059\u3002
+MBEAN_ATTRIBUTE_INFO=MBeanAttributeInfo
+MBEAN_INFO=MBeanInfo
+MBEAN_NOTIFICATION_INFO=MBeanNotificationInfo
+MBEAN_OPERATION_INFO=MBeanOperationInfo
+MBEANS=MBeans
+MBEANS_TAB_CLEAR_NOTIFICATIONS_BUTTON=\u30af\u30ea\u30a2(&C)
+MBEANS_TAB_CLEAR_NOTIFICATIONS_BUTTON_TOOLTIP=\u901a\u77e5\u306e\u30af\u30ea\u30a2
+MBEANS_TAB_COMPOSITE_NAVIGATION_MULTIPLE=\u30b3\u30f3\u30dd\u30b8\u30c3\u30c8\u30fb\u30ca\u30d3\u30b2\u30fc\u30b7\u30e7\u30f3{0}/{1}
+MBEANS_TAB_COMPOSITE_NAVIGATION_SINGLE=\u30b3\u30f3\u30dd\u30b8\u30c3\u30c8\u30fb\u30ca\u30d3\u30b2\u30fc\u30b7\u30e7\u30f3
+MBEANS_TAB_REFRESH_ATTRIBUTES_BUTTON=\u30ea\u30d5\u30ec\u30c3\u30b7\u30e5(&R)
+MBEANS_TAB_REFRESH_ATTRIBUTES_BUTTON_TOOLTIP=\u5c5e\u6027\u306e\u30ea\u30d5\u30ec\u30c3\u30b7\u30e5
+MBEANS_TAB_SUBSCRIBE_NOTIFICATIONS_BUTTON=\u30b5\u30d6\u30b9\u30af\u30e9\u30a4\u30d6(&S)
+MBEANS_TAB_SUBSCRIBE_NOTIFICATIONS_BUTTON_TOOLTIP=\u901a\u77e5\u30ea\u30b9\u30cb\u30f3\u30b0\u306e\u958b\u59cb
+MBEANS_TAB_TABULAR_NAVIGATION_MULTIPLE=\u30bf\u30d6\u30fb\u30ca\u30d3\u30b2\u30fc\u30b7\u30e7\u30f3{0}/{1}
+MBEANS_TAB_TABULAR_NAVIGATION_SINGLE=\u30bf\u30d6\u30fb\u30ca\u30d3\u30b2\u30fc\u30b7\u30e7\u30f3
+MBEANS_TAB_UNSUBSCRIBE_NOTIFICATIONS_BUTTON=\u30b5\u30d6\u30b9\u30af\u30e9\u30a4\u30d6\u89e3\u9664(&U)
+MBEANS_TAB_UNSUBSCRIBE_NOTIFICATIONS_BUTTON_TOOLTIP=\u901a\u77e5\u30ea\u30b9\u30cb\u30f3\u30b0\u306e\u505c\u6b62
+MANAGE_HOTSPOT_MBEANS_IN_COLON_=Hotspot MBeans\u306e\u7ba1\u7406:
+MAX=\u6700\u5927
+MAXIMUM_HEAP_SIZE=\u6700\u5927\u30d2\u30fc\u30d7\u30fb\u30b5\u30a4\u30ba
+MEMORY=\u30e1\u30e2\u30ea\u30fc
+MEMORY_POOL_LABEL=\u30e1\u30e2\u30ea\u30fc\u30fb\u30d7\u30fc\u30eb"{0}"
+MEMORY_TAB_HEAP_PLOTTER_ACCESSIBLE_NAME=\u30d2\u30fc\u30d7\u7528\u306e\u30e1\u30e2\u30ea\u30fc\u4f7f\u7528\u7387\u30c1\u30e3\u30fc\u30c8\u3002
+MEMORY_TAB_INFO_LABEL_FORMAT=<html>\u4f7f\u7528\u6e08: {0} \u30b3\u30df\u30c3\u30c8\u6e08: {1} \u6700\u5927: {2}</html>
+MEMORY_TAB_NON_HEAP_PLOTTER_ACCESSIBLE_NAME=\u975e\u30d2\u30fc\u30d7\u7528\u306e\u30e1\u30e2\u30ea\u30fc\u4f7f\u7528\u7387\u30c1\u30e3\u30fc\u30c8\u3002
+MEMORY_TAB_POOL_CHART_ABOVE_THRESHOLD={0}\u306e\u3057\u304d\u3044\u5024\u3088\u308a\u4e0a\u3067\u3059\u3002\n
+MEMORY_TAB_POOL_CHART_ACCESSIBLE_NAME=\u30e1\u30e2\u30ea\u30fc\u30fb\u30d7\u30fc\u30eb\u4f7f\u7528\u7387\u30c1\u30e3\u30fc\u30c8\u3002
+MEMORY_TAB_POOL_CHART_BELOW_THRESHOLD={0}\u306e\u3057\u304d\u3044\u5024\u3088\u308a\u4e0b\u3067\u3059\u3002\n
+MEMORY_TAB_POOL_PLOTTER_ACCESSIBLE_NAME={0}\u306e\u30e1\u30e2\u30ea\u30fc\u4f7f\u7528\u7387\u30c1\u30e3\u30fc\u30c8\u3002
+MESSAGE=\u30e1\u30c3\u30bb\u30fc\u30b8
+METHOD_SUCCESSFULLY_INVOKED=\u30e1\u30bd\u30c3\u30c9\u304c\u6b63\u5e38\u306b\u8d77\u52d5\u3055\u308c\u307e\u3057\u305f
+MINIMIZE_ALL=\u3059\u3079\u3066\u6700\u5c0f\u5316(&M)
+MONITOR_LOCKED=\ \ \ - \u30ed\u30c3\u30af\u6e08{0}\n
+NAME=\u540d\u524d
+NAME_AND_BUILD={0} (\u30d3\u30eb\u30c9{1})
+NAME_STATE=\u540d\u524d: {0}\n\u72b6\u614b: {1}\n
+NAME_STATE_LOCK_NAME=\u540d\u524d: {0}\n\u72b6\u614b: {2}\u306e{1}\n
+NAME_STATE_LOCK_NAME_LOCK_OWNER=\u540d\u524d: {0}\n\u72b6\u614b: {2}\u306e{1}\u3001\u6240\u6709\u8005: {3}\n
+NEW_CONNECTION_ELLIPSIS=\u65b0\u898f\u63a5\u7d9a(&N)...
+NO_DEADLOCK_DETECTED=\u30c7\u30c3\u30c9\u30ed\u30c3\u30af\u304c\u691c\u51fa\u3055\u308c\u307e\u305b\u3093\u3067\u3057\u305f
+NON_HEAP_MEMORY_USAGE=\u975e\u30d2\u30fc\u30d7\u30fb\u30e1\u30e2\u30ea\u30fc\u4f7f\u7528\u7387
+NON_HEAP=\u975e\u30d2\u30fc\u30d7
+NOTIFICATION=\u901a\u77e5
+NOTIFICATION_BUFFER=\u901a\u77e5\u30d0\u30c3\u30d5\u30a1
+NOTIFICATIONS=\u901a\u77e5
+NOTIF_TYPES=NotifTypes
+NUMBER_OF_THREADS=\u30b9\u30ec\u30c3\u30c9\u6570
+NUMBER_OF_LOADED_CLASSES=\u30ed\u30fc\u30c9\u6e08\u30af\u30e9\u30b9\u6570
+NUMBER_OF_PROCESSORS=\u30d7\u30ed\u30bb\u30c3\u30b5\u6570
+OBJECT_NAME=ObjectName
+OPERATING_SYSTEM=\u30aa\u30da\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0\u30fb\u30b7\u30b9\u30c6\u30e0
+OPERATION=\u64cd\u4f5c
+OPERATION_INVOCATION=\u64cd\u4f5c\u306e\u547c\u51fa\u3057
+OPERATION_RETURN_VALUE=\u64cd\u4f5c\u306e\u623b\u308a\u5024
+OPERATIONS=\u64cd\u4f5c
+OVERVIEW=\u6982\u8981
+OVERVIEW_PANEL_PLOTTER_ACCESSIBLE_NAME={0}\u306e\u30c1\u30e3\u30fc\u30c8\u3002
+PARAMETER=\u30d1\u30e9\u30e1\u30fc\u30bf
+PASSWORD_ACCESSIBLE_NAME=\u30d1\u30b9\u30ef\u30fc\u30c9
+PASSWORD_COLON_=\u30d1\u30b9\u30ef\u30fc\u30c9(P):
+PEAK=\u30d4\u30fc\u30af
+PERFORM_GC=GC\u306e\u5b9f\u884c(G)
+PERFORM_GC_TOOLTIP=\u30ac\u30d9\u30fc\u30b8\u30fb\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u306e\u30ea\u30af\u30a8\u30b9\u30c8
+PLOTTER_ACCESSIBLE_NAME=\u30c1\u30e3\u30fc\u30c8
+PLOTTER_ACCESSIBLE_NAME_KEY_AND_VALUE={0}={1}\n
+PLOTTER_ACCESSIBLE_NAME_NO_DATA=\u30c7\u30fc\u30bf\u304c\u30d7\u30ed\u30c3\u30c8\u3055\u308c\u307e\u305b\u3093\u3002
+PLOTTER_SAVE_AS_MENU_ITEM=\u540d\u524d\u3092\u4ed8\u3051\u3066\u30c7\u30fc\u30bf\u3092\u4fdd\u5b58(&A)...
+PLOTTER_TIME_RANGE_MENU=\u6642\u9593\u7bc4\u56f2(&T)
+PROBLEM_ADDING_LISTENER=\u30ea\u30b9\u30ca\u30fc\u8ffd\u52a0\u4e2d\u306e\u554f\u984c
+PROBLEM_DISPLAYING_MBEAN=MBean\u8868\u793a\u4e2d\u306e\u554f\u984c
+PROBLEM_INVOKING=\u547c\u51fa\u3057\u4e2d\u306e\u554f\u984c
+PROBLEM_REMOVING_LISTENER=\u30ea\u30b9\u30ca\u30fc\u524a\u9664\u4e2d\u306e\u554f\u984c
+PROBLEM_SETTING_ATTRIBUTE=\u5c5e\u6027\u8a2d\u5b9a\u4e2d\u306e\u554f\u984c
+PROCESS_CPU_TIME=\u30d7\u30ed\u30bb\u30b9CPU\u6642\u9593
+READABLE=\u8aad\u53d6\u308a\u53ef\u80fd
+RECONNECT=\u518d\u63a5\u7d9a
+REMOTE_PROCESS_COLON=\u30ea\u30e2\u30fc\u30c8\u30fb\u30d7\u30ed\u30bb\u30b9(&R):
+REMOTE_PROCESS_TEXT_FIELD_ACCESSIBLE_NAME=\u30ea\u30e2\u30fc\u30c8\u30fb\u30d7\u30ed\u30bb\u30b9
+RESTORE_ALL=\u3059\u3079\u3066\u5fa9\u5143(&R)
+RETURN_TYPE=ReturnType
+SEQ_NUM=SeqNum
+SIZE_BYTES={0,number,integer}\u30d0\u30a4\u30c8
+SIZE_GB={0} Gb
+SIZE_KB={0} Kb
+SIZE_MB={0} Mb
+SOURCE=\u30bd\u30fc\u30b9
+STACK_TRACE=\n\u30b9\u30bf\u30c3\u30af\u30fb\u30c8\u30ec\u30fc\u30b9: \n
+SUMMARY_TAB_HEADER_DATE_TIME_FORMAT=FULL,FULL
+SUMMARY_TAB_PENDING_FINALIZATION_LABEL=\u30d5\u30a1\u30a4\u30ca\u30e9\u30a4\u30ba\u306e\u30da\u30f3\u30c7\u30a3\u30f3\u30b0
+SUMMARY_TAB_PENDING_FINALIZATION_VALUE={0}\u500b\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8
+SUMMARY_TAB_TAB_NAME=VM\u30b5\u30de\u30ea\u30fc
+SUMMARY_TAB_VM_VERSION={0}\u30d0\u30fc\u30b8\u30e7\u30f3{1}
+THREADS=\u30b9\u30ec\u30c3\u30c9
+THREAD_TAB_THREAD_INFO_ACCESSIBLE_NAME=\u30b9\u30ec\u30c3\u30c9\u60c5\u5831
+THREAD_TAB_THREAD_PLOTTER_ACCESSIBLE_NAME=\u30b9\u30ec\u30c3\u30c9\u6570\u306e\u30c1\u30e3\u30fc\u30c8\u3002
+THRESHOLD=\u3057\u304d\u3044\u5024
+TILE=\u4e26\u3079\u3066\u8868\u793a(&T)
+TIME_RANGE_COLON=\u6642\u9593\u7bc4\u56f2(&T):
+TIME=\u6642\u9593
+TIME_STAMP=TimeStamp
+TOTAL_LOADED=\u30ed\u30fc\u30c9\u6e08\u5408\u8a08
+TOTAL_CLASSES_LOADED=\u30ed\u30fc\u30c9\u6e08\u30af\u30e9\u30b9\u5408\u8a08
+TOTAL_CLASSES_UNLOADED=\u30a2\u30f3\u30ed\u30fc\u30c9\u6e08\u30af\u30e9\u30b9\u5408\u8a08
+TOTAL_COMPILE_TIME=\u5408\u8a08\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u9593
+TOTAL_PHYSICAL_MEMORY=\u5408\u8a08\u7269\u7406\u30e1\u30e2\u30ea\u30fc
+TOTAL_THREADS_STARTED=\u958b\u59cb\u6e08\u5408\u8a08\u30b9\u30ec\u30c3\u30c9
+TOTAL_SWAP_SPACE=\u5408\u8a08\u30b9\u30ef\u30c3\u30d7\u30fb\u30b9\u30da\u30fc\u30b9
+TYPE=\u578b
+UNAVAILABLE=\u5229\u7528\u4e0d\u53ef
+UNKNOWN_CAPITALIZED=UNKNOWN
+UNKNOWN_HOST=\u4e0d\u660e\u306a\u30db\u30b9\u30c8: {0}
+UNREGISTER=\u767b\u9332\u89e3\u9664
+UPTIME=\u7a3c\u50cd\u6642\u9593
+USAGE_THRESHOLD=\u4f7f\u7528\u3057\u304d\u3044\u5024
+REMOTE_TF_USAGE=<b>\u4f7f\u7528\u65b9\u6cd5</b>: <hostname>:<port>\u307e\u305f\u306fservice:jmx:<protocol>:<sap>
+USED=\u4f7f\u7528\u6e08
+USERNAME_COLON_=\u30e6\u30fc\u30b6\u30fc\u540d(&U):
+USERNAME_ACCESSIBLE_NAME=\u30e6\u30fc\u30b6\u30fc\u540d
+USER_DATA=UserData
+VIRTUAL_MACHINE=\u4eee\u60f3\u30de\u30b7\u30f3
+VM_ARGUMENTS=VM\u5f15\u6570
+VMINTERNAL_FRAME_ACCESSIBLE_DESCRIPTION=Java\u4eee\u60f3\u30de\u30b7\u30f3\u306e\u30e2\u30cb\u30bf\u30fc\u7528\u306e\u5185\u90e8\u30d5\u30ec\u30fc\u30e0
+VALUE=\u5024
+VENDOR=\u30d9\u30f3\u30c0\u30fc
+VERBOSE_OUTPUT=\u8a73\u7d30\u51fa\u529b
+VERBOSE_OUTPUT_TOOLTIP=\u30af\u30e9\u30b9\u8aad\u8fbc\u307f\u30b7\u30b9\u30c6\u30e0\u3067\u8a73\u7d30\u51fa\u529b\u3092\u6709\u52b9\u306b\u3059\u308b
+VIEW=\u8868\u793a
+WINDOW=\u30a6\u30a3\u30f3\u30c9\u30a6(&W)
+WINDOWS=\u30a6\u30a3\u30f3\u30c9\u30a6
+WRITABLE=\u66f8\u8fbc\u307f\u53ef\u80fd
+CONNECTION_FAILED1=\u63a5\u7d9a\u306b\u5931\u6557\u3057\u307e\u3057\u305f: \u518d\u8a66\u884c\u3057\u307e\u3059\u304b\u3002
+CONNECTION_FAILED2={0}\u3078\u306e\u63a5\u7d9a\u304c\u6210\u529f\u3057\u307e\u305b\u3093\u3067\u3057\u305f\u3002<br>\u3082\u3046\u4e00\u5ea6\u8a66\u3057\u307e\u3059\u304b\u3002
+CONNECTION_LOST1=\u63a5\u7d9a\u304c\u5931\u308f\u308c\u307e\u3057\u305f: \u518d\u63a5\u7d9a\u3057\u307e\u3059\u304b\u3002
+CONNECTING_TO1={0}\u306b\u63a5\u7d9a\u4e2d
+CONNECTING_TO2={0}\u306b\u73fe\u5728\u63a5\u7d9a\u4e2d\u3067\u3059\u3002<br>\u3053\u308c\u306b\u306f\u6570\u5206\u304b\u304b\u308a\u307e\u3059\u3002
+DEADLOCK_TAB=\u30c7\u30c3\u30c9\u30ed\u30c3\u30af
+DEADLOCK_TAB_N=\u30c7\u30c3\u30c9\u30ed\u30c3\u30af{0}
+EXPAND=\u5c55\u958b
+KBYTES={0} KB
+PLOT=\u30d7\u30ed\u30c3\u30c8
+VISUALIZE=\u8996\u899a\u5316
+ZZ_USAGE_TEXT=\u4f7f\u7528\u65b9\u6cd5: {0} [ -interval=n ] [ -notile ] [ -pluginpath <path> ] [ -version ] [ connection ... ]\n\n -interval \u66f4\u65b0\u9593\u9694\u3092n\u79d2\u306b\u8a2d\u5b9a\u3059\u308b(\u30c7\u30d5\u30a9\u30eb\u30c8\u306f4\u79d2)\n -notile \u30a6\u30a3\u30f3\u30c9\u30a6\u3092\u6700\u521d\u306b\u4e26\u3079\u3066\u8868\u793a\u3057\u306a\u3044(2\u3064\u4ee5\u4e0a\u306e\u63a5\u7d9a\u306b\u3064\u3044\u3066)\n -pluginpath JConsole\u304c\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u53c2\u7167\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3059\u308b\u30d1\u30b9\u3092\u6307\u5b9a\u3059\u308b\n -version \u30d7\u30ed\u30b0\u30e9\u30e0\u30fb\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u5370\u5237\u3059\u308b\n\n connection = pid || host:port || JMX URL (service:jmx:<protocol>://...)\n pid \u30bf\u30fc\u30b2\u30c3\u30c8\u30fb\u30d7\u30ed\u30bb\u30b9\u306e\u30d7\u30ed\u30bb\u30b9ID\n host \u30ea\u30e2\u30fc\u30c8\u30fb\u30db\u30b9\u30c8\u540d\u307e\u305f\u306fIP\u30a2\u30c9\u30ec\u30b9\n port \u30ea\u30e2\u30fc\u30c8\u63a5\u7d9a\u7528\u306e\u30dd\u30fc\u30c8\u756a\u53f7\n\n -J JConsole\u304c\u5b9f\u884c\u4e2d\u306eJava\u4eee\u60f3\u30de\u30b7\u30f3\u3078\u306e\n \u5165\u529b\u5f15\u6570\u3092\u6307\u5b9a\u3059\u308b
diff --git a/src/share/classes/sun/tools/jconsole/resources/messages_zh_CN.properties b/src/share/classes/sun/tools/jconsole/resources/messages_zh_CN.properties
new file mode 100644
index 0000000..48964c7
--- /dev/null
+++ b/src/share/classes/sun/tools/jconsole/resources/messages_zh_CN.properties
@@ -0,0 +1,273 @@
+ONE_DAY=\ 1 \u5929
+ONE_HOUR=\ 1 \u5c0f\u65f6
+ONE_MIN=\ 1 \u5206\u949f
+ONE_MONTH=\ 1 \u4e2a\u6708
+ONE_YEAR=\ 1 \u5e74
+TWO_HOURS=\ 2 \u5c0f\u65f6
+THREE_HOURS=\ 3 \u5c0f\u65f6
+THREE_MONTHS=\ 3 \u4e2a\u6708
+FIVE_MIN=\ 5 \u5206\u949f
+SIX_HOURS=\ 6 \u5c0f\u65f6
+SIX_MONTHS=\ 6 \u4e2a\u6708
+SEVEN_DAYS=\ 7 \u5929
+TEN_MIN=10 \u5206\u949f
+TWELVE_HOURS=12 \u5c0f\u65f6
+THIRTY_MIN=30 \u5206\u949f
+LESS_THAN=<
+A_LOT_LESS_THAN=<<
+GREATER_THAN=>
+ACTION_CAPITALIZED=ACTION
+ACTION_INFO_CAPITALIZED=ACTION_INFO
+ALL=\u5168\u90e8
+ARCHITECTURE=\u4f53\u7cfb\u7ed3\u6784
+ATTRIBUTE=\u5c5e\u6027
+ATTRIBUTE_VALUE=\u5c5e\u6027\u503c
+ATTRIBUTE_VALUES=\u5c5e\u6027\u503c
+ATTRIBUTES=\u5c5e\u6027
+BLANK=\u7a7a\u767d
+BLOCKED_COUNT_WAITED_COUNT=\u603b\u963b\u6b62\u6570: {0}, \u603b\u7b49\u5f85\u6570: {1}\n
+BOOT_CLASS_PATH=\u5f15\u5bfc\u7c7b\u8def\u5f84
+BORDERED_COMPONENT_MORE_OR_LESS_BUTTON_TOOLTIP=\u5207\u6362\u4ee5\u663e\u793a\u66f4\u591a\u6216\u66f4\u5c11\u4fe1\u606f
+CPU_USAGE=CPU \u5360\u7528\u7387
+CPU_USAGE_FORMAT=CPU \u5360\u7528\u7387: {0}%
+CANCEL=\u53d6\u6d88
+CASCADE=\u5c42\u53e0(&C)
+CHART_COLON=\u56fe\u8868(&C):
+CLASS_PATH=\u7c7b\u8def\u5f84
+CLASS_NAME=ClassName
+CLASS_TAB_INFO_LABEL_FORMAT=<html>\u5df2\u52a0\u8f7d: {0} \u5df2\u5378\u8f7d: {1} \u603b\u8ba1: {2}</html>
+CLASS_TAB_LOADED_CLASSES_PLOTTER_ACCESSIBLE_NAME=\u5df2\u52a0\u8f7d\u7c7b\u7684\u56fe\u8868\u3002
+CLASSES=\u7c7b
+CLOSE=\u5173\u95ed
+COLUMN_NAME=\u540d\u79f0
+COLUMN_PID=PID
+COMMITTED_MEMORY=\u63d0\u4ea4\u7684\u5185\u5b58
+COMMITTED_VIRTUAL_MEMORY=\u63d0\u4ea4\u7684\u865a\u62df\u5185\u5b58
+COMMITTED=\u5df2\u63d0\u4ea4
+CONNECT=\u8fde\u63a5(&C)
+CONNECT_DIALOG_CONNECT_BUTTON_TOOLTIP=\u8fde\u63a5\u5230 Java \u865a\u62df\u673a
+CONNECT_DIALOG_ACCESSIBLE_DESCRIPTION=\u7528\u4e8e\u4e0e\u672c\u5730\u6216\u8fdc\u7a0b Java \u865a\u62df\u673a\u5efa\u7acb\u65b0\u8fde\u63a5\u7684\u5bf9\u8bdd\u6846
+CONNECT_DIALOG_MASTHEAD_ACCESSIBLE_NAME=\u62a5\u5934\u56fe
+CONNECT_DIALOG_MASTHEAD_TITLE=\u65b0\u5efa\u8fde\u63a5
+CONNECT_DIALOG_STATUS_BAR_ACCESSIBLE_NAME=\u72b6\u6001\u680f
+CONNECT_DIALOG_TITLE=JConsole: \u65b0\u5efa\u8fde\u63a5
+CONNECTED_PUNCTUATION_CLICK_TO_DISCONNECT_=\u5df2\u8fde\u63a5\u3002\u5355\u51fb\u53ef\u65ad\u5f00\u8fde\u63a5\u3002
+CONNECTION_FAILED=\u8fde\u63a5\u5931\u8d25
+CONNECTION=\u8fde\u63a5(&C)
+CONNECTION_NAME=\u8fde\u63a5\u540d\u79f0
+CONNECTION_NAME__DISCONNECTED_={0} (\u5df2\u65ad\u5f00\u8fde\u63a5)
+CONSTRUCTOR=\u6784\u9020\u5668
+CURRENT_CLASSES_LOADED=\u5df2\u52a0\u88c5\u5f53\u524d\u7c7b
+CURRENT_HEAP_SIZE=\u5f53\u524d\u5806\u5927\u5c0f
+CURRENT_VALUE=\u5f53\u524d\u503c: {0}
+CREATE=\u521b\u5efa
+DAEMON_THREADS=\u5b88\u62a4\u7a0b\u5e8f\u7ebf\u7a0b
+DISCONNECTED_PUNCTUATION_CLICK_TO_CONNECT_=\u5df2\u65ad\u5f00\u8fde\u63a5\u3002\u5355\u51fb\u53ef\u8fde\u63a5\u3002
+DOUBLE_CLICK_TO_EXPAND_FORWARD_SLASH_COLLAPSE=\u53cc\u51fb\u4ee5\u5c55\u5f00/\u9690\u85cf
+DOUBLE_CLICK_TO_VISUALIZE=\u53cc\u51fb\u4ee5\u4f7f\u5176\u53ef\u89c1
+DESCRIPTION=\u8bf4\u660e
+DESCRIPTOR=\u63cf\u8ff0\u7b26
+DETAILS=\u8be6\u7ec6\u8d44\u6599
+DETECT_DEADLOCK=\u68c0\u6d4b\u6b7b\u9501(&D)
+DETECT_DEADLOCK_TOOLTIP=\u68c0\u6d4b\u5904\u4e8e\u6b7b\u9501\u72b6\u6001\u7684\u7ebf\u7a0b
+DIMENSION_IS_NOT_SUPPORTED_COLON=\u4e0d\u652f\u6301\u7ef4:
+DISCARD_CHART=\u653e\u5f03\u56fe\u8868
+DURATION_DAYS_HOURS_MINUTES={0,choice,1#{0,number,integer} \u5929 |1.0<{0,number,integer} \u5929 }{1,choice,0<{1,number,integer} \u5c0f\u65f6 |1#{1,number,integer} \u5c0f\u65f6 |1<{1,number,integer} \u5c0f\u65f6 }{2,choice,0<{2,number,integer} \u5206\u949f|1#{2,number,integer} \u5206\u949f|1.0<{2,number,integer} \u5206\u949f}
+DURATION_HOURS_MINUTES={0,choice,1#{0,number,integer} \u5c0f\u65f6 |1<{0,number,integer} \u5c0f\u65f6 }{1,choice,0<{1,number,integer} \u5206\u949f|1#{1,number,integer} \u5206\u949f|1.0<{1,number,integer} \u5206\u949f}
+DURATION_MINUTES={0,choice,1#{0,number,integer} \u5206\u949f|1.0<{0,number,integer} \u5206\u949f}
+DURATION_SECONDS={0} \u79d2
+EMPTY_ARRAY=\u7a7a\u6570\u7ec4
+ERROR=\u9519\u8bef
+ERROR_COLON_MBEANS_ALREADY_EXIST=\u9519\u8bef: MBean \u5df2\u5b58\u5728
+ERROR_COLON_MBEANS_DO_NOT_EXIST=\u9519\u8bef: MBean \u4e0d\u5b58\u5728
+EVENT=\u4e8b\u4ef6
+EXIT=\u9000\u51fa(&X)
+FAIL_TO_LOAD_PLUGIN=\u8b66\u544a: \u65e0\u6cd5\u52a0\u8f7d\u63d2\u4ef6: {0}
+FILE_CHOOSER_FILE_EXISTS_CANCEL_OPTION=\u53d6\u6d88
+FILE_CHOOSER_FILE_EXISTS_MESSAGE=<html><center>\u6587\u4ef6\u5df2\u5b58\u5728:<br>{0}<br>\u662f\u5426\u8981\u66ff\u6362?
+FILE_CHOOSER_FILE_EXISTS_OK_OPTION=\u66ff\u6362
+FILE_CHOOSER_FILE_EXISTS_TITLE=\u6587\u4ef6\u5df2\u5b58\u5728
+FILE_CHOOSER_SAVED_FILE=<html>\u5df2\u4fdd\u5b58\u5230\u6587\u4ef6:<br>{0}<br>({1} \u5b57\u8282)
+FILE_CHOOSER_SAVE_FAILED_MESSAGE=<html><center>\u672a\u80fd\u4fdd\u5b58\u5230\u6587\u4ef6:<br>{0}<br>{1}
+FILE_CHOOSER_SAVE_FAILED_TITLE=\u4fdd\u5b58\u5931\u8d25
+FREE_PHYSICAL_MEMORY=\u7a7a\u95f2\u7269\u7406\u5185\u5b58
+FREE_SWAP_SPACE=\u7a7a\u95f2\u4ea4\u6362\u7a7a\u95f4
+GARBAGE_COLLECTOR=\u5783\u573e\u6536\u96c6\u5668
+GC_INFO=\u540d\u79f0 = ''{0}'', \u6536\u96c6 = {1,choice,-1#Unavailable|0#{1,number,integer}}, \u603b\u82b1\u8d39\u65f6\u95f4 = {2}
+GC_TIME=GC \u65f6\u95f4
+GC_TIME_DETAILS={1}\u4e0a\u7684{0} ({2}\u6536\u96c6)
+HEAP_MEMORY_USAGE=\u5806\u5185\u5b58\u4f7f\u7528\u91cf
+HEAP=\u5806
+HELP_ABOUT_DIALOG_ACCESSIBLE_DESCRIPTION=\u5305\u542b\u6709\u5173 JConsole \u548c JDK \u7248\u672c\u4fe1\u606f\u7684\u5bf9\u8bdd\u6846
+HELP_ABOUT_DIALOG_JCONSOLE_VERSION=JConsole \u7248\u672c:<br>{0}
+HELP_ABOUT_DIALOG_JAVA_VERSION=Java VM \u7248\u672c:<br>{0}
+HELP_ABOUT_DIALOG_MASTHEAD_ACCESSIBLE_NAME=\u62a5\u5934\u56fe
+HELP_ABOUT_DIALOG_MASTHEAD_TITLE=\u5173\u4e8e JConsole
+HELP_ABOUT_DIALOG_TITLE=JConsole: \u5173\u4e8e
+HELP_ABOUT_DIALOG_USER_GUIDE_LINK=JConsole \u7528\u6237\u6307\u5357(&U):<br>{0}
+HELP_ABOUT_DIALOG_USER_GUIDE_LINK_URL=http://java.sun.com/javase/6/docs/technotes/guides/management/jconsole.html
+HELP_MENU_ABOUT_TITLE=\u5173\u4e8e JConsole(&A)
+HELP_MENU_USER_GUIDE_TITLE=\u8054\u673a\u7528\u6237\u6307\u5357(&U)
+HELP_MENU_TITLE=\u5e2e\u52a9(&H)
+HOTSPOT_MBEANS_ELLIPSIS=HotSpot MBean(&H)...
+HOTSPOT_MBEANS_DIALOG_ACCESSIBLE_DESCRIPTION=\u7528\u4e8e\u7ba1\u7406 HotSpot MBean \u7684\u5bf9\u8bdd\u6846
+IMPACT=\u5f71\u54cd
+INFO=\u4fe1\u606f
+INFO_CAPITALIZED=INFO
+INVALID_PLUGIN_PATH=\u8b66\u544a: \u63d2\u4ef6\u8def\u5f84\u65e0\u6548: {0}
+INVALID_URL=URL \u65e0\u6548: {0}
+IS=\u662f
+JAVA_MONITORING___MANAGEMENT_CONSOLE=Java \u76d1\u89c6\u548c\u7ba1\u7406\u63a7\u5236\u53f0
+JCONSOLE_COLON_=JConsole: {0}
+JCONSOLE_VERSION=JConsole \u7248\u672c "{0}"
+JCONSOLE_ACCESSIBLE_DESCRIPTION=Java \u76d1\u89c6\u548c\u7ba1\u7406\u63a7\u5236\u53f0
+JIT_COMPILER=JIT \u7f16\u8bd1\u5668
+LIBRARY_PATH=\u5e93\u8def\u5f84
+LIVE_THREADS=\u6d3b\u52a8\u7ebf\u7a0b
+LOADED=\u5df2\u52a0\u8f7d
+LOCAL_PROCESS_COLON=\u672c\u5730\u8fdb\u7a0b(&L):
+MASTHEAD_FONT=Dialog-PLAIN-25
+MANAGEMENT_NOT_ENABLED=<b>\u6ce8</b>: \u672a\u5bf9\u6b64\u8fdb\u7a0b\u542f\u7528\u7ba1\u7406\u4ee3\u7406\u3002
+MANAGEMENT_WILL_BE_ENABLED=<b>\u6ce8</b>: \u5c06\u5bf9\u6b64\u8fdb\u7a0b\u542f\u7528\u7ba1\u7406\u4ee3\u7406\u3002
+MBEAN_ATTRIBUTE_INFO=MBeanAttributeInfo
+MBEAN_INFO=MBeanInfo
+MBEAN_NOTIFICATION_INFO=MBeanNotificationInfo
+MBEAN_OPERATION_INFO=MBeanOperationInfo
+MBEANS=MBean
+MBEANS_TAB_CLEAR_NOTIFICATIONS_BUTTON=\u6e05\u9664(&C)
+MBEANS_TAB_CLEAR_NOTIFICATIONS_BUTTON_TOOLTIP=\u6e05\u9664\u901a\u77e5
+MBEANS_TAB_COMPOSITE_NAVIGATION_MULTIPLE=\u7ec4\u5408\u5bfc\u822a{0}/{1}
+MBEANS_TAB_COMPOSITE_NAVIGATION_SINGLE=\u7ec4\u5408\u5bfc\u822a
+MBEANS_TAB_REFRESH_ATTRIBUTES_BUTTON=\u5237\u65b0(&R)
+MBEANS_TAB_REFRESH_ATTRIBUTES_BUTTON_TOOLTIP=\u5237\u65b0\u5c5e\u6027
+MBEANS_TAB_SUBSCRIBE_NOTIFICATIONS_BUTTON=\u8ba2\u9605(&S)
+MBEANS_TAB_SUBSCRIBE_NOTIFICATIONS_BUTTON_TOOLTIP=\u5f00\u59cb\u76d1\u542c\u901a\u77e5
+MBEANS_TAB_TABULAR_NAVIGATION_MULTIPLE=\u8868\u683c\u5f0f\u5bfc\u822a{0}/{1}
+MBEANS_TAB_TABULAR_NAVIGATION_SINGLE=\u8868\u683c\u5f0f\u5bfc\u822a
+MBEANS_TAB_UNSUBSCRIBE_NOTIFICATIONS_BUTTON=\u53d6\u6d88\u8ba2\u9605(&U)
+MBEANS_TAB_UNSUBSCRIBE_NOTIFICATIONS_BUTTON_TOOLTIP=\u505c\u6b62\u76d1\u542c\u901a\u77e5
+MANAGE_HOTSPOT_MBEANS_IN_COLON_=\u7ba1\u7406\u4ee5\u4e0b\u4f4d\u7f6e\u7684 HotSpot MBean:
+MAX=\u6700\u5927\u503c
+MAXIMUM_HEAP_SIZE=\u6700\u5927\u5806\u5927\u5c0f
+MEMORY=\u5185\u5b58
+MEMORY_POOL_LABEL=\u5185\u5b58\u6c60 "{0}"
+MEMORY_TAB_HEAP_PLOTTER_ACCESSIBLE_NAME=\u5806\u7684\u5185\u5b58\u4f7f\u7528\u91cf\u56fe\u8868\u3002
+MEMORY_TAB_INFO_LABEL_FORMAT=<html>\u5df2\u7528: {0} \u5df2\u63d0\u4ea4: {1} \u6700\u5927: {2}</html>
+MEMORY_TAB_NON_HEAP_PLOTTER_ACCESSIBLE_NAME=\u975e\u5806\u7684\u5185\u5b58\u4f7f\u7528\u91cf\u56fe\u8868\u3002
+MEMORY_TAB_POOL_CHART_ABOVE_THRESHOLD=\u5927\u4e8e{0}\u7684\u9608\u503c\u3002\n
+MEMORY_TAB_POOL_CHART_ACCESSIBLE_NAME=\u5185\u5b58\u6c60\u4f7f\u7528\u91cf\u56fe\u8868\u3002
+MEMORY_TAB_POOL_CHART_BELOW_THRESHOLD=\u4f4e\u4e8e{0}\u7684\u9608\u503c\u3002\n
+MEMORY_TAB_POOL_PLOTTER_ACCESSIBLE_NAME={0}\u7684\u5185\u5b58\u4f7f\u7528\u91cf\u56fe\u8868\u3002
+MESSAGE=\u6d88\u606f
+METHOD_SUCCESSFULLY_INVOKED=\u5df2\u6210\u529f\u8c03\u7528\u65b9\u6cd5
+MINIMIZE_ALL=\u5168\u90e8\u6700\u5c0f\u5316(&M)
+MONITOR_LOCKED=\ \ \ - \u5df2\u9501\u5b9a{0}\n
+NAME=\u540d\u79f0
+NAME_AND_BUILD={0} (\u5de5\u4f5c\u7248\u672c {1})
+NAME_STATE=\u540d\u79f0: {0}\n\u72b6\u6001: {1}\n
+NAME_STATE_LOCK_NAME=\u540d\u79f0: {0}\n\u72b6\u6001: {2}\u4e0a\u7684{1}\n
+NAME_STATE_LOCK_NAME_LOCK_OWNER=\u540d\u79f0: {0}\n\u72b6\u6001: {2}\u4e0a\u7684{1}, \u62e5\u6709\u8005: {3}\n
+NEW_CONNECTION_ELLIPSIS=\u65b0\u5efa\u8fde\u63a5(&N)...
+NO_DEADLOCK_DETECTED=\u672a\u68c0\u6d4b\u5230\u6b7b\u9501
+NON_HEAP_MEMORY_USAGE=\u975e\u5806\u5185\u5b58\u4f7f\u7528\u91cf
+NON_HEAP=\u975e\u5806
+NOTIFICATION=\u901a\u77e5
+NOTIFICATION_BUFFER=\u901a\u77e5\u7f13\u51b2\u533a
+NOTIFICATIONS=\u901a\u77e5
+NOTIF_TYPES=NotifTypes
+NUMBER_OF_THREADS=\u7ebf\u7a0b\u6570
+NUMBER_OF_LOADED_CLASSES=\u5df2\u52a0\u8f7d\u7c7b\u6570
+NUMBER_OF_PROCESSORS=\u5904\u7406\u7a0b\u5e8f\u6570
+OBJECT_NAME=ObjectName
+OPERATING_SYSTEM=\u64cd\u4f5c\u7cfb\u7edf
+OPERATION=\u64cd\u4f5c
+OPERATION_INVOCATION=\u64cd\u4f5c\u8c03\u7528
+OPERATION_RETURN_VALUE=\u64cd\u4f5c\u8fd4\u56de\u503c
+OPERATIONS=\u64cd\u4f5c
+OVERVIEW=\u6982\u89c8
+OVERVIEW_PANEL_PLOTTER_ACCESSIBLE_NAME={0}\u7684\u56fe\u8868\u3002
+PARAMETER=\u53c2\u6570
+PASSWORD_ACCESSIBLE_NAME=\u53e3\u4ee4
+PASSWORD_COLON_=\u53e3\u4ee4(&P):
+PEAK=\u5cf0\u503c
+PERFORM_GC=\u6267\u884c &GC
+PERFORM_GC_TOOLTIP=\u8bf7\u6c42\u5783\u573e\u6536\u96c6
+PLOTTER_ACCESSIBLE_NAME=\u56fe\u8868
+PLOTTER_ACCESSIBLE_NAME_KEY_AND_VALUE={0}={1}\n
+PLOTTER_ACCESSIBLE_NAME_NO_DATA=\u672a\u7ed8\u5236\u6570\u636e\u3002
+PLOTTER_SAVE_AS_MENU_ITEM=\u5c06\u6570\u636e\u53e6\u5b58\u4e3a(&A)...
+PLOTTER_TIME_RANGE_MENU=\u65f6\u95f4\u8303\u56f4(&T)
+PROBLEM_ADDING_LISTENER=\u6dfb\u52a0\u76d1\u542c\u7a0b\u5e8f\u65f6\u51fa\u73b0\u95ee\u9898
+PROBLEM_DISPLAYING_MBEAN=\u663e\u793a MBean \u65f6\u51fa\u73b0\u95ee\u9898
+PROBLEM_INVOKING=\u8c03\u7528\u65f6\u51fa\u73b0\u95ee\u9898
+PROBLEM_REMOVING_LISTENER=\u5220\u9664\u76d1\u542c\u7a0b\u5e8f\u65f6\u51fa\u73b0\u95ee\u9898
+PROBLEM_SETTING_ATTRIBUTE=\u8bbe\u7f6e\u5c5e\u6027\u65f6\u51fa\u73b0\u95ee\u9898
+PROCESS_CPU_TIME=\u8fdb\u7a0b CPU \u65f6\u95f4
+READABLE=\u53ef\u8bfb
+RECONNECT=\u91cd\u65b0\u8fde\u63a5
+REMOTE_PROCESS_COLON=\u8fdc\u7a0b\u8fdb\u7a0b(&R):
+REMOTE_PROCESS_TEXT_FIELD_ACCESSIBLE_NAME=\u8fdc\u7a0b\u8fdb\u7a0b
+RESTORE_ALL=\u5168\u90e8\u8fd8\u539f(&R)
+RETURN_TYPE=ReturnType
+SEQ_NUM=SeqNum
+SIZE_BYTES={0,number,integer} \u5b57\u8282
+SIZE_GB={0} GB
+SIZE_KB={0} KB
+SIZE_MB={0} MB
+SOURCE=\u6e90
+STACK_TRACE=\n\u5806\u6808\u8ddf\u8e2a: \n
+SUMMARY_TAB_HEADER_DATE_TIME_FORMAT=FULL,FULL
+SUMMARY_TAB_PENDING_FINALIZATION_LABEL=\u6682\u6302\u6700\u7ec8\u5904\u7406
+SUMMARY_TAB_PENDING_FINALIZATION_VALUE={0}\u5bf9\u8c61
+SUMMARY_TAB_TAB_NAME=VM \u6982\u8981
+SUMMARY_TAB_VM_VERSION={0}\u7248\u672c {1}
+THREADS=\u7ebf\u7a0b
+THREAD_TAB_THREAD_INFO_ACCESSIBLE_NAME=\u7ebf\u7a0b\u4fe1\u606f
+THREAD_TAB_THREAD_PLOTTER_ACCESSIBLE_NAME=\u8868\u793a\u7ebf\u7a0b\u6570\u7684\u56fe\u8868\u3002
+THRESHOLD=\u9608\u503c
+TILE=\u5e73\u94fa(&T)
+TIME_RANGE_COLON=\u65f6\u95f4\u8303\u56f4(&T):
+TIME=\u65f6\u95f4
+TIME_STAMP=TimeStamp
+TOTAL_LOADED=\u52a0\u8f7d\u603b\u6570
+TOTAL_CLASSES_LOADED=\u5df2\u52a0\u8f7d\u7c7b\u603b\u6570
+TOTAL_CLASSES_UNLOADED=\u5df2\u5378\u8f7d\u7c7b\u603b\u6570
+TOTAL_COMPILE_TIME=\u603b\u7f16\u8bd1\u65f6\u95f4
+TOTAL_PHYSICAL_MEMORY=\u603b\u7269\u7406\u5185\u5b58
+TOTAL_THREADS_STARTED=\u542f\u52a8\u7684\u7ebf\u7a0b\u603b\u6570
+TOTAL_SWAP_SPACE=\u603b\u4ea4\u6362\u7a7a\u95f4
+TYPE=\u7c7b\u578b
+UNAVAILABLE=\u4e0d\u53ef\u7528
+UNKNOWN_CAPITALIZED=UNKNOWN
+UNKNOWN_HOST=\u672a\u77e5\u4e3b\u673a: {0}
+UNREGISTER=\u6ce8\u9500
+UPTIME=\u8fd0\u884c\u65f6\u95f4
+USAGE_THRESHOLD=\u7528\u6cd5\u9608\u503c
+REMOTE_TF_USAGE=<b>\u7528\u6cd5</b>: <hostname>:<port> \u6216 service:jmx:<protocol>:<sap>
+USED=\u5df2\u7528
+USERNAME_COLON_=\u7528\u6237\u540d(&U):
+USERNAME_ACCESSIBLE_NAME=\u7528\u6237\u540d
+USER_DATA=UserData
+VIRTUAL_MACHINE=\u865a\u62df\u673a
+VM_ARGUMENTS=VM \u53c2\u6570
+VMINTERNAL_FRAME_ACCESSIBLE_DESCRIPTION=\u7528\u4e8e\u76d1\u89c6 Java \u865a\u62df\u673a\u7684\u5185\u90e8\u6846\u67b6
+VALUE=\u503c
+VENDOR=\u5382\u5546
+VERBOSE_OUTPUT=\u8be6\u7ec6\u8f93\u51fa
+VERBOSE_OUTPUT_TOOLTIP=\u4e3a\u7c7b\u52a0\u8f7d\u7cfb\u7edf\u542f\u7528\u8be6\u7ec6\u8f93\u51fa
+VIEW=\u89c6\u56fe
+WINDOW=\u7a97\u53e3(&W)
+WINDOWS=Windows
+WRITABLE=\u53ef\u5199
+CONNECTION_FAILED1=\u8fde\u63a5\u5931\u8d25: \u662f\u5426\u91cd\u8bd5?
+CONNECTION_FAILED2=\u672a\u6210\u529f\u8fde\u63a5\u5230{0}\u3002<br>\u662f\u5426\u8981\u91cd\u8bd5?
+CONNECTION_LOST1=\u8fde\u63a5\u4e22\u5931: \u662f\u5426\u91cd\u65b0\u8fde\u63a5?
+CONNECTING_TO1=\u6b63\u5728\u8fde\u63a5\u5230{0}
+CONNECTING_TO2=\u60a8\u5f53\u524d\u6b63\u5728\u8fde\u63a5\u5230{0}\u3002<br>\u8fd9\u5c06\u9700\u8981\u51e0\u5206\u949f\u7684\u65f6\u95f4\u3002
+DEADLOCK_TAB=\u6b7b\u9501
+DEADLOCK_TAB_N=\u6b7b\u9501{0}
+EXPAND=\u5c55\u5f00
+KBYTES={0} KB
+PLOT=\u7ed8\u56fe
+VISUALIZE=\u53ef\u89c6\u5316
+ZZ_USAGE_TEXT=\u7528\u6cd5: {0} [ -interval=n ] [ -notile ] [ -pluginpath <path> ] [ -version ] [ connection ... ]\n\n -interval \u5c06\u66f4\u65b0\u95f4\u9694\u8bbe\u7f6e\u4e3a n \u79d2 (\u9ed8\u8ba4\u503c\u4e3a 4 \u79d2)\n -notile \u521d\u59cb\u4e0d\u5e73\u94fa\u7a97\u53e3 (\u5bf9\u4e8e\u4e24\u4e2a\u6216\u591a\u4e2a\u8fde\u63a5)\n -pluginpath \u6307\u5b9a jconsole \u7528\u4e8e\u67e5\u627e\u63d2\u4ef6\u7684\u8def\u5f84\n -version \u8f93\u51fa\u7a0b\u5e8f\u7248\u672c\n\n connection = pid || host:port || JMX URL (service:jmx:<\u534f\u8bae>://...)\n pid \u76ee\u6807\u8fdb\u7a0b\u7684\u8fdb\u7a0b ID\n host \u8fdc\u7a0b\u4e3b\u673a\u540d\u6216 IP \u5730\u5740\n port \u8fdc\u7a0b\u8fde\u63a5\u7684\u7aef\u53e3\u53f7\n\n -J \u6307\u5b9a\u8fd0\u884c jconsole \u7684 Java \u865a\u62df\u673a\n \u7684\u8f93\u5165\u53c2\u6570
diff --git a/src/share/demo/jvmti/java_crw_demo/java_crw_demo.c b/src/share/demo/jvmti/java_crw_demo/java_crw_demo.c
index 28ef3b6..1da0e55 100644
--- a/src/share/demo/jvmti/java_crw_demo/java_crw_demo.c
+++ b/src/share/demo/jvmti/java_crw_demo/java_crw_demo.c
@@ -89,6 +89,12 @@
(ci)->input_position <= (ci)->input_len && \
(ci)->output_position <= (ci)->output_len) )
+#define BUFSIZE 256
+
+#ifdef _WIN32
+#define snprintf(buffer, count, format, ...) _snprintf_s(buffer, count, _TRUNCATE, format, ##__VA_ARGS__)
+#endif
+
/* Typedefs for various integral numbers, just for code clarity */
typedef unsigned ClassOpcode; /* One opcode */
@@ -651,6 +657,7 @@
unsigned int index2;
unsigned len;
char * utf8;
+ char message[BUFSIZE];
ipos = i;
index1 = 0;
@@ -689,8 +696,20 @@
utf8[len] = 0;
write_bytes(ci, (void*)utf8, len);
break;
+ case JVM_CONSTANT_MethodType:
+ index1 = copyU2(ci);
+ break;
+ case JVM_CONSTANT_MethodHandle:
+ index1 = copyU1(ci);
+ index2 = copyU2(ci);
+ break;
+ case JVM_CONSTANT_InvokeDynamic:
+ index1 = copyU2(ci);
+ index2 = copyU2(ci);
+ break;
default:
- CRW_FATAL(ci, "Unknown constant");
+ snprintf(message, BUFSIZE, "Unknown tag: %d, at ipos %hu", tag, ipos);
+ CRW_FATAL(ci, message);
break;
}
fillin_cpool_entry(ci, ipos, tag, index1, index2, (const char *)utf8, len);
diff --git a/src/share/javavm/export/classfile_constants.h b/src/share/javavm/export/classfile_constants.h
index ccdf594..861576e 100644
--- a/src/share/javavm/export/classfile_constants.h
+++ b/src/share/javavm/export/classfile_constants.h
@@ -86,7 +86,8 @@
JVM_CONSTANT_InterfaceMethodref = 11,
JVM_CONSTANT_NameAndType = 12,
JVM_CONSTANT_MethodHandle = 15, // JSR 292
- JVM_CONSTANT_MethodType = 16 // JSR 292
+ JVM_CONSTANT_MethodType = 16, // JSR 292
+ JVM_CONSTANT_InvokeDynamic = 18
};
/* JVM_CONSTANT_MethodHandle subtypes */
diff --git a/src/solaris/classes/sun/nio/ch/DevPollArrayWrapper.java b/src/solaris/classes/sun/nio/ch/DevPollArrayWrapper.java
index 64a241e..5384d8b 100644
--- a/src/solaris/classes/sun/nio/ch/DevPollArrayWrapper.java
+++ b/src/solaris/classes/sun/nio/ch/DevPollArrayWrapper.java
@@ -25,9 +25,7 @@
package sun.nio.ch;
-import sun.misc.*;
import java.io.IOException;
-import java.util.LinkedList;
/**
@@ -66,6 +64,9 @@
static final short EVENT_OFFSET = 4;
static final short REVENT_OFFSET = 6;
+ // Special value to indicate that an update should be ignored
+ static final byte CANCELLED = (byte)-1;
+
// Maximum number of open file descriptors
static final int OPEN_MAX = fdLimit();
@@ -74,13 +75,16 @@
static final int NUM_POLLFDS = Math.min(OPEN_MAX-1, 8192);
// Base address of the native pollArray
- private long pollArrayAddress;
+ private final long pollArrayAddress;
// Array of pollfd structs used for driver updates
- private AllocatedNativeObject updatePollArray;
+ private final AllocatedNativeObject updatePollArray;
// Maximum number of POLL_FD structs to update at once
- private int MAX_UPDATE_SIZE = Math.min(OPEN_MAX, 10000);
+ private final int MAX_UPDATE_SIZE = Math.min(OPEN_MAX, 512);
+
+ // Initial size of arrays for fd registration changes
+ private final int INITIAL_PENDING_UPDATE_SIZE = 64;
DevPollArrayWrapper() {
int allocationSize = NUM_POLLFDS * SIZE_POLLFD;
@@ -91,19 +95,6 @@
wfd = init();
}
- // Machinery for remembering fd registration changes
- // A hashmap could be used but the number of changes pending
- // is expected to be small
- private static class Updator {
- int fd;
- int mask;
- Updator(int fd, int mask) {
- this.fd = fd;
- this.mask = mask;
- }
- }
- private LinkedList<Updator> updateList = new LinkedList<Updator>();
-
// The pollfd array for results from devpoll driver
private AllocatedNativeObject pollArray;
@@ -122,6 +113,20 @@
// Number of updated pollfd entries
int updated;
+ // object to synchronize fd registration changes
+ private final Object updateLock = new Object();
+
+ // number of file descriptors with registration changes pending
+ private int updateCount;
+
+ // file descriptors with registration changes pending
+ private int[] updateDescriptors = new int[INITIAL_PENDING_UPDATE_SIZE];
+
+ // events for file descriptors with registration changes pending, indexed
+ // by file descriptor and stored as bytes for efficiency reasons.
+ private byte[] updateEvents = new byte[OPEN_MAX];
+
+
void initInterrupt(int fd0, int fd1) {
outgoingInterruptFD = fd1;
incomingInterruptFD = fd0;
@@ -149,14 +154,32 @@
}
void setInterest(int fd, int mask) {
- synchronized (updateList) {
- updateList.add(new Updator(fd, mask));
+ synchronized (updateLock) {
+ // record the file descriptor and events, expanding the
+ // respective arrays first if necessary.
+ int oldCapacity = updateDescriptors.length;
+ if (updateCount >= oldCapacity) {
+ int newCapacity = oldCapacity + INITIAL_PENDING_UPDATE_SIZE;
+ int[] newDescriptors = new int[newCapacity];
+ System.arraycopy(updateDescriptors, 0, newDescriptors, 0, oldCapacity);
+ updateDescriptors = newDescriptors;
+ }
+ updateDescriptors[updateCount++] = fd;
+
+ // events are stored as bytes for efficiency reasons
+ byte b = (byte)mask;
+ assert (b == mask) && (b != CANCELLED);
+ updateEvents[fd] = b;
}
}
void release(int fd) {
- synchronized (updateList) {
- updateList.add(new Updator(fd, POLLREMOVE));
+ synchronized (updateLock) {
+ // cancel any pending update for this file descriptor
+ updateEvents[fd] = CANCELLED;
+
+ // remove from /dev/poll
+ register(wfd, fd, POLLREMOVE);
}
}
@@ -181,32 +204,37 @@
void updateRegistrations() throws IOException {
// Populate pollfd array with updated masks
- synchronized (updateList) {
- while (updateList.size() > 0) {
- // We have to insert a dummy node in between each
- // real update to use POLLREMOVE on the fd first because
- // otherwise the changes are simply OR'd together
- int index = 0;
- Updator u = null;
- while ((u = updateList.poll()) != null) {
- // First add pollfd struct to clear out this fd
- putPollFD(updatePollArray, index, u.fd, POLLREMOVE);
- index++;
- // Now add pollfd to update this fd, if necessary
- if (u.mask != POLLREMOVE) {
- putPollFD(updatePollArray, index, u.fd, (short)u.mask);
- index++;
- }
+ synchronized (updateLock) {
- // Check against the max update size; these are
- // all we will process. Valid index ranges from 0 to
- // (MAX_UPDATE_SIZE - 1) and we can use up to 2 per loop
- if (index > MAX_UPDATE_SIZE - 2)
- break;
+ int j = 0;
+ int index = 0;
+ while (j < updateCount) {
+ int fd = updateDescriptors[j];
+ short events = updateEvents[fd];
+
+ // skip update if key has been cancelled
+ if (events != CANCELLED) {
+ // remove from /dev/poll when the interest ops changes to 0
+ if (events == 0)
+ events = POLLREMOVE;
+
+ // populate pollfd array with updated event
+ putPollFD(updatePollArray, index, fd, events);
+ index++;
+ if (index >= MAX_UPDATE_SIZE) {
+ registerMultiple(wfd, updatePollArray.address(), index);
+ index = 0;
+ }
}
- // Register the changes with /dev/poll
+ j++;
+
+ }
+
+ // write any remaining updates
+ if (index > 0)
registerMultiple(wfd, updatePollArray.address(), index);
- }
+
+ updateCount = 0;
}
}
diff --git a/src/solaris/native/sun/nio/ch/DevPollArrayWrapper.c b/src/solaris/native/sun/nio/ch/DevPollArrayWrapper.c
index 5813ed0..0c4e1b0 100644
--- a/src/solaris/native/sun/nio/ch/DevPollArrayWrapper.c
+++ b/src/solaris/native/sun/nio/ch/DevPollArrayWrapper.c
@@ -118,27 +118,20 @@
Java_sun_nio_ch_DevPollArrayWrapper_register(JNIEnv *env, jobject this,
jint wfd, jint fd, jint mask)
{
- struct pollfd a[2];
- unsigned char *pollBytes = (unsigned char *)&a[0];
- unsigned char *pollEnd = pollBytes + sizeof(struct pollfd) * 2;
+ struct pollfd a[1];
+ int n;
- /* We clear it first, otherwise any entries between poll invocations
- get OR'd together */
a[0].fd = fd;
- a[0].events = POLLREMOVE;
+ a[0].events = mask;
a[0].revents = 0;
- a[1].fd = fd;
- a[1].events = mask;
- a[1].revents = 0;
-
- while (pollBytes < pollEnd) {
- int bytesWritten = write(wfd, pollBytes, (int)(pollEnd - pollBytes));
- if (bytesWritten < 0) {
+ n = write(wfd, &a[0], sizeof(a));
+ if (n != sizeof(a)) {
+ if (n < 0) {
JNU_ThrowIOExceptionWithLastError(env, "Error writing pollfds");
- return;
+ } else {
+ JNU_ThrowIOException(env, "Unexpected number of bytes written");
}
- pollBytes += bytesWritten;
}
}
diff --git a/src/windows/native/java/lang/java_props_md.c b/src/windows/native/java/lang/java_props_md.c
index bfa3711..0e71e34 100644
--- a/src/windows/native/java/lang/java_props_md.c
+++ b/src/windows/native/java/lang/java_props_md.c
@@ -403,6 +403,7 @@
* Windows Server 2008 6 0 (!VER_NT_WORKSTATION)
* Windows 7 6 1 (VER_NT_WORKSTATION)
* Windows Server 2008 R2 6 1 (!VER_NT_WORKSTATION)
+ * Windows 8 6 2 (VER_NT_WORKSTATION)
*
* This mapping will presumably be augmented as new Windows
* versions are released.
@@ -459,6 +460,7 @@
switch (ver.dwMinorVersion) {
case 0: sprops.os_name = "Windows Vista"; break;
case 1: sprops.os_name = "Windows 7"; break;
+ case 2: sprops.os_name = "Windows 8"; break;
default: sprops.os_name = "Windows NT (unknown)";
}
} else {
diff --git a/src/windows/native/java/util/TimeZone_md.c b/src/windows/native/java/util/TimeZone_md.c
index 5abc61c..d29558c 100644
--- a/src/windows/native/java/util/TimeZone_md.c
+++ b/src/windows/native/java/util/TimeZone_md.c
@@ -165,6 +165,7 @@
WCHAR *stdNamePtr = tzi.StandardName;
DWORD valueSize;
DWORD timeType;
+ int isVista;
/*
* Get the current time zone setting of the platform.
@@ -180,6 +181,7 @@
ver.dwOSVersionInfoSize = sizeof(ver);
GetVersionEx(&ver);
isNT = ver.dwPlatformId == VER_PLATFORM_WIN32_NT;
+ isVista = isNT && ver.dwMajorVersion >= 6;
ret = RegOpenKeyEx(HKEY_LOCAL_MACHINE, WIN_CURRENT_TZ_KEY, 0,
KEY_READ, (PHKEY)&hKey);
@@ -202,8 +204,13 @@
ret = RegQueryValueExA(hKey, "DynamicDaylightTimeDisabled",
NULL, &valueType, (LPBYTE) &val, &bufSize);
}
+
if (ret == ERROR_SUCCESS) {
- if (val == 1) {
+ int daylightSavingsUpdateDisabledOther = val == 1 && tzi.DaylightDate.wMonth != 0;
+ int daylightSavingsUpdateDisabledVista = val == 1;
+ int daylightSavingsUpdateDisabled = isVista ? daylightSavingsUpdateDisabledVista : daylightSavingsUpdateDisabledOther;
+
+ if (daylightSavingsUpdateDisabled) {
(void) RegCloseKey(hKey);
customZoneName(tzi.Bias, winZoneName);
return VALUE_GMTOFFSET;
@@ -213,7 +220,7 @@
/*
* Vista has the key for the current "Time Zones" entry.
*/
- if (isNT && ver.dwMajorVersion >= 6) {
+ if (isVista) {
valueType = 0;
bufSize = MAX_ZONE_CHAR;
ret = RegQueryValueExA(hKey, "TimeZoneKeyName", NULL,
diff --git a/test/ProblemList.txt b/test/ProblemList.txt
index 79c53f5..b9a7189 100644
--- a/test/ProblemList.txt
+++ b/test/ProblemList.txt
@@ -222,6 +222,9 @@
sun/net/www/protocol/http/B6299712.java macosx-all
java/net/CookieHandler/CookieManagerTest.java macosx-all
+# 7164518
+sun/security/krb5/auto/Unreachable.java macosx-all
+
# JPRT needs to set 127.0.0.1 in proxy bypass list
java/net/URLClassLoader/closetest/CloseTest.java macosx-all
############################################################################
diff --git a/test/java/util/TimeZone/DstTzTest.java b/test/java/util/TimeZone/DstTzTest.java
new file mode 100644
index 0000000..69cca60
--- /dev/null
+++ b/test/java/util/TimeZone/DstTzTest.java
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2012 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.
+ */
+
+/*
+ * Portions Copyright (c) 2012 IBM Corporation
+ */
+
+/* @test
+ * @bug 7094176
+ * @summary Incorrect TimeZone display name when DST not applicable and
+ * disabled
+ * @run main DstTzTest
+ */
+
+import java.util.TimeZone;
+
+/**
+ * Manaul steps:
+ * 1. In the Windows Date and Time Properties dialog, set the time zone to one that uses DST (e.g. Greenwich Mean Time).
+ * 2. Disable the 'Automatically adjust clock for Daylight Saving Changes' option.
+ * 3. Change the time zone to one that does not use DST (e.g. India Standard Time - (GMT+5:30) Chennai,Kolkata,Mumbai,New Delhi)
+ * 4. Compile and run the testcase
+ */
+public class DstTzTest {
+ public static void main(String[] args) throws Exception {
+ String expectedName = "India Standard Time";
+ String tzName = TimeZone.getDefault().getDisplayName();
+ System.out.println(tzName);
+
+ if (!expectedName.equals(tzName)) {
+ throw new Exception("Expected time zone name is " + expectedName + ", output is " + tzName);
+ }
+ }
+}
diff --git a/test/sun/security/krb5/auto/BadKdc.java b/test/sun/security/krb5/auto/BadKdc.java
index 55a4d99..86a464a 100644
--- a/test/sun/security/krb5/auto/BadKdc.java
+++ b/test/sun/security/krb5/auto/BadKdc.java
@@ -87,6 +87,10 @@
throws Exception {
System.setProperty("sun.security.krb5.debug", "true");
+ // Idle UDP sockets will trigger a SocketTimeoutException, without it,
+ // a PortUnreachableException will be thrown.
+ DatagramSocket d1 = null, d2 = null, d3 = null;
+
// Make sure KDCs' ports starts with 1 and 2 and 3,
// useful for checking debug output.
int p1 = 10000 + new java.util.Random().nextInt(10000);
@@ -109,6 +113,8 @@
Config.refresh();
// Turn on k3 only
+ d1 = new DatagramSocket(p1);
+ d2 = new DatagramSocket(p2);
KDC k3 = on(p3);
test(expected[0]);
@@ -117,10 +123,17 @@
test(expected[2]);
k3.terminate(); // shutdown k3
+ d3 = new DatagramSocket(p3);
+
+ d2.close();
on(p2); // k2 is on
+
test(expected[3]);
+ d1.close();
on(p1); // k1 and k2 is on
test(expected[4]);
+
+ d3.close();
}
private static KDC on(int p) throws Exception {
diff --git a/test/sun/security/krb5/auto/MaxRetries.java b/test/sun/security/krb5/auto/MaxRetries.java
index fec1bec..f4f86a3 100644
--- a/test/sun/security/krb5/auto/MaxRetries.java
+++ b/test/sun/security/krb5/auto/MaxRetries.java
@@ -24,11 +24,13 @@
/*
* @test
* @bug 6844193
+ * @compile -XDignore.symbol.file MaxRetries.java
* @run main/othervm/timeout=300 MaxRetries
* @summary support max_retries in krb5.conf
*/
import java.io.*;
+import java.net.DatagramSocket;
import java.security.Security;
public class MaxRetries {
@@ -37,6 +39,10 @@
System.setProperty("sun.security.krb5.debug", "true");
new OneKDC(null).writeJAASConf();
+
+ // An idle UDP socket to revent PortUnreachableException
+ DatagramSocket ds = new DatagramSocket(33333);
+
System.setProperty("java.security.krb5.conf", "alternative-krb5.conf");
// For tryLast
@@ -78,6 +84,8 @@
rewriteUdpPrefLimit(10000, 10); // realm rules
test2("TCP");
+
+ ds.close();
}
/**
diff --git a/test/sun/security/krb5/auto/TcpTimeout.java b/test/sun/security/krb5/auto/TcpTimeout.java
index df71d7c..6f55391 100644
--- a/test/sun/security/krb5/auto/TcpTimeout.java
+++ b/test/sun/security/krb5/auto/TcpTimeout.java
@@ -24,6 +24,7 @@
/*
* @test
* @bug 6952519
+ * @compile -XDignore.symbol.file TcpTimeout.java
* @run main/othervm TcpTimeout
* @summary kdc_timeout is not being honoured when using TCP
*/
@@ -73,9 +74,7 @@
// 5 sec on p1, 5 sec on p1, fail
// 5 sec on p2, 5 sec on p2, fail
// p3 ok, p3 ok again for preauth.
- // The total time should be 20sec + 2x. x is processing time for AS-REQ.
int count = 6;
- long start = System.currentTimeMillis();
ByteArrayOutputStream bo = new ByteArrayOutputStream();
PrintStream oldout = System.out;
@@ -93,10 +92,5 @@
if (count != 0) {
throw new Exception("Retry count is " + count + " less");
}
-
- long end = System.currentTimeMillis();
- if ((end - start)/1000L < 20) {
- throw new Exception("Too fast? " + (end - start)/1000L);
- }
}
}
diff --git a/test/sun/security/krb5/auto/Unreachable.java b/test/sun/security/krb5/auto/Unreachable.java
new file mode 100644
index 0000000..5233978
--- /dev/null
+++ b/test/sun/security/krb5/auto/Unreachable.java
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2012, 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
+ * @bug 7162687
+ * @summary enhance KDC server availability detection
+ * @compile -XDignore.symbol.file Unreachable.java
+ * @run main/othervm/timeout=10 Unreachable
+ */
+
+import java.io.File;
+import javax.security.auth.login.LoginException;
+import sun.security.krb5.Config;
+
+public class Unreachable {
+
+ public static void main(String[] args) throws Exception {
+ File f = new File(
+ System.getProperty("test.src", "."), "unreachable.krb5.conf");
+ System.setProperty("java.security.krb5.conf", f.getPath());
+ Config.refresh();
+
+ // If PortUnreachableException is not received, the login will consume
+ // about 3*3*30 seconds and the test will timeout.
+ try {
+ Context.fromUserPass("name", "pass".toCharArray(), true);
+ } catch (LoginException le) {
+ // This is OK
+ }
+ }
+}
diff --git a/test/sun/security/krb5/auto/unreachable.krb5.conf b/test/sun/security/krb5/auto/unreachable.krb5.conf
new file mode 100644
index 0000000..8ff4cc1
--- /dev/null
+++ b/test/sun/security/krb5/auto/unreachable.krb5.conf
@@ -0,0 +1,9 @@
+[libdefaults]
+ default_realm = RABBIT.HOLE
+[realms]
+
+RABBIT.HOLE = {
+ kdc = 127.0.0.1:13434
+ kdc = 127.0.0.1:13435
+ kdc = 127.0.0.1:13436
+}
diff --git a/test/sun/text/resources/LocaleData b/test/sun/text/resources/LocaleData
index 6a86870..2bdaf6b 100644
--- a/test/sun/text/resources/LocaleData
+++ b/test/sun/text/resources/LocaleData
@@ -7029,3 +7029,8 @@
# bug 7028073
CurrencyNames/es_PE/PEN=S/.
+
+# bug 7171028
+FormatData/sl/DateTimePatterns/4=EEEE, dd. MMMM y
+FormatData/sl/DateTimePatterns/5=dd. MMMM y
+
diff --git a/test/sun/text/resources/LocaleDataTest.java b/test/sun/text/resources/LocaleDataTest.java
index 553593f..32a4a92 100644
--- a/test/sun/text/resources/LocaleDataTest.java
+++ b/test/sun/text/resources/LocaleDataTest.java
@@ -34,7 +34,7 @@
* 6509039 6609737 6610748 6645271 6507067 6873931 6450945 6645268 6646611
* 6645405 6650730 6910489 6573250 6870908 6585666 6716626 6914413 6916787
* 6919624 6998391 7019267 7020960 7025837 7020583 7036905 7066203 7101495
- * 7003124 7085757 7028073
+ * 7003124 7085757 7028073 7171028
* @summary Verify locale data
*
*/