Insel: Kurzer Abriss der Java Open-Source-Werdung
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Freitag, Juli 25, 2008.Schon seit Java 1.0 gibt es den Quellcode der Standard-Bibliotheken (beim JDK im im Wurzelverzeichnis unter dem Namen src.zip) und jeder Interessierte konnte einen Blick auf die Implementierung werfen. Zwar verschloss Sun nicht den Blick auf die Implementierungen, aber weder die Laufzeitumgebung, noch der Compiler oder die Bibliotheken standen unter einer akzeptierten Open-Source-Lizenz. Sehr über 10 Jahren gab es in der Software-Welt Forderungen an Sun, die gesamte Java-Plattform unter einer bekanntere Lizenzform wie der GNU General Public License (GPL) oder BSD-Lizenz zu stellen. Dabei hat Jonathan Schwartz in San Francisco bei der JavaOne Konferenz 2006 schon angedeutet: ››It's not a question of whether we'll open source Java, now the question is how‹‹. War die Frage also statt des „Ob“ ein „Wie“, kündigte bei der Eröffnungsrede der JavaOne Konferenz im Mai 2007 Rich Green die endgültige Freigabe Java als OpenJDK unter der Open Source-Lizenz GPL 2 an. Dem ging Ende 2006 die Freigabe von Compiler und der virtuellen Maschine voraus.
Die Geschichte ist allerdings noch ein wenig komplizierter. Obwohl OpenJDK nun unter der GPL steht, enthielt es doch Teile wie den Font-Renderer, Sound-Unterstützung, Farbmanagement, SNMP-Code, die als binäre Pakete beigelegt wurden, weil etwa die Rechte zur Veröffentlichung fehlten. Sun nennt diese Teile, die etwa 4 % vom JDK 6 ausmachen, „belasteter Code“ (engl. „encumbered code“) . Das hindere puristische Linux-Distributoren daran, OpenJDK auszuliefern. RedHat veröffentlichte daraufhin im Juni 2007 das Projekt IcedTea, um diese binären Teile auf der Basis vom OpenJDK durch GPL-Software zu ersetzen. So basiert der Font-Renderer zum Beispiel auf FreeType und das Farbmanagement auf little CMS . Mit diesen Ersetzungen schaffte dann OpenJDK + IcedTea im Juni 2008 das Technology Compatibility Kit (TCK) von Sun und heißt nun OpenJDK 6. Darauf hin floss das OpenJDK 6 unter der GPLv2 in Linux-Distributionen wie Fedora und Debian ein.
Labels: Insel
VisualVM 1.0 + JDK Integration
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Freitag, Juli 25, 2008.VisualVM ist nun in der Version 1.0 final. Ein erstaunliche Neuerung ist, dass Sun VisualVM in das Update 7 von JDK 6 integriert hat; sonst wurden noch nie in Updates neue Tools integriert.
Die wichtigsten Features von der Webseite:
Display local and remote Java applications. VisualVM automatically detects and lists locally and remotely running Java applications (jstatd must be running on the remote host). You can also define applications manually by JMX connection. This way you can easily see what Java applications are running on your system or check if a remote J2EE server process is alive.
Display application configuration and runtime environment. For each application VisualVM shows basic runtime information: PID, main class, arguments passed to java process, JVM version, JDK home, JVM flags and arguments and system properties.
Monitor application memory consumption and runtime behavior. VisualVM monitors application heap and permanent generation memory, number of loaded classes and running threads. You can easily detect suspicious memory consumption and take an action - invoke garbage collection in the application or take a heap dump and browse the contents of application heap.
Monitor application threads. All threads running in a Java process are displayed in a timeline. You can track thread activity and uncover inefficient patterns like blocked Event Dispatch Thread or unused worker threads.
Profile application performance or analyze memory allocation. VisualVM has a built-in application profiler which can visualize where most of the time is being spent or which objects consume most of the memory by just one mouse click without any additional configuration.
Take and display thread dumps. Taking and displaying a thread dump is as easy as clicking a mouse button. You don't need to deal with the command line at all to determine what's currently happening in the application. Moreover, simultaneous thread dumps of multiple applications can be taken at once to start uncovering distributed deadlocks.
Take and browse heap dumps. When you need to browse contents of application memory or uncover a memory leak in your application, you'll find the built-in HeapWalker tool really handy. It can read files written in hprof format and is also able to browse heap dumps created by the JVM on an OutOfMemoryException.
Analyze core dumps. When a Java process crashes, a core dump can be generated by the JVM containing important information about application state at the time of the crash. VisualVM is able to display application configuration and runtime environment and to extract thread and heap dumps from the core dump.
Analyze applications offline. VisualVM is able to save application configuration and runtime environment together with all taken thread dumps, heap dumps and profiler snaphots into a single application snapshot which can be later processed offline. This is especially useful for bug reports where users can provide a single file containing all the necessary information to identify runtime environment and application state.
Die Webseite sieht auch viel schicker aus (was für die anderen java.net-Projekte aber nicht gilt).
Werbung: Wir haben neue/aktualisierte Seminare.
Labels: Open Source
Doclet APIviz für nette UML-Diagramme
2 Kommentar(e). Veröffentlicht von Christian Ullenboom am Freitag, Juli 25, 2008.APIviz ist ein LGPL-Doclet, welches nicht nur die klassische JavaDoc-API erstellt, sondern gleich dabei noch UML-Diagramme. Die Diagramme werden generiert von http://www.graphviz.org/.
Hier ein Beispiel, wie das nach dem Erzeugen aussieht:
net.gleamynode.netty.buffer
Class HeapChannelBuffer
java.lang.Object
net.gleamynode.netty.buffer.AbstractChannelBuffer
net.gleamynode.netty.buffer.HeapChannelBuffer
- All Implemented Interfaces:
- Comparable<ChannelBuffer>, ChannelBuffer
- Direct Known Subclasses:
- BigEndianHeapChannelBuffer, LittleEndianHeapChannelBuffer
public abstract class HeapChannelBuffer
- extends AbstractChannelBuffer

- Version:
- $Rev$, $Date$
- Author:
- The Netty Project (netty@googlegroups.com), Trustin Lee (trustin@gmail.com)
Labels: Open Source
Thema der Woche: Rich Internet Applications mit OpenLaszlo und ZK
1 Kommentar(e). Veröffentlicht von Christian Ullenboom am Freitag, Juli 11, 2008.Statt wie bei vielen Java Web-Frameworks HTML-Seiten in das Zentrum zu stellen, gehen moderne RIA (Rich Internet Applications)-Frameworks einen anderen Weg. Im Mittelpunkt stehen dort XML-Dateien, die die View beschreiben, angereichert mit JavaScript für die Interaktion und das Ansprechen von Services in der Middle-Tier. Drei der bekannten Frameworks sind:
- OpenLaslo. http://www.openlaszlo.org/, http://de.wikipedia.org/wiki/OpenLaszlo,
- Flex. http://www.adobe.com/de/products/flex/
- ZK. http://www.zkoss.org/
Verschaffe einen Eindruck über die Frameworks mit dem Demos http://www.zkoss.org/demo/, http://www.openlaszlo.org/showcase, http://www.webspiders.com/flex/.
http://www.openlaszlo.org/lps4/laszlo-explorer/index.jsp?lzr=dhtml bietet unter "Laszlo in 10 Minutes " einen Editor auf der einen Seite und eine Ansicht auf der anderen, so dass man über dem Editor, eigene Programme in der Mini-IDE schreiben kann. Entwickle auf diese Weise einen Umrechner von Euro in Dollar.
Installiere den OpenLaszlo Server (http://www.openlaszlo.org/lps4/docs/installation/). Setze den Euro/Dollar-Umrechner in das Verzeichnis. Schreibe eine einfache JSP (oder echten Web-Service über Java 6 wer will; angelehnt an http://rscreeney.wordpress.com/2006/09/19/laszlo-simple-web-service/), die als Service den aktuellen Umrechnugskurs liefert, worauf das eigene OpenLaslo-Programm zurückgreift. (Wer möchte, kann die Lösung gerne hier als Kommentar reinsetzen.)
Labels: Die wöchentliche Dosis Java
Sehr interessanter Java/C-Benchmark
3 Kommentar(e). Veröffentlicht von Christian Ullenboom am Donnerstag, Juli 03, 2008.Stefan hat unter http://www.stefankrause.net/wp/?p=9 die Ausführungszeit von Programme mit unterschiedliche JVMs und C-Compilern getestet. Zwar misst er keine OOP-Eigenschaften, wie die Heap-Allokation, GC oder Kosten für dynamisch gebundene Methodenaufrufe, aber eben die Effizient für Low-Level-Operationen. Gut zu sehen, dass Java auch da schon extrem gut mithalten kann. Ich hätte die Performance bei arithmetischen Operationen gar nicht so gut eingeschätzt. Im Endeffekt gibt es folgendes Ergebnis:
- Der GCC-Compiler und die C-Programme sind in der Regel am Schnellsten. Mal ist Suns JVM sogar schneller.
- Der native-Compiler JET von Excelsior bringt ausgezeichnete Ergebnisse (Platz 2).
- Der oft gepriesene C-Compiler LLVM ist nicht so gut wie gedacht.
- Die Performance von Suns JVM schwankt stark. Mal ist sie ausgezeichnet im Gewinnerfeld, mal weit abgeschlagen in der absoluten Verliererzone.
Praxisrelevant sind diese Benchmarks nur zum Teil. Jetzt ist es interessant zu wissen, wie OOP-Eigenschaften vom C++-Compiler oder von JET umgesetzt werden.
Zwei Open-Source Bibs für Java ME Entwicklung
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Mittwoch, Juli 02, 2008.Wer für die Java ME entwickelt, der muss vieles selbst machen, da die CLDC/MIDP-Bibs doch relativ schwach sind. Zwei Open-Source Bibs, die dort Arbeit abnehmen können, sind:
- kommons - JavaME reusable objects; hat nix mit KDE zu tun :-)
The goal of the project kommons is to provide a set of reusable objects useful to make networking, object persistence (Caching), logging, working with Strings (Iso, UTF8) and many more... - 59pixels Open Source J2ME Libraries
Some of the libraries which 59Pixels have built up over the last year. Most of them are the first generation versions and are not as polished or as efficient as they could be but we have been able to distribute our products on over 150 handsets so I'm sure they will be useful to you.
Labels: Open Source
Apache POI 3.1 final
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Mittwoch, Juli 02, 2008.Von http://poi.apache.org, der Open-Source Bib. zum Verarbeiten von MS Excel-, PowerPoint-, Visio- und Word-Dateien, gibt es eine neue Version. Änderungen sind unter anderem:
Highlights in POI-HSSF - Java API To Access Microsoft Excel Format Files:
- Major improvements in formula evaluation
- Support for conditional formatting
- Support for Excel hyperlinks
- Handling of embedded OLE2 documents
- Support for getting excel cell comments when extracting text
- Support for specifying a policy to HSSF on missing / blank cells when fetching
Highlights in POI-HSLF - Java API To Access Microsoft PowerPoint Format Files:
- Support for getting embedded sounds
- Support for getting embedded OLE objects
- Support for Tables
- Improved text extraction
- Export PowerPoint slides into image
- Java2D Graphics driver
Highlights in POI-HWPF - Java API To Access Microsoft Word Format Files
- Handling of embedded OLE2 documents
- Support for extracting Escher images from HWPF files
- Improved Range.replaceText()
Ich bin gespannt, ob sich mit der MS-Initiative, Dokus anzubieten, die Bib. noch weiter und vollständiger entwickeln wird:
Labels: Open Source

