SlideShare a Scribd company logo
1 of 30
Download to read offline
#DevoxxFR
Building Your Own
JDK In 10 Steps
José Paumard
@JosePaumard
#Devoxx @JosePaumard
Why building your own JDK?
For the fun of it!
You can build JDKs that do not exist yet!
And that will never exist!!
Are they really JDKs though? Hmmm… (TCK?)
#Devoxx @JosePaumard
Why building your own JDK?
And in fact you do not have to do it yourself!
#Devoxx @JosePaumard
Why building your own JDK?
And you can even get…
#Devoxx @JosePaumard
Why building your own JDK?
https://hg.openjdk.java.net/
Top level repository of the Open JDK
65 projets available:
- amber, valhalla, loom, panama
- graal
- duke
#Devoxx @JosePaumard
Are you really building a JDK?
In fact no…
There is this TCK = Test Compatibility Kit
You need a licence to run it
LondonJug (LJC): Adopt OpenJDK
https://adoptopenjdk.net/
12 plateforms, 6 versions, 2 JVM
#Devoxx @JosePaumard
Let us start!
It needs some intallations
- Starting with Ubuntu Desktop 18.04
- Mercurial is not in the default installation
$ sudo apt-get install mercurial
#Devoxx @JosePaumard
Structure of the repository
http://hg.openjdk.java.net/valhalla/
#Devoxx @JosePaumard
Structure of the repository
http://hg.openjdk.java.net/amber/
#Devoxx @JosePaumard
Structure of the repository
http://hg.openjdk.java.net/loom/
#Devoxx @JosePaumard
Structure of the repository
http://hg.openjdk.java.net/loom/loom/
#Devoxx @JosePaumard
This is loom we want!
$ hg clone http://hg.openjdk.java.net/loom/loom/
ubuntu@ubuntu:~/jdk-builds/loom$ ls -l
total 60
-rw-r--r-- 1 ubuntu ubuntu 2114 Apr 10 11:51 ADDITIONAL_LICENSE_INFO
-rw-r--r-- 1 ubuntu ubuntu 1522 Apr 10 11:51 ASSEMBLY_EXCEPTION
drwxr-xr-x 3 ubuntu ubuntu 4096 Apr 10 11:51 bin
-rw-r--r-- 1 ubuntu ubuntu 1649 Apr 10 11:51 configure
drwxr-xr-x 3 ubuntu ubuntu 4096 Apr 10 11:51 doc
-rw-r--r-- 1 ubuntu ubuntu 19274 Apr 10 11:51 LICENSE
drwxr-xr-x 23 ubuntu ubuntu 4096 Apr 10 11:51 make
-rw-r--r-- 1 ubuntu ubuntu 2785 Apr 10 11:51 Makefile
-rw-r--r-- 1 ubuntu ubuntu 341 Apr 10 11:51 README
drwxr-xr-x 78 ubuntu ubuntu 4096 Apr 10 11:51 src
drwxr-xr-x 14 ubuntu ubuntu 4096 Apr 10 11:51 test
#Devoxx @JosePaumard
This is loom we want!
$ hg clone http://hg.openjdk.java.net/loom/loom/
$ du -s *
2542764 loom
2555176 valhalla
#Devoxx @JosePaumard
Here the repo is not up to date
Updating a local repo
$ hg branches
fibers 54840:2c84b04740e1
processorid 54156:df063b0c6b16
cont 54839:8d1717a86bcc (inactive)
default 54838:9d0ae9508d53 (inactive)
#Devoxx @JosePaumard
Updating a local repo
$ hg pull
pulling from http://hg.openjdk.java.net/loom/loom/
searching for changes
adding changesets
adding manifests
adding file changes
added 1692 changesets with 11645 changes to 7333 files
new changesets 283cecb991fa:27a4185098e8
(run 'hg update' to get a working copy)
$ hg branches
fibers 56532:27a4185098e8
processorid 55689:7e07b78cbf78
cont 56531:9ae91a14c0f7 (inactive)
default 56521:ececb6dae777 (inactive)
#Devoxx @JosePaumard
Branches
For Amber
$ hg branches
records 58586:367756dce66a
local-methods 58581:ef0e9ad164da
lambda-leftovers 58561:a9d1988be315
stats-before-this-super 58560:8c5aafc6c2c1
pattern-runtime 58559:83136411a3a0
records-and-sealed 58352:e62676fdb665
patterns-stage-1 58335:449afd3008d5
amber-demo-II 57904:c3e3f3b41490
patterns-deconstruction 57856:aa7b2dbc1a2a
concise-method-declarations 56872:e16b2019df86
enhanced-enums 56869:d521c8687ea8
default 58558:1bd307ea5497 (inactive)
patterns 57025:a898dc684456 (inactive)
#Devoxx @JosePaumard
Choosing a branch
For Amber
$ hg amber-demo-II
records 58586:367756dce66a
local-methods 58581:ef0e9ad164da
lambda-leftovers 58561:a9d1988be315
stats-before-this-super 58560:8c5aafc6c2c1
pattern-runtime 58559:83136411a3a0
records-and-sealed 58352:e62676fdb665
patterns-stage-1 58335:449afd3008d5
amber-demo-II 57904:c3e3f3b41490
patterns-deconstruction 57856:aa7b2dbc1a2a
concise-method-declarations 56872:e16b2019df86
enhanced-enums 56869:d521c8687ea8
default 58558:1bd307ea5497 (inactive)
patterns 57025:a898dc684456 (inactive)
#Devoxx @JosePaumard
Configuring the compilation
Autoconf FTW!
$ ./configure
Runnable configure script is not present
Generating runnable configure script at /home/ubuntu/jdk-builds/loom/build/.configure-
support/generated-configure.sh
Autoconf is not found on the PATH, and AUTOCONF is not set.
You need autoconf to be able to generate a runnable configure script.
You might be able to fix this by running 'sudo apt-get install autoconf’.
$ sudo apt-get install autoconf
#Devoxx @JosePaumard
Configuring the compilation
Autoconf FTW!
$ ./configure
configure: error: Cannot find GNU make 3.81 or newer! Please put it in the path, or add
e.g. MAKE=/opt/gmake3.81/make as argument to configure.
$ sudo apt-get install make
#Devoxx @JosePaumard
Configuring the compilation
Autoconf FTW!
$ ./configure
configure: error: Could not find a C compiler. You might be able to fix this by running
'sudo apt-get install build-essential'.
configure exiting with result code 1
$ sudo apt-get install build-essential (117Mo)
#Devoxx @JosePaumard
Configuring the compilation
Autoconf FTW…
$ ./configure
configure: error: Could not find X11 libraries. You might be able to fix this by running
'sudo apt-get install libx11-dev libxext-dev libxrender-dev libxrandr-dev libxtst-dev
libxt-dev'.
configure exiting with result code 1
$ sudo apt-get install libx11-dev libxext-dev libxrender-dev libxrandr-dev libxtst-dev
libxt-dev (20Mo)
#Devoxx @JosePaumard
Configuring the compilation
Autoconf FTW??
$ ./configure
configure: error: Could not find cups! You might be able to fix this by running 'sudo
apt-get install libcups2-dev'.
configure exiting with result code 1
$ sudo apt-get install libcups2-dev
#Devoxx @JosePaumard
Configuring the compilation
Autoconf FTW 
$ ./configure
configure: error: Could not find alsa! You might be able to fix this by running 'sudo
apt-get install libasound2-dev'.
configure exiting with result code 1
$ sudo apt-get install libasound2-dev
#Devoxx @JosePaumard
Configuring the compilation
Autoconf FTW ☺
A new configuration has been successfully created in
/home/ubuntu/jdk-builds/loom/build/linux-x86_64-server-release
using default settings.
Configuration summary:
* Debug level: release
* HS debug level: product
* JVM variants: server
* JVM features: server: 'aot cds cmsgc compiler1 compiler2 epsilongc g1gc graal jfr jni-check jvmci jvmti management
nmt parallelgc serialgc services shenandoahgc vm-structs zgc'
* OpenJDK target: OS: linux, CPU architecture: x86, address length: 64
* Version string: 13-internal+0-adhoc.ubuntu.amber (13-internal)
Tools summary:
* Boot JDK: openjdk version "12" 2019-03-19 OpenJDK Runtime Environment (build 12+33) OpenJDK 64-Bit Server VM
(build 12+33, mixed mode, sharing) (at /home/ubuntu/jdk/jdk-12)
* Toolchain: gcc (GNU Compiler Collection)
* C Compiler: Version 7.3.0 (at /usr/bin/gcc)
* C++ Compiler: Version 7.3.0 (at /usr/bin/g++)
Build performance summary:
* Cores to use: 4
* Memory limit: 7953 MB
#Devoxx @JosePaumard
Launching the compilation
Make FTW! (make clean first…)
$ make images
Building target 'images' in configuration 'linux-x86_64-server-release'
Compiling 8 files for BUILD_TOOLS_LANGTOOLS
Compiling 1 files for BUILD_JFR_TOOLS
Creating hotspot/variant-server/tools/adlc/adlc from 13 file(s)
Compiling 2 files for BUILD_JVMTI_TOOLS
...
#Devoxx @JosePaumard
Launching the compilation
Make FTW!
$ make images
...
Creating support/demos/image/jfc/SampleTree/SampleTree.jar
Creating support/demos/image/jfc/TableExample/TableExample.jar
Creating support/demos/image/jfc/TransparentRuler/TransparentRuler.jar
Creating jdk image
Creating CDS archive for jdk image
Stopping sjavac server
Finished building target 'images' in configuration 'linux-x86_64-server-release'
$ du -s *
6287440 loom
6358412 amber
#Devoxx @JosePaumard
Result?
The result is in server-release/images/jdk/
$ ls -l build/linux-x86_64-server-release
total 120
-rw-r--r-- 1 ubuntu ubuntu 2663 Apr 15 02:21 bootcycle-spec.gmk
-rw-r--r-- 1 ubuntu ubuntu 7869 Apr 15 02:21 buildjdk-spec.gmk
-rw-r--r-- 1 ubuntu ubuntu 17895 Apr 15 02:31 build.log
drwxr-xr-x 19 ubuntu ubuntu 4096 Apr 15 02:31 buildtools
-rwxr-xr-x 1 ubuntu ubuntu 3908 Apr 15 02:21 compare.sh
-rw-r--r-- 1 ubuntu ubuntu 14971 Apr 15 02:21 configure.log
drwxr-xr-x 2 ubuntu ubuntu 4096 Apr 15 02:21 configure-support
drwxr-xr-x 3 ubuntu ubuntu 4096 Apr 15 02:22 hotspot
drwxr-xr-x 5 ubuntu ubuntu 4096 Apr 15 02:31 images
drwxr-xr-x 8 ubuntu ubuntu 4096 Apr 15 02:31 jdk
-rw-r--r-- 1 ubuntu ubuntu 1261 Apr 15 02:21 Makefile
drwxr-xr-x 6 ubuntu ubuntu 4096 Apr 15 02:22 make-support
-rw-r--r-- 1 ubuntu ubuntu 33489 Apr 15 02:21 spec.gmk
drwxr-xr-x 22 ubuntu ubuntu 4096 Apr 15 02:31 support
#Devoxx @JosePaumard
Result?
Result!
$ export JAVA_HOME= .../amber/build/linux-x86_64-server-release/images/jdk
$ export PATH=$JAVA_HOME/bin:$PATH
$ java –version
openjdk version "13-internal" 2019-09-17
OpenJDK Runtime Environment (build 13-internal+0-adhoc.ubuntu.amber)
OpenJDK 64-Bit Server VM (build 13-internal+0-adhoc.ubuntu.amber, mixed mode, sharing)
#Devoxx @JosePaumard
Wrapping up
A little tricky…
A little long!
Needs to make your hand dirty to test new functionalities
You will be fighting against your IDE, and you will loose!
But you can follow what is going on in real-time ☺
#DevoxxFR
It’s your turn!
José Paumard
@JosePaumard

More Related Content

More from José Paumard

More from José Paumard (20)

Construire son JDK en 10 étapes
Construire son JDK en 10 étapesConstruire son JDK en 10 étapes
Construire son JDK en 10 étapes
 
Java Keeps Throttling Up!
Java Keeps Throttling Up!Java Keeps Throttling Up!
Java Keeps Throttling Up!
 
Lambdas and Streams Master Class Part 2
Lambdas and Streams Master Class Part 2Lambdas and Streams Master Class Part 2
Lambdas and Streams Master Class Part 2
 
Lambda and Stream Master class - part 1
Lambda and Stream Master class - part 1Lambda and Stream Master class - part 1
Lambda and Stream Master class - part 1
 
Asynchronous Systems with Fn Flow
Asynchronous Systems with Fn FlowAsynchronous Systems with Fn Flow
Asynchronous Systems with Fn Flow
 
Java Full Throttle
Java Full ThrottleJava Full Throttle
Java Full Throttle
 
JAX-RS and CDI Bike the (Reactive) Bridge
JAX-RS and CDI Bike the (Reactive) BridgeJAX-RS and CDI Bike the (Reactive) Bridge
JAX-RS and CDI Bike the (Reactive) Bridge
 
Collectors in the Wild
Collectors in the WildCollectors in the Wild
Collectors in the Wild
 
Streams in the wild
Streams in the wildStreams in the wild
Streams in the wild
 
JAX RS and CDI bike the reactive bridge
JAX RS and CDI bike the reactive bridgeJAX RS and CDI bike the reactive bridge
JAX RS and CDI bike the reactive bridge
 
Free your lambdas
Free your lambdasFree your lambdas
Free your lambdas
 
L'API Collector dans tous ses états
L'API Collector dans tous ses étatsL'API Collector dans tous ses états
L'API Collector dans tous ses états
 
Linked to ArrayList: the full story
Linked to ArrayList: the full storyLinked to ArrayList: the full story
Linked to ArrayList: the full story
 
Free your lambdas
Free your lambdasFree your lambdas
Free your lambdas
 
ArrayList et LinkedList sont dans un bateau
ArrayList et LinkedList sont dans un bateauArrayList et LinkedList sont dans un bateau
ArrayList et LinkedList sont dans un bateau
 
Java SE 8 for Java EE developers
Java SE 8 for Java EE developersJava SE 8 for Java EE developers
Java SE 8 for Java EE developers
 
Asynchronous API in Java8, how to use CompletableFuture
Asynchronous API in Java8, how to use CompletableFutureAsynchronous API in Java8, how to use CompletableFuture
Asynchronous API in Java8, how to use CompletableFuture
 
Java 8 Streams and Rx Java Comparison
Java 8 Streams and Rx Java ComparisonJava 8 Streams and Rx Java Comparison
Java 8 Streams and Rx Java Comparison
 
Java SE 8 for Java EE developers
Java SE 8 for Java EE developersJava SE 8 for Java EE developers
Java SE 8 for Java EE developers
 
Going reactive in java
Going reactive in javaGoing reactive in java
Going reactive in java
 

Recently uploaded

The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
fonyou31
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
SoniaTolstoy
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 

Recently uploaded (20)

Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 

Building your own JDK in 10 steps

  • 1. #DevoxxFR Building Your Own JDK In 10 Steps José Paumard @JosePaumard
  • 2. #Devoxx @JosePaumard Why building your own JDK? For the fun of it! You can build JDKs that do not exist yet! And that will never exist!! Are they really JDKs though? Hmmm… (TCK?)
  • 3. #Devoxx @JosePaumard Why building your own JDK? And in fact you do not have to do it yourself!
  • 4. #Devoxx @JosePaumard Why building your own JDK? And you can even get…
  • 5. #Devoxx @JosePaumard Why building your own JDK? https://hg.openjdk.java.net/ Top level repository of the Open JDK 65 projets available: - amber, valhalla, loom, panama - graal - duke
  • 6. #Devoxx @JosePaumard Are you really building a JDK? In fact no… There is this TCK = Test Compatibility Kit You need a licence to run it LondonJug (LJC): Adopt OpenJDK https://adoptopenjdk.net/ 12 plateforms, 6 versions, 2 JVM
  • 7. #Devoxx @JosePaumard Let us start! It needs some intallations - Starting with Ubuntu Desktop 18.04 - Mercurial is not in the default installation $ sudo apt-get install mercurial
  • 8. #Devoxx @JosePaumard Structure of the repository http://hg.openjdk.java.net/valhalla/
  • 9. #Devoxx @JosePaumard Structure of the repository http://hg.openjdk.java.net/amber/
  • 10. #Devoxx @JosePaumard Structure of the repository http://hg.openjdk.java.net/loom/
  • 11. #Devoxx @JosePaumard Structure of the repository http://hg.openjdk.java.net/loom/loom/
  • 12. #Devoxx @JosePaumard This is loom we want! $ hg clone http://hg.openjdk.java.net/loom/loom/ ubuntu@ubuntu:~/jdk-builds/loom$ ls -l total 60 -rw-r--r-- 1 ubuntu ubuntu 2114 Apr 10 11:51 ADDITIONAL_LICENSE_INFO -rw-r--r-- 1 ubuntu ubuntu 1522 Apr 10 11:51 ASSEMBLY_EXCEPTION drwxr-xr-x 3 ubuntu ubuntu 4096 Apr 10 11:51 bin -rw-r--r-- 1 ubuntu ubuntu 1649 Apr 10 11:51 configure drwxr-xr-x 3 ubuntu ubuntu 4096 Apr 10 11:51 doc -rw-r--r-- 1 ubuntu ubuntu 19274 Apr 10 11:51 LICENSE drwxr-xr-x 23 ubuntu ubuntu 4096 Apr 10 11:51 make -rw-r--r-- 1 ubuntu ubuntu 2785 Apr 10 11:51 Makefile -rw-r--r-- 1 ubuntu ubuntu 341 Apr 10 11:51 README drwxr-xr-x 78 ubuntu ubuntu 4096 Apr 10 11:51 src drwxr-xr-x 14 ubuntu ubuntu 4096 Apr 10 11:51 test
  • 13. #Devoxx @JosePaumard This is loom we want! $ hg clone http://hg.openjdk.java.net/loom/loom/ $ du -s * 2542764 loom 2555176 valhalla
  • 14. #Devoxx @JosePaumard Here the repo is not up to date Updating a local repo $ hg branches fibers 54840:2c84b04740e1 processorid 54156:df063b0c6b16 cont 54839:8d1717a86bcc (inactive) default 54838:9d0ae9508d53 (inactive)
  • 15. #Devoxx @JosePaumard Updating a local repo $ hg pull pulling from http://hg.openjdk.java.net/loom/loom/ searching for changes adding changesets adding manifests adding file changes added 1692 changesets with 11645 changes to 7333 files new changesets 283cecb991fa:27a4185098e8 (run 'hg update' to get a working copy) $ hg branches fibers 56532:27a4185098e8 processorid 55689:7e07b78cbf78 cont 56531:9ae91a14c0f7 (inactive) default 56521:ececb6dae777 (inactive)
  • 16. #Devoxx @JosePaumard Branches For Amber $ hg branches records 58586:367756dce66a local-methods 58581:ef0e9ad164da lambda-leftovers 58561:a9d1988be315 stats-before-this-super 58560:8c5aafc6c2c1 pattern-runtime 58559:83136411a3a0 records-and-sealed 58352:e62676fdb665 patterns-stage-1 58335:449afd3008d5 amber-demo-II 57904:c3e3f3b41490 patterns-deconstruction 57856:aa7b2dbc1a2a concise-method-declarations 56872:e16b2019df86 enhanced-enums 56869:d521c8687ea8 default 58558:1bd307ea5497 (inactive) patterns 57025:a898dc684456 (inactive)
  • 17. #Devoxx @JosePaumard Choosing a branch For Amber $ hg amber-demo-II records 58586:367756dce66a local-methods 58581:ef0e9ad164da lambda-leftovers 58561:a9d1988be315 stats-before-this-super 58560:8c5aafc6c2c1 pattern-runtime 58559:83136411a3a0 records-and-sealed 58352:e62676fdb665 patterns-stage-1 58335:449afd3008d5 amber-demo-II 57904:c3e3f3b41490 patterns-deconstruction 57856:aa7b2dbc1a2a concise-method-declarations 56872:e16b2019df86 enhanced-enums 56869:d521c8687ea8 default 58558:1bd307ea5497 (inactive) patterns 57025:a898dc684456 (inactive)
  • 18. #Devoxx @JosePaumard Configuring the compilation Autoconf FTW! $ ./configure Runnable configure script is not present Generating runnable configure script at /home/ubuntu/jdk-builds/loom/build/.configure- support/generated-configure.sh Autoconf is not found on the PATH, and AUTOCONF is not set. You need autoconf to be able to generate a runnable configure script. You might be able to fix this by running 'sudo apt-get install autoconf’. $ sudo apt-get install autoconf
  • 19. #Devoxx @JosePaumard Configuring the compilation Autoconf FTW! $ ./configure configure: error: Cannot find GNU make 3.81 or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure. $ sudo apt-get install make
  • 20. #Devoxx @JosePaumard Configuring the compilation Autoconf FTW! $ ./configure configure: error: Could not find a C compiler. You might be able to fix this by running 'sudo apt-get install build-essential'. configure exiting with result code 1 $ sudo apt-get install build-essential (117Mo)
  • 21. #Devoxx @JosePaumard Configuring the compilation Autoconf FTW… $ ./configure configure: error: Could not find X11 libraries. You might be able to fix this by running 'sudo apt-get install libx11-dev libxext-dev libxrender-dev libxrandr-dev libxtst-dev libxt-dev'. configure exiting with result code 1 $ sudo apt-get install libx11-dev libxext-dev libxrender-dev libxrandr-dev libxtst-dev libxt-dev (20Mo)
  • 22. #Devoxx @JosePaumard Configuring the compilation Autoconf FTW?? $ ./configure configure: error: Could not find cups! You might be able to fix this by running 'sudo apt-get install libcups2-dev'. configure exiting with result code 1 $ sudo apt-get install libcups2-dev
  • 23. #Devoxx @JosePaumard Configuring the compilation Autoconf FTW  $ ./configure configure: error: Could not find alsa! You might be able to fix this by running 'sudo apt-get install libasound2-dev'. configure exiting with result code 1 $ sudo apt-get install libasound2-dev
  • 24. #Devoxx @JosePaumard Configuring the compilation Autoconf FTW ☺ A new configuration has been successfully created in /home/ubuntu/jdk-builds/loom/build/linux-x86_64-server-release using default settings. Configuration summary: * Debug level: release * HS debug level: product * JVM variants: server * JVM features: server: 'aot cds cmsgc compiler1 compiler2 epsilongc g1gc graal jfr jni-check jvmci jvmti management nmt parallelgc serialgc services shenandoahgc vm-structs zgc' * OpenJDK target: OS: linux, CPU architecture: x86, address length: 64 * Version string: 13-internal+0-adhoc.ubuntu.amber (13-internal) Tools summary: * Boot JDK: openjdk version "12" 2019-03-19 OpenJDK Runtime Environment (build 12+33) OpenJDK 64-Bit Server VM (build 12+33, mixed mode, sharing) (at /home/ubuntu/jdk/jdk-12) * Toolchain: gcc (GNU Compiler Collection) * C Compiler: Version 7.3.0 (at /usr/bin/gcc) * C++ Compiler: Version 7.3.0 (at /usr/bin/g++) Build performance summary: * Cores to use: 4 * Memory limit: 7953 MB
  • 25. #Devoxx @JosePaumard Launching the compilation Make FTW! (make clean first…) $ make images Building target 'images' in configuration 'linux-x86_64-server-release' Compiling 8 files for BUILD_TOOLS_LANGTOOLS Compiling 1 files for BUILD_JFR_TOOLS Creating hotspot/variant-server/tools/adlc/adlc from 13 file(s) Compiling 2 files for BUILD_JVMTI_TOOLS ...
  • 26. #Devoxx @JosePaumard Launching the compilation Make FTW! $ make images ... Creating support/demos/image/jfc/SampleTree/SampleTree.jar Creating support/demos/image/jfc/TableExample/TableExample.jar Creating support/demos/image/jfc/TransparentRuler/TransparentRuler.jar Creating jdk image Creating CDS archive for jdk image Stopping sjavac server Finished building target 'images' in configuration 'linux-x86_64-server-release' $ du -s * 6287440 loom 6358412 amber
  • 27. #Devoxx @JosePaumard Result? The result is in server-release/images/jdk/ $ ls -l build/linux-x86_64-server-release total 120 -rw-r--r-- 1 ubuntu ubuntu 2663 Apr 15 02:21 bootcycle-spec.gmk -rw-r--r-- 1 ubuntu ubuntu 7869 Apr 15 02:21 buildjdk-spec.gmk -rw-r--r-- 1 ubuntu ubuntu 17895 Apr 15 02:31 build.log drwxr-xr-x 19 ubuntu ubuntu 4096 Apr 15 02:31 buildtools -rwxr-xr-x 1 ubuntu ubuntu 3908 Apr 15 02:21 compare.sh -rw-r--r-- 1 ubuntu ubuntu 14971 Apr 15 02:21 configure.log drwxr-xr-x 2 ubuntu ubuntu 4096 Apr 15 02:21 configure-support drwxr-xr-x 3 ubuntu ubuntu 4096 Apr 15 02:22 hotspot drwxr-xr-x 5 ubuntu ubuntu 4096 Apr 15 02:31 images drwxr-xr-x 8 ubuntu ubuntu 4096 Apr 15 02:31 jdk -rw-r--r-- 1 ubuntu ubuntu 1261 Apr 15 02:21 Makefile drwxr-xr-x 6 ubuntu ubuntu 4096 Apr 15 02:22 make-support -rw-r--r-- 1 ubuntu ubuntu 33489 Apr 15 02:21 spec.gmk drwxr-xr-x 22 ubuntu ubuntu 4096 Apr 15 02:31 support
  • 28. #Devoxx @JosePaumard Result? Result! $ export JAVA_HOME= .../amber/build/linux-x86_64-server-release/images/jdk $ export PATH=$JAVA_HOME/bin:$PATH $ java –version openjdk version "13-internal" 2019-09-17 OpenJDK Runtime Environment (build 13-internal+0-adhoc.ubuntu.amber) OpenJDK 64-Bit Server VM (build 13-internal+0-adhoc.ubuntu.amber, mixed mode, sharing)
  • 29. #Devoxx @JosePaumard Wrapping up A little tricky… A little long! Needs to make your hand dirty to test new functionalities You will be fighting against your IDE, and you will loose! But you can follow what is going on in real-time ☺
  • 30. #DevoxxFR It’s your turn! José Paumard @JosePaumard