Using an IDE to work on the Java library (original) (raw)
Mario Torre neugens.limasoftware at gmail.com
Mon Jun 5 17:22:21 UTC 2017
- Previous message: Using an IDE to work on the Java library
- Next message: Using an IDE to work on the Java library
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF Fingerprint: BA39 9666 94EC 8B73 27FA FC7C 4086 63E3 80F2 40CF
Java Champion - Blog: http://neugens.wordpress.com - Twitter: @neugens Proud GNU Classpath developer: http://www.classpath.org/ OpenJDK: http://openjdk.java.net/projects/caciocavallo/
Please, support open standards: http://endsoftpatents.org/
- Previous message: Using an IDE to work on the Java library
- Next message: Using an IDE to work on the Java library
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]