OpenJDK 8 development environment packaged as a VirtualBox VM.
OS: Ubuntu 12.04
IDE: Eclipse Kepler 4.3
Download location (~ 7 GB zipped archive): https://drive.google.com/file/d/127eWlbL-MBk65DiDTcwfc6mOzTHjcOxC
OpenJDK user password: j1a2v3a4
Local OpenJDK repo is cloned in /home/OpenJDK/dev/jdk8_tl.
All of the relevant repos are here: hg.openjdk.java.net.
The eclipse workspace is located under /home/openjdk/workspace.
IMPORTANT:
You should add your JDK user (in case you are given commiter rights and you have registered your JDK user- typically your java.net user )
to the Mercurial configuration in ~/dev/jdk8_tl/.hg/hgrc as follows:
[ui]
username=<OpenJDK_username>
[extensions]
fetch=
In case you open Eclipse and you see no projects you can import them from the /home/openjdk/dev/jdk8_tl folder (using the 'nested projects' option).
To start contributing to OpenJDK you can follow this process:
- Sign OCA (Oracle Contributor Agreement) – specify OpenJDK as the the project and your java.net user as the username
- Send the signed OCA to oracle-ca_us@oracle.com
- Find some interesting bug or enhancement (RFE) to work on from bugs.sun.com
- You may subscribe to a particular mailing list of interest
- Discuss any changes you want to make in the appropriate mailing list using the format:
<Bug_or_RFE_Id> : <Bug_or_RFE_Title>
- Add a proposed code change (patch) to the discussion using any of the following commands:
hg export -g
hg diff -g
- If applicable attach JTReg tests to the suggested changeset
You may additionally install the 'hgview' that provides a UI for navigating the Mercurial repo:
sudo apt-get install hgview
You also may want to enable the 'jcheck' tool in your local repository so that you
never create, pull, or import invalid changesets - see http://openjdk.java.net/projects/code-tools/jcheck/.
sudo bash configure - in order to configure the repo locally issue
ccache -M 3G - this is optional but if issued uses caching to improve incremental building
make clean images - build all projects
make <project_name>-only - build a particular project
(e.g. make jdk-only)
Add the JDK_FILTER="[classes]" option to limit the classes to recompile in the jdk project.
All of the projects can be built by issuing Run As -> Ant Build on the corresponding project.
Only hotspot is being build using external 'make' configuration. To build it ussue: Project -> Build Project.
Command line build: ant clean build -propertyfile build.properties [&> swingAntBuild.log]
Deployment artifacts: ~/dev/jdk8_tl/jdk/dist/lib/swing.jar
Command line build: ant clean build -propertyfile build.properties [&> jmxAntBuild.log]
Deployment artifacts: ~/dev/jdk8_tl/jdk/dist/lib/jmx.jar
Command line build: ant clean build -propertyfile build.properties [&> jconsoleAntBuild.log]
Deployment artifacts: ~/dev/jdk8_tl/jdk/dist/lib/jconsole.jar
Command line build: cd ~/dev/jdk8_tl/common/makefiles
make clean jaxp NEWBUILD=true [&> jaxpInfrabuild.log]
(make clean jaxws NEWBUILD=true [&> jaxwsInfrabuild.log])
Deployment artifacts:
~/dev/jdk8_tl/build/linux-x86_64-normal-server-release/jaxp
classes/
dist/
~/sources/jdk8_tl/build/linux-x86_64-normal-server-release/jaxws
dist/
jaf_classes/
jaxws_classes/
Command line build: cd ~/dev/jdk8_tl/common/makefiles
make clean langtools NEWBUILD=true [&> langtoolsInfrabuild.log]
Deployment artifacts:
~/dev/jdk8_tl/build/linux-x86_64-normal-server-release/langtools
btclasses/
classes/
dist/
gensrc/
genstubs/
(optional) If you need to configure your hotspot environment issue:
cd ~/dev/jdk8_tl//common/makefiles
bash ../autoconf/configure --with-boot-jdk=/usr/lib/jvm/java-7-openjdk-amd64/
bash ../autoconf/configure --with-boot-jdk=/usr/lib/jvm/java-7-openjdk-amd64/ JAVAC_FLAGS=-g
(to enable generation of debug classfiles)
Command line build:
make clean hotspot NEW_BUILD=true [&> hotspotInfraBuild.log]
make hotspot NEW_BUILD=true [&> hotspotInfraBuild.log]
(incremental build)
make hotspot NEW_BUILD=true DEBUG_CLASSFILES=true &> hotspotInfraBuild-DEBUG_CLASSFILES.log
(for generating debug classfiles when building)
Deployment artifacts:
The general Hotspot build artefacts are a tree of directories representing the different kinds of builds that can occur e.g.:
linux_i586_compiler1 linux x86 client compiler build
linux_i586_compiler2 linux x86 server compiler build
linux_amd64_compiler1 linux amd64 client compiler build
linux_amd64_compiler2 linux amd64 server compiler build
Those directories then further split into:
debug
fastdebug
generated
jvmg
optimized
product
profiles
To run a particular test suite run from the 'tests' directory:
make // e.g. make jdk_util
or
make TESTS="<package_1> ... <package_N>"
You can run a particular test using jtreg. For example:
cd $HOME/dev/jdk8_tl/jdk/test
$HOME/dev/jtreg -verbose:fail java/lang/invoke/AccessControlTest.java
The OpenJDK Developers' Guide
http://openjdk.java.net/guide/
Adopt OpenJDK wiki
https://java.net/projects/adoptopenjdk/pages/AdoptOpenJDK
Getting Started with HotSpot and OpenJDK
http://www.infoq.com/articles/Introduction-to-HotSpot
OpenJDK Governance and Development Process Overview
http://www.youtube.com/watch?v=jebmrXo-Y3Y
OpenJDK and Adopt OpenJDK
http://www.youtube.com/watch?v=GgoXqZgguyo
Hacking the OpenJDK compiler
http://www.ahristov.com/tutorial/java-compiler.html
How to compile openJDK under Ubuntu
www.vogella.com/articles/OpenJDK/article.html
Meet the OpenJDK Tests
http://www.youtube.com/watch?v=ZcOGof_DXcU
OpenJDK Testing Pitfalls presentation by Stuart W.Marks
http://www.youtube.com/watch?v=zKUI5HJVqCs
Hacking Hotspot in Eclipse
http://rkennke.wordpress.com/2012/07/27/hacking-hotspot-in-eclipse/
HotSpot Internals
https://wikis.oracle.com/display/HotSpotInternals/Home