Using an IDE to work on the Java library

Jan Lahoda jan.lahoda at oracle.com
Wed Nov 22 15:09:43 UTC 2017


Hi Andrew,

I suspect the problem is that the sources of the jdk.internal.vm.ci 
module (and a few other modules) are not in the package hierarchy under 
share/classes. I.e., there is no 
src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/code (as there is 
src/java.base/share/classes/java/lang). There is only 
src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code, 
but the (module) source path is referring to src/*/share/classes, not to 
src/*/share/classes/jdk.vm.ci.code/src. I suspect this needs some 
workarounds in IDE projects, as there are workarounds in the build 
system for this. I don't think anyone was using the project for these 
modules so far (the project is working OK for me for java.compiler, 
jdk.compiler, java.base, jdk.jshell and occasionally java.desktop). I'll 
see what can be done.

Jan

On 22.11.2017 14: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