Posts

Showing posts from May, 2008

Debugging into Java core libraries with Eclipse

Unzip the jdk src.zip file Create a project and build the java source Open the Eclipse project run dialog for the project you want to debug into the java source from Click on the Classpath tab Click on the Bootstrap Entries Click the Add Projects button Add the java source project Click on the Up/Down buttons to move the java source project above the JRE System Library (equivalent to -Xbootclasspath/p) Debug your project as normal and you will be able inspect variables as you step through the java core libraries Alter the java source to add instrumentation for things like recording last mutator thread stack trace of Collections for debugging and discovering the source of ConcurrentModificationException, etc.

Zip/Jar

Random access of ZIP TrueZip encapsulates random access, but only works with files NestedArchiveToolkit

Perm generation memory space

forum.java.sun.com Class information is stored in the perm generation. Also constant strings are stored there. Strings created dynamically in your application with String.intern() will also be stored in the perm generation. Additionally, the hotspot compiled code resides in the perm generation. Class unloading: every instance has a reference to its class, and every class has a reference to its class loader, and every class loader has a reference to all the classes that it loaded. Usually if you want classes to get unloaded, you have to have thought about that beforehand and set up separate class loaders to allow for that. you cannot change the configured sizes for the Perm generation during runtime. The parameters for setting initial and max size are -XX:PermSize=xM and -XX:MaxPermSize=yM. sub-area of the perm space, called the code cache separate JVM parameter to also bump up the code cache size