jdk/make/netbeans/README
changeset 10601 c496d54879f4
parent 7666 7b994e3dd41d
equal deleted inserted replaced
10600:558b97746312 10601:c496d54879f4
     3     provided several NetBeans projects as starting points. Below we'll
     3     provided several NetBeans projects as starting points. Below we'll
     4     describe how to use them, as well as how to create your own.
     4     describe how to use them, as well as how to create your own.
     5 
     5 
     6 Getting Started
     6 Getting Started
     7     In addition to the source bundle for Open JDK, you'll need to download
     7     In addition to the source bundle for Open JDK, you'll need to download
     8     and install copies of the JDK and of NetBeans 6. And if you want to run
     8     and install copies of the JDK and of NetBeans. And if you want to run
     9     tests on the JDK (you do want to run tests, right?), you'll need to
     9     tests on the JDK (you do want to run tests, right?), you'll need to
    10     install the jtreg test harness.
    10     install the jtreg test harness.
    11 
    11 
    12     In this note, when pathnames are not fully specified, they should be
    12     In this note, when pathnames are not fully specified, they should be
    13     interpreted as being relative to the directory containing this README
    13     interpreted as being relative to the directory containing this README
    18         "Program Files". Please be sure to install everything in a
    18         "Program Files". Please be sure to install everything in a
    19         directories whose paths don't have any spaces!
    19         directories whose paths don't have any spaces!
    20 
    20 
    21     Downloading the JDK
    21     Downloading the JDK
    22         You've probably done this a million times. Download and install it
    22         You've probably done this a million times. Download and install it
    23         from http://java.sun.com/javase
    23         from http://www.oracle.com/technetwork/java/javase/overview/index.html
    24 
    24 
    25     Downloading the OpenJDK sources
    25     Downloading the OpenJDK sources
    26         Since you're reading this, d you've already downloaded the OpenJDK
    26         Since you're reading this, d you've already downloaded the OpenJDK
    27         source bundle.  Later in this document we'll refer to the location
    27         source bundle.  Later in this document we'll refer to the location
    28         where you installed the Open JDK sources as *install-dir*.
    28         where you installed the Open JDK sources as *install-dir*.
    29 
    29 
    30     Downloading a pre-built, JDK 7
    30     Downloading a pre-built, JDK 8
    31         This will be necessary to do builds of some of the projects.  In
    31         This will be necessary to do builds of some of the projects.  In
    32         general, you want to download and install a pre-built JDK that
    32         general, you want to download and install a pre-built JDK that
    33         corresponds to the OpenJDK sources you download.  Building the entire
    33         corresponds to the OpenJDK sources you download.  Building the entire
    34         OpenJDK depends on a few parts of the pre-built JDK.  Get this from
    34         OpenJDK depends on a few parts of the pre-built JDK.  Get this from
    35         http://download.java.net/jdk7/binaries
    35         http://download.java.net/jdk8/binaries
    36 
    36 
    37         Note: For working on certain projects, like JMX and JConsole, you 
    37         Note: For working on certain projects, like JMX and JConsole, you
    38               may find convenient to use a pre-built version of JDK 7 (or 
    38               may find convenient to use a pre-built version of JDK 8 (or
    39               OpenJDK) rather than building your own. This will allow you
    39               OpenJDK) rather than building your own. This will allow you
    40               to build only that part of the OpenJDK sources which correspond
    40               to build only that part of the OpenJDK sources which correspond
    41               to that project. 
    41               to that project.
    42 
    42 
    43     NetBeans 6
    43     NetBeans 7.0 or later
    44         Yep, NetBeans *6*. Nope, not FCS'd yet. We're on the edge here,
    44         Older versions may also work but are unsupported.
    45         enjoy it! Get the latest working development build of NetBeans 6
       
    46         from http://netbeans.org
       
    47 
    45 
    48     jtreg
    46     jtreg
    49         "jtreg" is the test harness for running OpenJDK's regression tests.
    47         "jtreg" is the test harness for running OpenJDK's regression tests.
    50         Get it from http://openjdk.java.net/jtreg
    48         Get it from http://openjdk.java.net/jtreg
    51 
    49 
    52     Ant
    50     Ant
    53        NetBeans comes with ant, but if you use a separately-installed copy
    51        NetBeans comes with ant, but if you use a separately-installed copy
    54        please make sure that it is at least version 1.7.0.
    52        please make sure that it is at least version 1.8.1.
    55 
    53 
    56 Configuring
    54 Configuring
    57     Building OpenJDK is hard and complex. No, strike that. While it's not
    55     Building OpenJDK is hard and complex. No, strike that. While it's not
    58     exactly "easy", we've got it down to *relatively* small set of
    56     exactly "easy", we've got it down to *relatively* small set of
    59     properties you need to set.
    57     properties you need to set.
    90         The make.options property is for passing information about what you
    88         The make.options property is for passing information about what you
    91         installed where to make.  Change the paths to fit your particular
    89         installed where to make.  Change the paths to fit your particular
    92         situation:
    90         situation:
    93 
    91 
    94         make.options=\
    92         make.options=\
    95             ALT_BOOTDIR=/home/me/bin/jdk1.6.0 \
    93             ALT_BOOTDIR=/home/me/bin/jdk1.7.0 \
    96             ALT_JDK_IMPORT_PATH=/home/me/bin/jdk1.7.0 \
    94             ALT_JDK_IMPORT_PATH=/home/me/bin/jdk1.8.0 \
    97             OPENJDK=true
    95             OPENJDK=true
    98 
    96 
    99         The trailing '\' are important, so that make gets the above as a
    97         The trailing '\' are important, so that make gets the above as a
   100         single set of options.
    98         single set of options.
   101 
    99 
   105         to read much more about building the JDK.
   103         to read much more about building the JDK.
   106 
   104 
   107   Windows-specific configuration
   105   Windows-specific configuration
   108     First, please note that the entire JDK cannot currently be built on
   106     First, please note that the entire JDK cannot currently be built on
   109     Windows platforms.  This will likely limit your ability to build
   107     Windows platforms.  This will likely limit your ability to build
   110     make-based projects.  See 
   108     make-based projects.  See
   111          *install-dir*/jdk/make/README-builds.html
   109          *install-dir*/jdk/make/README-builds.html
   112     for full information on issues with building on the Windows platform.
   110     for full information on issues with building on the Windows platform.
   113 
   111 
   114     That said, there are two ways to work with the Windows-required settings
   112     That said, there are two ways to work with the Windows-required settings
   115     for the Microsoft tools. Either:
   113     for the Microsoft tools. Either:
   139     If you use the NetBeans GUI to examine them, things are likely to not
   137     If you use the NetBeans GUI to examine them, things are likely to not
   140     look "right". Please don't edit them there, please instead use a text
   138     look "right". Please don't edit them there, please instead use a text
   141     editor.
   139     editor.
   142 
   140 
   143   Locale Requirements
   141   Locale Requirements
   144     To build the Open JDK sources, be certain that you are using the "C"
   142     To build the OpenJDK sources, be certain that you are using the "C"
   145     locale on Unix (R) platforms, or "English (United States)" locale on
   143     locale on Unix (R) platforms, or "English (United States)" locale on
   146     Windows.
   144     Windows.
   147 
   145 
   148 Platforms and architectures, oh my!
   146 Platforms and architectures, oh my!
   149     The Open JDK can be built for a variety of operating system platforms
   147     The Open JDK can be built for a variety of operating system platforms
   218     JConsole (directory "jconsole")
   216     JConsole (directory "jconsole")
   219         For working on JConsole. Creates ../dist/lib/jconsole.jar. Supports
   217         For working on JConsole. Creates ../dist/lib/jconsole.jar. Supports
   220         running and debugging JConsole.
   218         running and debugging JConsole.
   221 
   219 
   222         This ant-based project does *not* require that you build the jdk
   220         This ant-based project does *not* require that you build the jdk
   223         project first, provided that you use a pre-built version of JDK 7. 
   221         project first, provided that you use a pre-built version of JDK 7.
   224 
   222 
   225     Java (TM) Management Extensions (JMX(TM)) API (directory "jmx")
   223     Java (TM) Management Extensions (JMX(TM)) API (directory "jmx")
   226         For working on JMX source code. Creates ../dist/lib/jmx.jar.
   224         For working on JMX source code. Creates ../dist/lib/jmx.jar.
   227 
   225 
   228         This ant-based project does *not* require that you build the jdk
   226         This ant-based project does *not* require that you build the jdk
   229         project first, provided that you use a pre-built version of JDK 7. 
   227         project first, provided that you use a pre-built version of JDK 7.
   230 
   228 
   231     Jar & Zip (directory "jarzip")
   229     Jar & Zip (directory "jarzip")
   232         For working on jar & zip. It builds the zip library (including
   230         For working on jar & zip. It builds the zip library (including
   233         native code), the jar library, and the jar tool. Creates an
   231         native code), the jar library, and the jar tool. Creates an
   234         executable jar program in ../build/*platform*-*arch*/bin/jar.
   232         executable jar program in ../build/*platform*-*arch*/bin/jar.
   240     Swing (directory "swing")
   238     Swing (directory "swing")
   241         For working on Swing. Creates ../dist/lib/swing.jar. Supports
   239         For working on Swing. Creates ../dist/lib/swing.jar. Supports
   242         running and debugging the SampleTree demo.
   240         running and debugging the SampleTree demo.
   243 
   241 
   244         This ant-based project does *not* require that you build the jdk
   242         This ant-based project does *not* require that you build the jdk
   245         project first, provided that you use a pre-built version of JDK 7. 
   243         project first, provided that you use a pre-built version of JDK 7.
   246 
   244 
   247     In addition, there are projects for building the compiler, javadoc,
   245     In addition, there are projects for building the compiler, javadoc,
   248     and related tools, in the OpenJDK langtools component.  These
   246     and related tools, in the OpenJDK langtools component.  These
   249     projects are separate from those described here, and have their
   247     projects are separate from those described here, and have their
   250     own set of guidelines and conventions. For more details, see the 
   248     own set of guidelines and conventions. For more details, see the
   251     README files in make/netbeans in the OpenJDK langtools component.
   249     README files in make/netbeans in the OpenJDK langtools component.
   252 
   250 
   253 Running Tests
   251 Running Tests
   254     We use the jtreg test harness, described more fully at
   252     We use the jtreg test harness, described more fully at
   255     http://openjdk.java.net/jtreg
   253     http://openjdk.java.net/jtreg
   601 
   599 
   602     * -build-make
   600     * -build-make
   603     * -clean-make
   601     * -clean-make
   604 
   602 
   605 Known Issues
   603 Known Issues
   606   Tests won't run: waiting for lock
       
   607     Occasionally when running tests, there will be a delay, followed by a
       
   608     message like this:
       
   609         Waiting to lock test result cache for
       
   610            /tmp/jdk/build/linux-i586/jtreg/jconsole/JTwork for 20 seconds
       
   611     The workaround is to stop the tests, rm -rf the offending jtreg/<project>
       
   612     directory by hand, and re-run the tests.
       
   613 
   604 
   614   Can't run nor debug a single test in the JConsole test
   605   Can't run nor debug a single test in the JConsole test
   615     In most projects, you can run a single test by opening it in the editor,
   606     In most projects, you can run a single test by opening it in the editor,
   616     and choosing Run File from the context menu.  If you try this with the a
   607     and choosing Run File from the context menu.  If you try this with the a
   617     JConsole test, instead you'll see that *all* tests from *all* projects
   608     JConsole test, instead you'll see that *all* tests from *all* projects