33## TL;DR (Instructions for the Impatient)
44
55If you are eager to try out building the JDK, these simple steps works most of
6- the time. They assume that you have installed Mercurial (and Cygwin if running
6+ the time. They assume that you have installed Git (and Cygwin if running
77on Windows) and cloned the top-level JDK repository that you want to build.
88
99 1 . [ Get the complete source code] ( #getting-the-source-code ) : \
10- ` hg clone http ://hg .openjdk.java.net/jdk/jdk `
10+ ` git clone https ://git .openjdk.java.net/jdk/`
1111
1212 2 . [ Run configure] ( #running-configure ) : \
1313 ` bash configure `
4747
4848Make sure you are getting the correct version. As of JDK 10, the source is no
4949longer split into separate repositories so you only need to clone one single
50- repository. At the [ OpenJDK Mercurial server ] ( http ://hg .openjdk.java.net/) you
50+ repository. At the [ OpenJDK Git site ] ( https ://git .openjdk.java.net/) you
5151can see a list of all available repositories. If you want to build an older version,
52- e.g. JDK 8 , it is recommended that you get the ` jdk8u ` forest , which contains
53- incremental updates, instead of the ` jdk8 ` forest , which was frozen at JDK 8 GA.
52+ e.g. JDK 11 , it is recommended that you get the ` jdk11u ` repo , which contains
53+ incremental updates, instead of the ` jdk11 ` repo , which was frozen at JDK 11 GA.
5454
55- If you are new to Mercurial , a good place to start is the [ Mercurial Beginner's
56- Guide ] ( http ://www.mercurial -scm.org/guide ) . The rest of this document assumes a
57- working knowledge of Mercurial .
55+ If you are new to Git , a good place to start is the book [ Pro
56+ Git ] ( https ://git -scm.com/book/en/v2 ) . The rest of this document
57+ assumes a working knowledge of Git .
5858
5959### Special Considerations
6060
@@ -89,9 +89,7 @@ on where and how to check out the source code.
8989 directory. This is especially important if your user name contains
9090 spaces and/or mixed upper and lower case letters.
9191
92- * Clone the JDK repository using the Cygwin command line ` hg ` client
93- as instructed in this document. That is, do * not* use another Mercurial
94- client such as TortoiseHg.
92+ * Clone the JDK repository using [ Git for Windows] ( https://gitforwindows.org ) .
9593
9694 Failure to follow this procedure might result in hard-to-debug build
9795 problems.
@@ -173,7 +171,7 @@ likely be possible to support in a future version but that would require effort
173171to implement.)
174172
175173Internally in the build system, all paths are represented as Unix-style paths,
176- e.g. ` /cygdrive/c/hg/jdk9 /Makefile ` rather than ` C:\hg\jdk9 \Makefile ` . This
174+ e.g. ` /cygdrive/c/git/jdk /Makefile ` rather than ` C:\git\jdk \Makefile ` . This
177175rule also applies to input to the build system, e.g. in arguments to
178176` configure ` . So, use ` --with-msvcr-dll=/cygdrive/c/msvcr100.dll ` rather than
179177` --with-msvcr-dll=c:\msvcr100.dll ` . For details on this conversion, see the section
@@ -1237,14 +1235,14 @@ ERROR: Build failed for target 'hotspot' in configuration 'linux-x64' (exit code
12371235
12381236=== Output from failing command(s) repeated here ===
12391237* For target hotspot_variant-server_libjvm_objs_psMemoryPool.o:
1240- /localhome/hg/jdk9 -sandbox/hotspot/src/share/vm/services/psMemoryPool.cpp:1:1: error: 'failhere' does not name a type
1238+ /localhome/git/jdk -sandbox/hotspot/src/share/vm/services/psMemoryPool.cpp:1:1: error: 'failhere' does not name a type
12411239 ... (rest of output omitted)
12421240
1243- * All command lines available in /localhome/hg/jdk9 -sandbox/build/linux-x64/make-support/failure-logs.
1241+ * All command lines available in /localhome/git/jdk -sandbox/build/linux-x64/make-support/failure-logs.
12441242=== End of repeated output ===
12451243
12461244=== Make failed targets repeated here ===
1247- lib/CompileJvm.gmk:207: recipe for target '/localhome/hg/jdk9 -sandbox/build/linux-x64/hotspot/variant-server/libjvm/objs/psMemoryPool.o' failed
1245+ lib/CompileJvm.gmk:207: recipe for target '/localhome/git/jdk -sandbox/build/linux-x64/hotspot/variant-server/libjvm/objs/psMemoryPool.o' failed
12481246make/Main.gmk:263: recipe for target 'hotspot-server-libs' failed
12491247=== End of repeated output ===
12501248
@@ -1342,7 +1340,7 @@ order. Most issues will be solved at step 1 or 2.
13421340
13431341 1. Make sure your repository is up-to-date
13441342
1345- Run `hg pull -u ` to make sure you have the latest changes.
1343+ Run `git pull origin master ` to make sure you have the latest changes.
13461344
13471345 2. Clean build results
13481346
@@ -1367,13 +1365,13 @@ order. Most issues will be solved at step 1 or 2.
13671365 make
13681366 ```
13691367
1370- 4. Re-clone the Mercurial repository
1368+ 4. Re-clone the Git repository
13711369
1372- Sometimes the Mercurial repository gets in a state that causes the product
1370+ Sometimes the Git repository gets in a state that causes the product
13731371 to be un-buildable. In such a case, the simplest solution is often the
13741372 "sledgehammer approach": delete the entire repository, and re-clone it.
13751373 If you have local changes, save them first to a different location using
1376- `hg export `.
1374+ `git format-patch `.
13771375
13781376### Specific Build Issues
13791377
@@ -1418,33 +1416,6 @@ contact the Adoption Group. See the section on [Contributing to OpenJDK](
14181416
14191417## Hints and Suggestions for Advanced Users
14201418
1421- ### Setting Up a Repository for Pushing Changes (defpath)
1422-
1423- To help you prepare a proper push path for a Mercurial repository, there exists
1424- a useful tool known as [defpath](
1425- http://openjdk.java.net/projects/code-tools/defpath). It will help you setup a
1426- proper push path for pushing changes to the JDK.
1427-
1428- Install the extension by cloning
1429- `http://hg.openjdk.java.net/code-tools/defpath` and updating your `.hgrc` file.
1430- Here's one way to do this:
1431-
1432- ```
1433- cd ~
1434- mkdir hg-ext
1435- cd hg-ext
1436- hg clone http://hg.openjdk.java.net/code-tools/defpath
1437- cat << EOT >> ~ /.hgrc
1438- [ extensions]
1439- defpath=~ /hg-ext/defpath/defpath.py
1440- EOT
1441- ```
1442-
1443- You can now setup a proper push path using:
1444- ```
1445- hg defpath -d -u <your OpenJDK username >
1446- ```
1447-
14481419### Bash Completion
14491420
14501421The `configure` and `make` commands tries to play nice with bash command-line
@@ -1585,16 +1556,6 @@ instance, `make java.base JDK_FILTER=javax/crypto` (or, to combine methods,
15851556`make java.base-java-only JDK_FILTER=javax/crypto`) will limit the compilation
15861557to files in the `javax.crypto` package.
15871558
1588- ### Learn About Mercurial
1589-
1590- To become an efficient JDK developer, it is recommended that you invest in
1591- learning Mercurial properly. Here are some links that can get you started:
1592-
1593- * [Mercurial for git users](http://www.mercurial-scm.org/wiki/GitConcepts)
1594- * [The official Mercurial tutorial](http://www.mercurial-scm.org/wiki/Tutorial)
1595- * [hg init](http://hginit.com/)
1596- * [Mercurial: The Definitive Guide](http://hgbook.red-bean.com/read/)
1597-
15981559## Understanding the Build System
15991560
16001561This section will give you a more technical description on the details of the
0 commit comments