Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6339426

Line Feed Code can not be recognized correctly in J2SE 5.0 Doc. page

XMLWordPrintable

    • 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
             ...
         }

            duke J. Duke
            tbaba Tadayuki Baba (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: