recommended IDE for developing openjdk?

Pavel Rappo pavel.rappo at oracle.com
Mon Jan 18 11:49:21 UTC 2021


I note that the last time I configured IntelliJ IDEA for `openjdk/jdk` using a procedure similar to the one that Maurizio has just described, I had to tweak inclusion of generated source.

IIRC, after the `idea.sh` script completed, I opened the project it created and went to "File > Project Structure... Project Settings > Modules > Add Content Root" to fix up the way `support/gensrc/java.base` was included. Before I did that, IntelliJ IDEA couldn't see `java.nio.ByteBuffer` and friends.

There's always a chance that I followed the reference procedure incorrectly since I haven't seen others complaining about having had to do similar tweaks.

-Pavel

> On 18 Jan 2021, at 11:11, Maurizio Cimadamore <maurizio.cimadamore at oracle.com> wrote:
> 
> Hi,
> thanks for the pointer to the Eclipse project - I'm sure folks will find that useful.
> 
> I think these days the IntelliJ support is relatively polished - there are features missing yes (for instance the project is monolitic, and not modularized, but folks here are using it pretty regularly and I can't say that has been a huge issue so far).
> 
> To get started with intellij you have to create an IDE configuration first.
> 
> 1. first run `sh configure` as you normally would to set up your JDK build - that build configuration would then be reused by Intellij
> 
> 2. then run `sh bin/idea.sh <list of module names> - e.g. `sh bin/idea.sh java.base jdk.compiler java.desktop` - this will create an `.idea` folder in the current directory and set the sources for the JDK modules you specified.
> 
> 3. open IntelliJ and point it to the folder where the `.idea` folder has been created. If everything worked correctly you should have a project up and running.
> 
> The base project supports actions for cleaning, rebuilding the selected modules, or building a JDK image.
> 
> Optionally, you can also build and install a jtreg plugin, to run and debug tests:
> 
> https://openjdk.java.net/jtreg/intellij-plugin.html
> 
> 
> I use this setup on a daily basis and I think it works pretty well - there are things that can be improved (for instance, I don't think the generated sources are always recognized correctly, we need to look into that), but I'm quite productive with it (especially with the jtreg plugin enabled).
> 
> I know that there is also some limited support for VSCode (especially for hotspot development):
> 
> https://github.com/openjdk/jdk/blob/master/doc/ide.md
> 
> And that there is Netbeans support as well - CC'ing Jan who knows more than I do on how to get started there.
> 
> Eventually we should collect all this info in a single place, but I never found the time to do so. Apologies!
> 
> Cheers
> Maurizio
> 
> 
> On 18/01/2021 09:46, Langer, Christoph wrote:
>> Hi Clemens,
>> 
>> while I won't argue about the fanciness of the Eclipse user interface (��), I'd like to point you to a set of Eclipse projects that I created nevertheless...
>> 
>> You'll find them here: https://github.com/RealCLanger/OpenJDKEclipseProjects
>> 
>> The main benefit of these Eclipse projects is that the projects for all modules and tests are linked together so you will immediately recognize errors in dependencies. I think that doesn't work so well with IntelliJ.
>> 
>> Another hint: There's a mailing list called ide-support-dev where questions around IDE support can get discussed.
>> 
>> Best regards
>> Christoph
>> 
>>> -----Original Message-----
>>> From: discuss <discuss-retn at openjdk.java.net> On Behalf Of Clemens
>>> Eisserer
>>> Sent: Freitag, 15. Januar 2021 21:33
>>> To: discuss at openjdk.java.net
>>> Subject: recommended IDE for developing openjdk?
>>> 
>>> Hi,
>>> 
>>> About 10 years ago I used eclipse to work on OpenJDK, however I would like
>>> to get rid of it because of its slow/ugly user interface.
>>> I wonder, are there any recommendations which IDE to use these days?
>>> I gave IntelliJ a try but having not used it that much (except for some
>>> fairly standard maven based projects) I failed to configure it correctly,
>>> however I haven't tried Netbeans still.
>>> 
>>> So to make it short: Which IDE is known to cope well with working on the
>>> OpenJDK codebase?
>>> And are there detailed instructions available for creating an openjdk
>>> project with intellij?
>>> Or would I be better off using netbeans?
>>> 
>>> Thank, Clemens



More information about the discuss mailing list