Using an IDE to work on the Java library
Jonathan Gibbons
jonathan.gibbons at oracle.com
Mon Jun 5 17:32:37 UTC 2017
While the d-i-y approach works as far as it goes, the JDK support for
IDE projects typically has direct support for running jtreg tests in the
repos.
-- Jon
On 06/05/2017 10:22 AM, Mario Torre wrote:
> 2017-06-05 18:30 GMT+02:00 Andrew Haley <aph at redhat.com>:
>> Sorry for what must seem like a newbie question...
>>
>> I've done almost all of my work on HotSpot, and have very little
>> experience trying to use an IDE to work on the Java library. Eclipse
>> is fine when working on libraries outdie the JDK itself, but seems to
>> want to look inside src.zip for its sources when debugging. It would
>> be really nice to be able to see (and edit) the real Java source files
>> in jdk/java.base/.
>>
>> I suppose there must be some way to create a Project for an IDE, so
>> that debugging the standard library is easy. Is there some advice
>> around somewhere? What do people do?
> I generally use a bit more manual approach but works better for me
> because I know exactly where everything is and I don't have to trust
> the IDEs. I basically just create a project with existing sources and
> import various directories with the sources into the IDEs, basically
> each directory that starts with "classes", this works for me in
> IntelliJ, Eclipse and Netbeans, if you add the JVM you just compiled
> they will follow its sources and you can make changes, and even
> compare with another JDK. I found for this kind of work Netbeans to
> work best and Eclipse second best, Netbeans seems to understand when
> your application goes into the native code and debugging continues
> into that (if you have the C code open as a separate project too),
> without any special trick, I did write a quick guide some time ago
> although you know all this stuff already:
>
> https://neugens.wordpress.com/2015/02/26/debugging-the-jdk-with-gdb/
>
> This guide is useful for command line gdb but you can attach with
> Eclipse (and NetBeans!) too, although when it goes into native land
> I'm sure you prefer the gdb console! :)
>
> Cheers,
> Mario
More information about the jdk10-dev
mailing list