-
Bug
-
Resolution: Fixed
-
P3
-
5.0
-
b01
-
generic
-
generic
The Statement in JDK5.0 document (japanese) seems ugly because of lack of Linefeed(or incorrect
line feed code).
BEHAVIOR:
Look at the section of "MX Bean ni akusesu suru houhou" and "puratto-fomu no kakuchou" in the page,
http://java.sun.com/j2se/1.5.0/ja/docs/ja/api/java/lang/management/package-summary.html
Sample code are shown, but that seems ugly as follows,
EXAMPLE :
In japanese web site, sample code st "MX Bean ni akusesu suru houhou" seems,
---sample in Japanese web page ---
.....
2. Jikkou-chuu no kasou-mashin no puratto fo-mu MbeansServer ni setsuzokushiteiru MBeanServerConnection
wo kaisuru
MBeanServerConnection mbs;
// Connect to a running JVM (or itself) and get MBeanServerConnection // that has the JVM MXBeans registered in it ...
try { // Assuming the RuntimeMXBean has been registered in mbs ObjectName oname = new ObjectName(ManagementFactory.RUNTIME_MXBEAN_NAME); // Get standard attribute "VmVendor" String vendor = (String) mbs.getAttribute(oname, "VmVendor"); } catch (....) { // Catch the exceptions thrown by ObjectName constructor // and MBeanServer.getAttribute method ... }
However, the corresponding portion to the above in English page seems as follows.
--- sample at english page ( http://java.sun.com/j2se/1.5.0/docs/api/java/lang/management/package-summary.html )-----
....
2. Go through a MBeanServerConnection connecting to the platform MBeanServer of a running virtual machine.
MBeanServerConnection mbs;
// Connect to a running JVM (or itself) and get MBeanServerConnection
// that has the JVM MXBeans registered in it
...
try {
// Assuming the RuntimeMXBean has been registered in mbs
ObjectName oname = new ObjectName(ManagementFactory.RUNTIME_MXBEAN_NAME);
// Get standard attribute "VmVendor"
String vendor = (String) mbs.getAttribute(oname, "VmVendor");
} catch (....) {
// Catch the exceptions thrown by ObjectName constructor
// and MBeanServer.getAttribute method
...
}
line feed code).
BEHAVIOR:
Look at the section of "MX Bean ni akusesu suru houhou" and "puratto-fomu no kakuchou" in the page,
http://java.sun.com/j2se/1.5.0/ja/docs/ja/api/java/lang/management/package-summary.html
Sample code are shown, but that seems ugly as follows,
EXAMPLE :
In japanese web site, sample code st "MX Bean ni akusesu suru houhou" seems,
---sample in Japanese web page ---
.....
2. Jikkou-chuu no kasou-mashin no puratto fo-mu MbeansServer ni setsuzokushiteiru MBeanServerConnection
wo kaisuru
MBeanServerConnection mbs;
// Connect to a running JVM (or itself) and get MBeanServerConnection // that has the JVM MXBeans registered in it ...
try { // Assuming the RuntimeMXBean has been registered in mbs ObjectName oname = new ObjectName(ManagementFactory.RUNTIME_MXBEAN_NAME); // Get standard attribute "VmVendor" String vendor = (String) mbs.getAttribute(oname, "VmVendor"); } catch (....) { // Catch the exceptions thrown by ObjectName constructor // and MBeanServer.getAttribute method ... }
However, the corresponding portion to the above in English page seems as follows.
--- sample at english page ( http://java.sun.com/j2se/1.5.0/docs/api/java/lang/management/package-summary.html )-----
....
2. Go through a MBeanServerConnection connecting to the platform MBeanServer of a running virtual machine.
MBeanServerConnection mbs;
// Connect to a running JVM (or itself) and get MBeanServerConnection
// that has the JVM MXBeans registered in it
...
try {
// Assuming the RuntimeMXBean has been registered in mbs
ObjectName oname = new ObjectName(ManagementFactory.RUNTIME_MXBEAN_NAME);
// Get standard attribute "VmVendor"
String vendor = (String) mbs.getAttribute(oname, "VmVendor");
} catch (....) {
// Catch the exceptions thrown by ObjectName constructor
// and MBeanServer.getAttribute method
...
}
- relates to
-
JDK-6449841 Incomplete text layout for sample codes in the Japanese API docs
- Closed