{"id":2296,"date":"2012-04-10T13:47:15","date_gmt":"2012-04-10T13:47:15","guid":{"rendered":"http:\/\/t.motd.kr\/articles\/2296\/how-to-build-openjdk-7-on-ubuntu-1110-and-1204"},"modified":"2022-12-28T01:44:37","modified_gmt":"2022-12-27T16:44:37","slug":"how-to-build-openjdk-7-on-ubuntu-11-10-and-12-04","status":"publish","type":"post","link":"https:\/\/vault.motd.kr\/wordpress\/posts\/2296\/how-to-build-openjdk-7-on-ubuntu-11-10-and-12-04\/","title":{"rendered":"How to build OpenJDK 7 on Ubuntu 11.10 and 12.04"},"content":{"rendered":"\n
This article will guide you to build OpenJDK in your 64-bit Ubuntu Linux (11.10 Oneiric Ocelot or 12.04 Precise Pangolin) without many trials and errors. It is based on the official OpenJDK build README<\/span><\/a>, but the README<\/span> file is out-of-date, and that\u2019s why I wrote this guide.<\/p>\n\n\n\n Edit your If you need to apply some patches, do it now, and then continue to build.<\/p>\n\n\n\n I usually write a build script that automatically sets the environment variables and calls Once the build process is successful, you will find your OpenJDK image at This article will guide you to build OpenJDK in your 64-bit Ubuntu Linux (11.10 Oneiric Ocelot or 12.04 Precise Pangolin) without many trials and errors. It is based on the official OpenJDK build README, but the README file is out-of-date, and that\u2019s why I wrote this guide. Assumptions Install required packages Install HgForest Edit your… Continue reading Assumptions<\/h2>\n\n\n\n
\n
$HOME\/.local\/opt\/jdk\/1.6<\/code>.\n
\n
ant<\/code> command is in your
PATH<\/code> variable.<\/li>\n\n\n\n
$HOME\/Workspace<\/code>.\n
\n
~\/Workspace\/openjdk<\/code> and HgForest at
~\/Workspace\/hgforest<\/code>. However, you can keep them in different locations and adjust the scripts appear in this article.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n
Install required packages<\/h2>\n\n\n\n
apt-get install mercurial gawk g++ libcups2-dev libasound2-dev libfreetype6-dev libx11-dev libxt-dev libxext-dev libxrender-dev libxtst-dev libfontconfig1-dev<\/code><\/pre>\n\n\n\n
Install HgForest<\/h2>\n\n\n\n
hg clone https:\/\/bitbucket.org\/pmezard\/hgforest-crew\/overview\/ \"$HOME\/Workspace\/hgforest\"<\/code><\/pre>\n\n\n\n
$HOME\/.hgrc<\/code> to add these lines:<\/p>\n\n\n\n
[extensions]\nforest=~\/Workspace\/hgforest\/forest.py<\/code><\/pre>\n\n\n\n
Clone the OpenJDK 7 repository<\/h2>\n\n\n\n
hg fclone http:\/\/hg.openjdk.java.net\/jdk7u\/jdk7u \"$HOME\/Workspace\/openjdk\"<\/code><\/pre>\n\n\n\n
Apply some patches<\/h2>\n\n\n\n
Build the OpenJDK 7<\/h2>\n\n\n\n
cd \"$HOME\/Workspace\/openjdk\"\nunset JAVA_HOME\nexport LANG=C\nexport ALT_BOOTDIR=\"$HOME\/.local\/opt\/jdk\/1.6\"\nexport ALLOW_DOWNLOADS=true\nexport EXTRA_LIBS=\/usr\/lib\/x86_64-linux-gnu\/libasound.so\nsource jdk\/make\/jdk_generic_profile.sh\nmake sanity && make && echo 'Images at: build\/linux-amd64\/j2sdk-image'<\/code><\/pre>\n\n\n\n
make<\/code>.<\/p>\n\n\n\n
build\/linux-amd64\/j2sdk-image<\/code>.<\/p>\n","protected":false},"excerpt":{"rendered":"