I was curious to learn how hard it may be to build your own Java Development Kit (JDK) "at home", purely from OpenJDK source code, and it turns out that -on (Ubuntu) Linux at least- this actually very easy! As described here, it goes like this:
sudo apt-get install git mercurial zip bzip2 unzip tar curl
sudo apt-get install ccache make gcc g++ ca-certificates ca-certificates-java
sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev
sudo apt-get install libasound2-dev libcups2-dev libfreetype6-dev
sudo apt-get install build-essential
sudo apt-get install openjdk-7-jdk
Note that you need a "Bootstrap JDK" - e.g. we have to first grab the binary OpenJDK v7 to build our own Java8 SDK from scratch. Also, you can skip the ruby-dev & fpm gem, unless you are interested in actually building a *.deb or *.rpm package (and not just a dist *.tar.gz). Now you can:
mkdir ~/dev/openjdkathome
cd ~/dev/openjdkathome
git clone https://github.com/hgomez/obuildfactory.git
XUSE_NEW_BUILD_SYSTEM=true XBUILD=true ./obuildfactory/openjdk8/linux/standalone-job.sh
(...)
## Finished images (build time 00:00:29)
----- Build times -------
Start 2014-06-09 15:38:31
End 2014-06-09 16:00:23
00:00:36 corba
00:00:28 demos
00:13:39 hotspot
00:00:29 images
00:00:21 jaxp
00:00:28 jaxws
00:04:51 jdk
00:00:43 langtools
00:00:17 nashorn
00:21:52 TOTAL
Now you could git rid of the previously installed binary "Bootstrap JDK" again, which had to be used to build your own version, like this:
sudo apt-get remove openjdk-7-jdk
and you've got yourself your very own home made JDK:
$ sources/openjdk8/build/linux-x86_64-normal-server-release/images/j2sdk-image/bin/java -versionopenjdk version "1.8.0-jdk8-b132"
OpenJDK Runtime Environment (build 1.8.0-jdk8-b132-20140609)
OpenJDK 64-Bit Server VM (build 25.0-b70, mixed mode)
This README-builds.html has some more details on the OpenJDK build.
sudo apt-get install git mercurial zip bzip2 unzip tar curl
sudo apt-get install ccache make gcc g++ ca-certificates ca-certificates-java
sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev
sudo apt-get install libasound2-dev libcups2-dev libfreetype6-dev
sudo apt-get install build-essential
sudo apt-get install openjdk-7-jdk
Note that you need a "Bootstrap JDK" - e.g. we have to first grab the binary OpenJDK v7 to build our own Java8 SDK from scratch. Also, you can skip the ruby-dev & fpm gem, unless you are interested in actually building a *.deb or *.rpm package (and not just a dist *.tar.gz). Now you can:
mkdir ~/dev/openjdkathome
cd ~/dev/openjdkathome
git clone https://github.com/hgomez/obuildfactory.git
XUSE_NEW_BUILD_SYSTEM=true XBUILD=true ./obuildfactory/openjdk8/linux/standalone-job.sh
(...)
## Finished images (build time 00:00:29)
----- Build times -------
Start 2014-06-09 15:38:31
End 2014-06-09 16:00:23
00:00:36 corba
00:00:28 demos
00:13:39 hotspot
00:00:29 images
00:00:21 jaxp
00:00:28 jaxws
00:04:51 jdk
00:00:43 langtools
00:00:17 nashorn
00:21:52 TOTAL
Now you could git rid of the previously installed binary "Bootstrap JDK" again, which had to be used to build your own version, like this:
sudo apt-get remove openjdk-7-jdk
sudo apt-get remove openjdk-7-jre
sudo apt-get remove openjdk-7-jre-headless and you've got yourself your very own home made JDK:
$ sources/openjdk8/build/linux-x86_64-normal-server-release/images/j2sdk-image/bin/java -versionopenjdk version "1.8.0-jdk8-b132"
OpenJDK Runtime Environment (build 1.8.0-jdk8-b132-20140609)
OpenJDK 64-Bit Server VM (build 25.0-b70, mixed mode)
This README-builds.html has some more details on the OpenJDK build.