New Toys in JDK 6
I think "Java 6" is what they call it now. Whatever!
I just downloaded and installed the beta release of JDK 6 a.k.a. Mustang. And here's some very superficial impressions.
- The download is almost the same size as JDK 5.
- Both Rhino and Jython started up under JDK 6 Beta with no problems. This was not the case for JDK 5. JEdit 4.2 works fine too.
- javap output still looks funny.
- The JDK bin directory contains the following new experimental tools (some documented here):
- java-rmi: ?
- jhat: Heap Dump Browser - Starts a web server on a heap dump file (e.g., produced by jmap -dump), allowing the heap to be browsed.
- jmap: Memory Map for Java - Prints shared object memory maps or heap memory details of a given process or core file or a remote debug server.
- jrunscript: Script shell for Java - Runs a script. (See Paul Jensen's article.)
- jstack: Stack Trace for Java - Prints a stack trace of threads for a given process or core file or remote debug server.
- schemagen: ?
- wsgen: ?
- wsimport: ?
- xjc: ?
This doesn't feel like the big jump that we experienced with JDK 5. (But if you know what "shared object memory" is, I'd like to hear about it.)
Interestingly, in the OCI Java lunch yesterday, most of the developers are still using JDK 1.4 at work. They didn't move to JDK 5 for various reasons. It would be interesting to see how organizations manage the transition to JDK 6. Maybe they can just skip 5 and go to 6 directly?
I have a feeling that the lack of a 5.1 version has really hurt the adoption of JDK 5.
Re: New Toys in JDK 6
jmap tool prints shared object (DLLs on Windows) loaded in the Java process. This is more like Solaris pmap-tool. There are many other options as well.
-heap option prints summary of heap (gc algorithm, sizes of various heap areas)
-histo option prints heap histogram
-permstat prints stat on perm. generation of gc.
-finalizerinfo prints information on objects awaiting finalization.
-dump option (or older -heap:format=b option) dumps heap snapshot in a binary file. This dump file can be analyzed with jhat (java heap analysis tool)
More details are here: http://java.sun.com/javase/6/docs/tooldocs/share/jmap.html
-heap option prints summary of heap (gc algorithm, sizes of various heap areas)
-histo option prints heap histogram
-permstat prints stat on perm. generation of gc.
-finalizerinfo prints information on objects awaiting finalization.
-dump option (or older -heap:format=b option) dumps heap snapshot in a binary file. This dump file can be analyzed with jhat (java heap analysis tool)
More details are here: http://java.sun.com/javase/6/docs/tooldocs/share/jmap.html
Re: New Toys in JDK 6
Weiqi,
How big is the rt.jar file in JDK 6?
In the dawn of Java (December 1990), a hard drive was typically about 100MB. Would this file (full of "new toys") even fit? My thesis is that Java is pretty bloated.
More and more companies want "support", not "toys". If a bug is found in a free Sun VM how do you pressure Sun to fix it? If you pay a vendor for their Java VM, at least you can hold next years license fee over the vendors head. I think that need is driving a lot of high level thinking out there in corporate IT land (where JDK 1.4 rules).