64-bit windows8.1 compiled OPENJDK8

Source: Internet
Author: User
Tags mercurial

First download Openjdk8
http://hg.openjdk.java.net/jdk8/jdk8/
Here is the version management tool mercurial, similar to Git, you can check if you don't know.
Clone, there is a file readme-builds.html, inside said more detailed, is the main reference document.
The jdk8 after clone needs to run SH./get_source.sh to get the full code.


My compilation environment and preparation (here is an example of compiling a 32-bit openjdk):
win8.1 64-bit
MinGW (official website http://www.mingw.org/, here 3.82.90, note the download time selected Msys)
FreeType (a font engine, Oracle
JDK does not open source its font, so openjdk with open source FreeType, official website http://www.freetype.org/, here is freetype2.6)
Visual Studio (the Windows version of OPENJDK will use its compiler, which uses express
Version. Http://download.microsoft.com/download/1/E/5/1E5F1C0A-0D5B-426A-A603-1798B951DDAE/VS2010Express1.iso
SP1 Patch: Http://download.microsoft.com/download/E/B/A/EBA0A152-F426-47E6-9E3F-EFB686E3CA20/VS2010SP1dvd1.iso)
jdk1.7 (to update more than 7 versions, the Jdk-7u45-windows-x64.exe used here)

Compile process:
1, compile FreeType, open Directory \freetype2\builds\windows\vc2010, directly with vs2010 open Freetype.sln compile.
Note the property settings:
Compile 64-bit:
Configuration Manager, Active solution Manager, Type or select the new Platform, x64
Configuration--Release multithreaded
Platform-x64
Output Directory-Rename ". \. \.. \.. \objs\win32\vc2010\ "to". \. \.. \.. \objs\win64\vc2010\ "
Intermediate Directory, rename ". \. \.. \.. \objs\release_mt\ "to". \. \.. \.. \objs\release_mt_64\ "
Target Name, rename to "FreeType"
Platform Toolset-WINDOWS7.1SDK

Compile 32-bit:
Configuration--Release multithreaded
Platform-Win32
Target Name, rename to "FreeType"
Platform Toolset-V100
This compiles 32 bits, which are compiled into Freetype.dll and Freetype.lib, respectively.
Create a folder in the Freetype2 directory lib, copy the two files (note: Compile openjdk8 Only use these two files).

2. Get OPENJDK Source code:
Open Msys, into the JDK8 directory just clone, my in the D packing directory, so

cd/d/jdk8sh ./get_source. SH

(Get the source code may be some slow, can not mercurial, directly download http://download.java.net/openjdk/jdk8, but not the latest)

Note:
JDK8U, it may be troublesome to obtain with SH/get_source.sh, for example, the Chinese operating system will report
Error:could not determine Mercurial version of ...
At this time add a system environment variable language, the value of en is possible.
If downloaded directly, the current package can only be downloaded to Jdk8u40,https://www.java.net/download/openjdk/jdk8u40/ri/openjdk-8u40-src-b25-10_feb_2015.zip , relatively older.

3, configure
Freetype2 I also put in the D packing directory, so

Bash./configure--with-freetype=. /freetype2--with-target-bits=

This time you will notice fewer commands to run

Install msys-zip  mingwinstall msys-unzip

There are other packages, what you need, what to do, and what to do when you run bash./configure will be prompted.

If Cpio.exe is missing, you can rename the Bsdcpio.exe to Cpio.exe.

4. Compiling openjdk8
Configure success, modify the D:\jdk8\build\windows-x86-normal-server-release\spec.gmk file in the value of jobs 1 (jobs?=1), jobs more compile does not pass, The description of jobs is referenced in readme-builds.html.
Run command

 make all


Or do not modify the file, directly

 make all jobs=1


After the compilation is successful, review the results
D:\jdk8\build\windows-x86-normal-server-release\images\j2sdk-image
The official test process, you can try to test the test.

64-bit windows8.1 compiled OPENJDK8

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.