Query on developing OpenJDK with IntelliJ

Jonathan Bluett-Duncan jbluettduncan at gmail.com
Wed Sep 14 04:10:30 UTC 2016

Thanks for the pointer Max, but I think I managed to figure out what my new
problem was and to find a solution for it.

In my current dev setup, I'm running IntelliJ on Windows connected to a
Samba network share which holds my jdk9 clone, which itself is hosted on an
Ubuntu VM on my local machine (as per

Convoluted, yeah, I know.

Since IntelliJ was running off a network share, it would frequently
synchronize with the jdk9 files but do so very, very slowly. Since I
initially ran just jdk9/common/bin.idea.sh to generate my IntelliJ project,
it created a project for the entire source code of jdk9, and this combined
with the slow file synchronization caused the IntelliJ editor's usual
analysis to freeze.

To resolve this, I disabled automatic file synchronization, deleted my
IntelliJ project files and regenerated them using "jdk9/common/bin/idea.sh
java.base" (since java.base was the only module I was interested in), and
increased my IntelliJ heap size to "-Xmx1024m". Afterwards, things quickly
went back to normal for me.

I hope this info proves useful for other IntelliJ users on the OpenJDK
mailing lists.

Kind regards,

On 13 September 2016 at 04:44, Weijun Wang <weijun.wang at oracle.com> wrote:

> This is how I did.
> 1. Build jdk9/dev to an exploded-image, so you have build/<platform>/jdk.
> 2. mkdir jdk/classes to trick IntelliJ IDEA this is a JDK.
> 3. Add this jdk directory as an SDK. In classpath and sourcepath, add the
> modules you are interested in (classpath to <build>/jdk/modules/mod_name,
> sourcepath to <src>/jdk/src/mod_name/share/classes).
> 4. Create an empty project, add whatever jdk src directory you like into
> its Modules/Source, or add the whole jdk there, and "Mark Directory as"
> sources for each sub-directory. You can manually edit <content> and
> <sourceFolder> in the iml file.
> 5. Done.
> --Max

More information about the build-dev mailing list