Oracle will not release free Java after February. The government (Cabinet Secretariat Information and Communication Technology (IT) Comprehensive Strategy Office) has announced a policy of using Oracle's paid Java or updating OpenJDK every six months. https://cio.go.jp/sites/default/files/uploads/documents/technique_report_java.pdf
However, both developers and system users
I think. (Developers and users who do not use Java and uninstall it have begun to appear)
Especially for developers and users who maintain rich client applications using Java FX and Java Web Start, upgrading to Java 11 is not immediately acceptable.
There is support. I thought it would be a good idea to use these.
When I proceeded with the verification, I found a bug that does not occur in OracleJDK 8 but occurs in AdoptOpenJDK 8 / Amazon Corretto 8. Specifically, even if the characters are rotated, the Japanese characters are not rotated.
In case of Oracle JDK8, the character string is rotated correctly *
In the case of AdoptOpenJDK8 / Amazon Corretto, Japanese does not rotate and the appearance is broken *
I actually moved my hand. I was able to do it quickly on Linux, and I had trouble building on Windows, so I will describe building on Windows.
https://visualstudio.microsoft.com/ja/vs/older-downloads/ Download from.
There was a direct link URL on the Microsoft bulletin board, but it is unknown how long it will be available for download. http://download.microsoft.com/download/E/F/2/EF21D164-8A66-4F08-B71F-26702B180E11/VS2013_RTM_DskExp_JPN.iso
Please install it after downloading. There are almost no choices, just install it obediently.
After Visual Studio 2015, use the build preparation script (generated-configure.sh)
So please select Visual Studio 2013. With Visual Studio 2013 Express, there is no problem with corporate use.
https://cygwin.com/install.html Download the 64-bit version (setup-x86_64.exe) from.
Once downloaded, run and set up. I think that the "Choose Download Site" on the way will end early if you choose a Japanese http site. The packages to be added are as follows.
You also need the JDK to build. It is standard to use the stable JDK of the previous version, so this time I will download and install JDK 7 of Oracle. https://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html
You may copy the JDK 7 included with Pleiades etc. In this article D:\OpenJDK\jdk7 I copied the JDK to.
Freetype is a font drawing library. Required to build the Adopt OpenJDK. (It is included in OpenJDK 11 and seems unnecessary.)
You can build from source, but this time we will get the pre-built one. ~~ I am using Visual Studio 2013, so download vc12 64bit. https://www.opencascade.com/content/3rd-party-components~~
The latest version of the binary for Windows is below https://github.com/ubawurinna/freetype-windows-binaries
git clone https://github.com/ubawurinna/freetype-windows-binaries
You can also get the zip file.
In this article, the acquired files are listed. D:\OpenJDK\freetype I copied it below.
The configuration under freetype is
I think it is. If you want to make a 64-bit JDK, rename win64 to lib for build
Launch Cygwin64 Terminal.
git clone https://github.com/AdoptOpenJDK/openjdk-jdk8u
With AdoptOpenJDK8git clone https://github.com/corretto/corretto-8
On Amazon Corret 8You can get the source code of each.
~~ It turned out that the problem that the characters are not rotated, which is the problem this time, seems to have already been fixed in OpenJDK9. https://bugs.openjdk.java.net/browse/JDK-8163278?focusedCommentId=13999670&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-13999670 Patch on the above page https://bugs.openjdk.java.net/secure/attachment/63104/jdk9.patch I will try to reflect it obediently. Where to fix AdoptOpenJDK8 openjdk-jdk8u/jdk/src/share/native/sun/font/freetypeScaler.c is. ~~
It has already been fixed in JDK 11's freetypeScaler.c and backports this code. https://github.com/AdoptOpenJDK/openjdk-jdk11u/commit/f1bf238b695e0b4d49b8264b83228317ee75ebd3#diff-5c6198e34c46737fc7bf8f0eb5fff8d0
JDK11 freetypeScaler.c jdk/src/share/native/sun/font/freetypeScaler.c Overwritten on.
configure
Execute the following command at.
bash configure --with-boot-jdk=/cygdrive/d/OpenJDK/jdk7 --with-freetype=/cygdrive/d/OpenJDK/freetype --disable-debug-symbols --disable-zip-debug-info
--with-boot-jdk The location of the JDK --with-freetype Specifies the location of freetype.
--disable-debug-symbols --disable-zip-debug-info You can delete the debug information and reduce the file size of the resulting JRE / JDK by adding
At first, even if I did configure according to the above command, it didn't work.
I was thinking that "generated-configure.sh" was buggy, but suddenly I noticed a trap in the Windows file path.
In Windows, it is not necessary to escape with a backslash even if there is a space in the file path, but in Linux etc. it is necessary to escape. So, generated-configure.sh intentionally used the abbreviated file name of Windows, and devised not to handle half-width spaces. However, it seems that there are cases where the abbreviated file name is not created (from a version in the middle of Windows 10?).
I found it by checking "dir / x" at the command prompt.
fsutil file setshortname "Microsoft Visual Studio 12.0" MICROS~2
After registering the abbreviated name with the command, I was able to finish configure safely.
make
At
make images
given that,
build/windows-x86_64-normal-server-release/images/j2re-image
The image of JRE
build/windows-x86_64-normal-server-release/images/j2sdk-image
The image of the JDK is created in.
make images COMPRESS_JARS=true
You can then compress the generated image and reduce the file size.
Although it looks a little different from Oracle, we were able to fix the character rotation bug.
Fixed Adopt OpenJDK 8 / Amazon Corretto 8 *
For Oracle JDK 8 *
I think that the difference in appearance is due to the difference in the font drawing library (FreeType or F2T). https://github.com/AdoptOpenJDK/openjdk-build/wiki/Differences-between-Adopt-OpenJDK-binaries-and-Oracle-JDK-Binaries
AdoptOpenJDK is sponsored by many companies, and IBM and Microsoft are the strengths. https://adoptopenjdk.net/sponsors.html
Amazon Corretto is sensational, but so far it is only supported by one Amazon company and may be locked on to AWS. Pay attention to future developments.
I've just backported the already published patches to Adopt OpenJDK 8 / Amazon Corretto 8, but open source is great, considering that it might be useful to someone else in the world. Thank you to Oracle for giving me this opportunity!
Recommended Posts