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,21 @@ 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+ * You need to install a git client. You have two choices, Cygwin git or
93+ Git for Windows. Unfortunately there are pros and cons with each choice.
94+
95+ * The Cygwin ` git ` client has no line ending issues and understands
96+ Cygwin paths (which are used throughout the JDK build system).
97+ However, it does not currently work well with the Skara CLI tooling.
98+ Please see the [ Skara wiki on Git clients] (
99+ https://wiki.openjdk.java.net/display/SKARA/Skara#Skara-Git ) for
100+ up-to-date information about the Skara git client support.
101+
102+ * The [ Git for Windows] ( https://gitforwindows.org ) client has issues
103+ with line endings, and do not understand Cygwin paths. It does work
104+ well with the Skara CLI tooling, however. To alleviate the line ending
105+ problems, make sure you set ` core.autocrlf ` to ` false ` (this is asked
106+ during installation).
95107
96108 Failure to follow this procedure might result in hard-to-debug build
97109 problems.
@@ -173,7 +185,7 @@ likely be possible to support in a future version but that would require effort
173185to implement.)
174186
175187Internally 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
188+ e.g. ` /cygdrive/c/git/jdk /Makefile ` rather than ` C:\git\jdk \Makefile ` . This
177189rule also applies to input to the build system, e.g. in arguments to
178190` configure ` . So, use ` --with-msvcr-dll=/cygdrive/c/msvcr100.dll ` rather than
179191` --with-msvcr-dll=c:\msvcr100.dll ` . For details on this conversion, see the section
@@ -1244,14 +1256,14 @@ ERROR: Build failed for target 'hotspot' in configuration 'linux-x64' (exit code
12441256
12451257=== Output from failing command(s) repeated here ===
12461258* For target hotspot_variant-server_libjvm_objs_psMemoryPool.o:
1247- /localhome/hg/jdk9 -sandbox/hotspot/src/share/vm/services/psMemoryPool.cpp:1:1: error: 'failhere' does not name a type
1259+ /localhome/git/jdk -sandbox/hotspot/src/share/vm/services/psMemoryPool.cpp:1:1: error: 'failhere' does not name a type
12481260 ... (rest of output omitted)
12491261
1250- * All command lines available in /localhome/hg/jdk9 -sandbox/build/linux-x64/make-support/failure-logs.
1262+ * All command lines available in /localhome/git/jdk -sandbox/build/linux-x64/make-support/failure-logs.
12511263=== End of repeated output ===
12521264
12531265=== Make failed targets repeated here ===
1254- lib/CompileJvm.gmk:207: recipe for target '/localhome/hg/jdk9 -sandbox/build/linux-x64/hotspot/variant-server/libjvm/objs/psMemoryPool.o' failed
1266+ lib/CompileJvm.gmk:207: recipe for target '/localhome/git/jdk -sandbox/build/linux-x64/hotspot/variant-server/libjvm/objs/psMemoryPool.o' failed
12551267make/Main.gmk:263: recipe for target 'hotspot-server-libs' failed
12561268=== End of repeated output ===
12571269
@@ -1349,7 +1361,7 @@ order. Most issues will be solved at step 1 or 2.
13491361
13501362 1. Make sure your repository is up-to-date
13511363
1352- Run `hg pull -u ` to make sure you have the latest changes.
1364+ Run `git pull origin master ` to make sure you have the latest changes.
13531365
13541366 2. Clean build results
13551367
@@ -1374,13 +1386,13 @@ order. Most issues will be solved at step 1 or 2.
13741386 make
13751387 ```
13761388
1377- 4. Re-clone the Mercurial repository
1389+ 4. Re-clone the Git repository
13781390
1379- Sometimes the Mercurial repository gets in a state that causes the product
1391+ Sometimes the Git repository gets in a state that causes the product
13801392 to be un-buildable. In such a case, the simplest solution is often the
13811393 "sledgehammer approach": delete the entire repository, and re-clone it.
13821394 If you have local changes, save them first to a different location using
1383- `hg export `.
1395+ `git format-patch `.
13841396
13851397### Specific Build Issues
13861398
@@ -1425,33 +1437,6 @@ contact the Adoption Group. See the section on [Contributing to OpenJDK](
14251437
14261438## Hints and Suggestions for Advanced Users
14271439
1428- ### Setting Up a Repository for Pushing Changes (defpath)
1429-
1430- To help you prepare a proper push path for a Mercurial repository, there exists
1431- a useful tool known as [defpath](
1432- http://openjdk.java.net/projects/code-tools/defpath). It will help you setup a
1433- proper push path for pushing changes to the JDK.
1434-
1435- Install the extension by cloning
1436- `http://hg.openjdk.java.net/code-tools/defpath` and updating your `.hgrc` file.
1437- Here's one way to do this:
1438-
1439- ```
1440- cd ~
1441- mkdir hg-ext
1442- cd hg-ext
1443- hg clone http://hg.openjdk.java.net/code-tools/defpath
1444- cat << EOT >> ~ /.hgrc
1445- [ extensions]
1446- defpath=~ /hg-ext/defpath/defpath.py
1447- EOT
1448- ```
1449-
1450- You can now setup a proper push path using:
1451- ```
1452- hg defpath -d -u <your OpenJDK username >
1453- ```
1454-
14551440### Bash Completion
14561441
14571442The `configure` and `make` commands tries to play nice with bash command-line
@@ -1592,16 +1577,6 @@ instance, `make java.base JDK_FILTER=javax/crypto` (or, to combine methods,
15921577`make java.base-java-only JDK_FILTER=javax/crypto`) will limit the compilation
15931578to files in the `javax.crypto` package.
15941579
1595- ### Learn About Mercurial
1596-
1597- To become an efficient JDK developer, it is recommended that you invest in
1598- learning Mercurial properly. Here are some links that can get you started:
1599-
1600- * [Mercurial for git users](http://www.mercurial-scm.org/wiki/GitConcepts)
1601- * [The official Mercurial tutorial](http://www.mercurial-scm.org/wiki/Tutorial)
1602- * [hg init](http://hginit.com/)
1603- * [Mercurial: The Definitive Guide](http://hgbook.red-bean.com/read/)
1604-
16051580## Understanding the Build System
16061581
16071582This section will give you a more technical description on the details of the
0 commit comments