Building your own JDK in 10 steps by José Paumard

preview_player
Показать описание
The JDK is an open source project that you can download and build yourself! All the new things under work are available on Mercurial branches, that you can get and compile to test them before they are released. It allows you to play with them, see how they work, see what do the new syntaxes look like. In short: you can play now with a JDK from the future, that may never exist!

We will show how all this work, from the installation of a Ubuntu virtual machine to the execution of a home made JDK that will never be released.

José Paumard
Passionate about programming computers for over 20 years, Jose made his debut in assembler and C, C for SIMD parallel machines before adopting Java as an object-oriented language, indispensable to most major modern applications. He brings his expertise and capacity for analysis and synthesis to many projects, mainly in the lower layers, close to the data, but also on complex UI design, or in the browser. PhD in applied maths and computer science, assistant professor in Paris North University for 20 years, Java Champion, Java Rockstar, Jose also has a passion for education and knowledge transfer. He gives talks in major international Java conferences (JavaOne in San Francisco, Devoxx in Antwerp, Paris and London). He wrote numerous technical articles on Java technologies for Java Magazine, Oracle Technolgy Network. He writes a blog, Java le soir, French documentary source on Java technologies for thousands of french speaking developers around the world. He is a member of the french Paris Java User Group, and has been a co-organizer of the conference Devoxx France for three years.
Рекомендации по теме
Комментарии
Автор

To anyone building this in WSL, I tried on Windows 10 with Ubuntu 20.04 version. There were a couple of more failures than in the prensentation. :-)

Finally, these steps enabled me to build this beast:
1. Install the java 12, 13 or 14 JDK on Ubuntu (do a local installation, just like you would do on ordinary Ubuntu). Point to it in the configure step.
2. Disable treating C/C++ compilation warnings as errors.
3. (Most importantly) Force building a linux version. If you see the point where Jose is actually accessing the final build, you can see that it is the linux build. He is doing it on an Ubuntu VM which is "slightly different situation" than running Ubuntu on WSL. Apparently, the autoconf software used in the build process returns host_os="wsl" when ran on WSL Ubuntu. The configuration script gets this and translates this into doing a windows build. Then it fails on lacking Microsoft toolchain and all of other strange errors (lacking Visual Studio, WTF). So I just forced it to do the linux build and then it used a linux gcc toolchain. 🙂

Summing up, this command that incorporates all the three elements above:
./configure --build=x86_64-linux-gnu --disable-warnings-as-errors

Naturally, you need to provide the real path to the real Ubuntu installation of the jdk.

karolkotun
Автор

At least currently, it’s because there isn’t JDK21 for OpenBSD