Build OpenJDK8 on Windows

Source: Internet
Author: User
Tags mercurial

A simple step

1. MinGW + Msys: I have already sorted out the direct decompression can be http://pan.baidu.com/s/1bncptlt

2. OpenJDK8 Source code: Http://pan.baidu.com/s/1eQtKkeQ which includes freetype and an environment bat

If you want to update to the latest JDK8 source, install HG, unzip and run jdk8/src/get_source.sh. This package does not destroy the Hg file

3. Install VS2010 and SP1, no SP1 patch will have link error

4. Modify the Jdk8/hg_env.bat to make the environment variable Hg (mercurial Hg), MINGW, BOOST_STARP_JDK, etc. point to the correct directory. Run Hg_env.bat

5. Running Configure

bash./configure--enable-debug--with-num-cores=4--with-target-bits=64--with-freetype=.. /freetypeIf you are not prompted to find Msvcr100.dll, modify the jdk8\src\common\autoconf\generated-configure.sh and replace "correct_msvcr_arch=x86-64" with "CORR Ect_msvcr_arch=ms "

6. make all


Supplement1. Download a mingw Here, 64-bithttp://ncu.dl.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win32/Personal%20Builds/ Mingw-builds/installer/mingw-w64-install.exe download Msys, integrate into MinGWDownload a mingw-get.exe, copy to MinGW bin RunMingw-get.exe Install Msys-zipMingw-get.exe Install Msys-unzipMingw-get.exe Install msys-mktempdownload Cpio.exe, put in Msys2. http://hg.openjdk.java.net/jdk8/jdk8 here to download a zip package, after decompression run get_source.sh download the latest source, my Baidu Jdk8 package has been downloaded good source, can be used directly.of course, install the mercurial Hg http://mercurial.selenic.com/downloads in advance .2.1 Download Compilation FreeTypeI am using CMake to generate VS2010 project, and then compile release, to noteA. Modify Makelist.txt, add GKFX to Add_library (...), default is static Lib B. Modify a header file, in the macro definition ft_export plus __declspec (dllexport  )

#ifndef
Ft_export
#ifdef
__cplusplus
#define
Ft_export (x) __declspec (dllexport ) extern "C" X
#else
#define
ft_export (x) __declspec (dllexport ) extern x
#endif
#endif
/* ! Ft_export * *

c. Under the FreeType directory

mkdir BUILDCD buildcmake-g "Visual Studio ten Win64". /d. Compile it. Finally, the dll Lib copy to FreeType under the Lib directory, in step 5--with-freetype points to this freetype path
you can refer to Source's readme-builds.html, of course, if the document is completely correct, I will not do this record.

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.