make/jdk/netbeans/jmx/README
author sundar
Tue, 20 Feb 2018 15:25:40 +0530
changeset 48917 37beaca49e63
parent 47216 71c04702a3d5
permissions -rw-r--r--
8194922: jlink --exclude-resources should never exclude module-info.class Reviewed-by: alanb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
Working On Java[TM] Management Extensions (JMX[TM)) Using NetBeans IDE
90ce3da70b43 Initial load
duke
parents:
diff changeset
     2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
README FIRST
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
  make/netbeans/README for getting started with NetBeans IDE and OpenJDK,
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
  and workings with OpenJDK NetBeans projects. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
This README focusses on working on the OpenJDK JMX API using NetBeans IDE.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
  This NetBeans project for OpenJDK JMX allows you to modify, build, and test
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
  the JMX API in a standalone manner. It can also be used to generate 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
  the JMX API documentation for preview.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
  The JMX API does not contain native code. It is a pure java library. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
  You do not need to install all the Java SE sources to work on JMX,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
  you only need the following subset:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
            make/netbeans/
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
            src/share/classes/com/sun/jmx/
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
            src/share/classes/javax/management/
90ce3da70b43 Initial load
duke
parents:
diff changeset
    21
            test/TEST.ROOT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
            test/com/sun/management/
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
            test/java/lang/management/
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
            test/javax/management/
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
  If you don't want to build the whole JDK, you will also need a 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
  pre-built version of OpenJDK (or JDK 7). Edit your 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
            $HOME/.openjdk/build.properties
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
  file (create it if you don't have one yet) and set the bootstrap.jdk variable 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
  point to that JDK:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
            bootstrap.jdk=<JDK_7_HOME>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
  Then from within NetBeans IDE open the JMX project, and invoke the 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
  "Build Project" and "Test Project" target. Note that running all the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
  tests for JMX takes a while. The build may also fail if it doesn't 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
  find a directory named src/${platform}. This may happen if you haven't
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
  installed all OpenJDK sources. In this case, you can simply
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
  create an empty directory with the name expected by the build mechanism.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
         
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
  Which tests are run are defined by the jtreg.test variable declared
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
  in make/netbeans/jmx/build.properties. Note that JMX tests are all
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
  placed under test/javax/management/.   test/java/lang/management/
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
  and test/com/sun/management/ contain some tests that happen to
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
  use JMX and we therefore recommend to run these tests too.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
  If you are working on a JMX fix, don't forget to create a 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
  corresponding jtreg unit test under test/javax/management/. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
  You can look at existing tests to see how this is done.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
The set of actions defined in this project are:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
* Build Project:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
  - Compiles JMX API source files and puts the class files under
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
    build/${platform}-${arch}/classes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
  - Generates a JMX jar file under dist/lib/jmx.jar. To use your modified
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
    JMX classes instead of the built-in JDK classes you will need
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
    to put this jar file in front of the bootclasspath:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
       java -Xbootclasspath/p:dist/lib/jmx.jar mytestapp.MyAppMainClass
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
* Generate Javadoc for Project
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
  - Generates the JMX API Documentation under
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
    build/${platform}-${arch}/javadoc/jmx.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
* Test Project
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
  - Runs the JMX and Management and Monitoring jtreg unit tests.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
  - The results are written under build/${platform}-${arch}/jtreg/jmx
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
    and the HTML test report can be found at
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
    build/${platform}-${arch}/jtreg/jmx/JTreport/report.html.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
* Clean Project
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
  - Cleans the files created by this projet under build/ 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
    Some files may remain.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
IMPORTANT NOTE
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
  Please make sure to follow carefully the governance rules documented at
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
  http://openjdk.dev.java.net/
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90