Using an IDE to work on the Java library
Maurizio Cimadamore
maurizio.cimadamore at oracle.com
Mon Nov 27 15:42:48 UTC 2017
Hi Andrew,
over the last few years, Chris and I have been promoting IntelliJ
support for JDK [1] - the results of this work are included in OpenJDK,
and you can create an idea project as follows:
sh bin/idea.sh jdk.internal.vm.ci
the command idea.sh takes a list of modules you want to work on. I
tested it with the above module (which I've seen mentioned in this
thread) and found no issues.
Few months ago we also released the IntelliJ jtreg plugin which allows
you to run/debug tests.
I agree that we need to come up with ways to make it easier for people
to work/hack on openjdk using IDEs - hopefully this is a step in the
right direction. Note that this script works by delegating all
configuration decisions to the makefile - so, assuming you have an
existing build configuration, the source roots should be tailored for
your OS/HW combo.
[1] -
http://mail.openjdk.java.net/pipermail/discuss/2015-January/003645.html
[2] -
http://mail.openjdk.java.net/pipermail/jtreg-dev/2016-October/000390.html
Maurizio
On 22/11/17 13:45, Andrew Haley wrote:
> On 22/11/17 11:31, Andrew Haley wrote:
>
>> All I want is a JDK that I can debug and edit. I've been trying to
>> use the Netbeans projects because there are dozens (hundreds? :-) of
>> source directories in the JDK and having to enter every single one of
>> them into the Netbeans "add source" dialogue is incredibly painful.
> And, I forgot to say, Netbeans returns hundreds of errors with the
> source covered in red underlining, with messages like "error: package
> jdk.vm.ci.code does not exist". It does, and it's in the JDK, but for
> some reason Netbeans doesn't look in there. So I can't set breakpoints
> on it either, because I get the
>
> Not able to submit breakpoint MethodBreakpoint [jdk.tools.jaotc.Main].main '([Ljava/lang/String;)V', reason: Breakpoint belongs to disabled source root '/home/aph/jdk/src/jdk.aot/share/classes/jdk.tools.jaotc/src'. See Window/Debugging/Sources.
>
> message. I was hoping that the Netbeans projects would fix this.
>
> Like I said, lots of people are working on the JDK, and they must do
> their development somehow. But it seems impossible. The Netbeans
> projects don't work -- I guess they got broken when the source was
> reorganized. I'm going to try John Rose's suggestion next, to see if
> that works.
>
More information about the jdk10-dev
mailing list