Using an IDE to work on the Java library

Jan Lahoda jan.lahoda at oracle.com
Wed Nov 22 20:38:12 UTC 2017


On 22.11.2017 16:30, Andrew Haley wrote:
> Hi,
>
> On 22/11/17 15:09, Jan Lahoda wrote:
>> 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.
>
> That would be awesome!  The last few days I've been trying to work on

There should be an updated version of of the plugin available now. 
Should be possible to open src/jdk.internal.vm.ci/ as a project, set 
breakpoints in the source files, and when debugging, debugger should be 
able to stop there (I was able to only do limited testing, though).

Current caveat/bug: types from src/jdk.internal.vm.ci/ appear twice in 
the Go to Type dialog, but only one of the results works (the other one 
that does not work has src/jdk/internal/vm/ci/ in the path). Not sure 
yet what is the problem.

Jan

> this have sometimes felt like I was losing my mind.  Rather
> ironically, the explanation for the very odd arrangement of these
> source files was that it was what IDEs wanted.  Go figure...
>
> Thanks again.
>


More information about the jdk10-dev mailing list