Siehe Ankündigung http://tomsondev.bestsolution.at/2014/08/15/efxclipse-1-0-released/.
Autor: Christian Ullenboom
Java SE 8u20 freigegeben
Download unter http://www.oracle.com/technetwork/java/javase/downloads/index.html#JDK8. Die Seite http://www.oracle.com/technetwork/java/javase/8u20-relnotes-2257729.html gibt viele Neuerungen für Java 8u20 an.
Verwandtschaft von Methode und Konstruktor
Methoden und Konstruktoren besitzen beide Programmcode, haben eine Parameterliste, Modifizierer, können auf Objektvariablen zugreifen und this verwenden – das sind ihre Gemeinsamkeiten. Ein schon erwähnter Unterschied ist, dass Methoden einen Rückgabetyp besitzen (auch wenn er nur void ist), Konstruktoren aber nicht. Zwei weitere Unterschiede betreffen die Syntax und Semantik.
Konstruktoren tragen immer den Namen ihrer Klasse, und da Klassennamen per Konvention großgeschrieben werden, sind auch Konstruktoren immer großgeschrieben – Methoden werden in der Regel immer kleingeschrieben. Und Methoden sind in der Regel Verben, die das Objekt anweisen etwas zu tun, Klassennamen sind Nomen und keine Verben.
Der Programmcode eines Konstruktors wird automatisch nach dem Erzeugen eines Objekts von der JVM genau einmal aufgerufen, und zwar als erstes vor allen anderen Methoden. Methoden lassen sich beliebig oft aufrufen und unterliegen der Kontrolle des Benutzers. Konstruktoren lassen sich später nicht noch einmal auf einem schon existierenden Objekt erneut aufrufen und so ein Objekt reinitialisieren. Der Konstruktor-Aufruf ist implizit und automatisch mit new verbunden und kann nicht getrennt vom new gesehen werden.
Zusammenfassend können wir sagen, dass ein Konstruktor eine Art spezielle Methode zur Initialisierung eines Objektes ist.
JVM-Interna: „Ein Java-Compiler setzt Konstruktoren als void-Methoden um, die „<init>“ heißen“.
Dilbert passt heute gut zu uns Entwicklern
JEP 199: Smart Java Compilation, 2. Phase
JEP 199 http://openjdk.java.net/jeps/199 empfiehlt eine Überarbeitung des Tools sjavac, was ein “smarter” Compiler ist. Der Blogpost http://stokito.wordpress.com/tag/sjavac/ von Sergey Ponomarev beschreibt, was es mit sjava auf sich hat.
Release 18.0-rc1 von Google Guava freigegeben
Zu den Neuerungen und Details siehe https://code.google.com/p/guava-libraries/wiki/Release18.
Note: As of Guava 18, we will no longer be releasing JDK5 backports.
FXGRAPHICS2D: eine Java2D auf JavaFX Brücke
Ankündigung der neuen Version unter http://www.jroller.com/dgilbert/entry/fxgraphics2d_1_1, Homepage unter http://www.jfree.org/fxgraphics2d/, Source unter https://github.com/jfree/fxgraphics2d. Keine Standard-Lizenz!
Linktipp: Exception Handling in Asynchronous Java Code
Auch das ist Java
Apache Commons Logging Version 1.2
Kaum zu glauben, aber von Apache Commons Logging gibt es noch einmal ein Update. Version 1.2 bietet als “maintenance release containing bug fixes” nichts neues, fixed aber laut https://www.apache.org/dist/commons/logging/RELEASE-NOTES.txt:
o LOGGING-37: Improve performance of LogFactory#getFactory() by calling Thread#currentThread()#getContextClassLoader() directly instead of using reflection. As a consequence support for JDK 1.1 has been dropped. Thanks to Matthias Ernst, Archie Cobbs. o LOGGING-156: Fix SecurityAllowedTestCase when executed with OpenJDK 1.7 due to an additional required RuntimePermission. Thanks to Mikolaj Izdebski. o LOGGING-157: Fix javadoc to comply with javadoc tool from jdk 1.8. Thanks to Ville Skyttä.
Aktuelle öffentliche Java-Seminare in Dortmund
- 18.08.-22.08.2014 (KW 34)
- 13.10.-17.10.2014 (KW 42)
- 06.10.-10.10.2014 (KW 41)
- 25.08.-29.08.2014 (KW 35)
- 20.10.-24.10.2014 (KW 43)
JDK 8u20 Early Access Release, JDK 8u20 build b22
https://jdk8.java.net/download.html, mit drei Änderungen eher ein kleines Release
GMapsFX
Die GMapsFX-Bibliothek unter der Apache Lizenz bindet die Google Maps in eine Java-Applikation ein und bietet eine Java-API für Kartenelemente wie Pin oder Verbindungen. Java 8 ist Voraussetzung.
Gradle 2.0 freigegeben
Das auf Groovy basierende Build-Tool Gradle erklimmt eine neue Version: Gradle 2.0. http://www.gradle.org/docs/current/release-notes zählen auf:
Gradle 2.0 is an important milestone in the evolution of Gradle. As explained in the Gradle 2.0 announcement, the change in major version number signals a new backwards compatibility baseline. Many deprecated features and API have been removed in this release, allowing the development team to simplify the codebase and implement new functionality. The “Potential Breaking Changes” section of these release notes list all of the breaking changes that have been made and all Gradle users are strongly encouraged to read the list.
FindBugs 3.0
Ein neues großes Release mit Java 8 Unterstützung, siehe Ankündigung unter https://mailman.cs.umd.edu/pipermail/findbugs-discuss/2014-July/004029.html.
The primary changes are: FindBugs supports Java 8 now (both as runtime and target platform). We don't recognize all of the new Java 8 features, or detect many Java 8 specific bug patterns, but we can analyze Java 8 code without getting runtime exceptions. FindBugs requires minimum Java 7 as runtime environment! FindBugs uses ASM 5 now which means that some 3rd party detectors based on FindBugs 2.x/ASM 3 has to be upgraded. See details in ASM documentation. For people who need to run FindBugs using a Java 5 or 6 runtime, you should stick with the FindBugs 2.0 branch.
Weiter unter http://findbugs.sourceforge.net/.
asciidoctorj: asciidoc mit Java transformieren
http://asciidoctor.org/ ist laut Webseite “an open source Ruby processor for converting AsciiDoc markup into HTML 5, DocBook 4.5 and other formats”. Die Software ist in Ruby implementiert und so plattformunabhängig programmiert, dass auch eine Ausführung mit JRuby möglich ist. https://github.com/asciidoctor/asciidoctorj kapselt das in einem netten Projekt, sodass eine Konvertierung direkt mit einer Java-API möglich ist:
import static org.asciidoctor.Asciidoctor.Factory.create; import org.asciidoctor.Asciidoctor; ... Asciidoctor asciidoctor = create();...
String rendered = asciidoctor.render("*This* is it.", Collections.EMPTY_MAP); System.out.println(rendered);
... String rendered = asciidoctor.renderFile(new File("target/test-classes/rendersample.asciidoc"), Collections.EMPTY_MAP); System.out.println(rendered); ...
Mit Optionen:
Map<String, Object> attributes = new HashMap<>(); attributes.put("backend", "docbook"); Map<String, Object> options = new HashMap<>(); options.put("in_place", true); options.put("attributes", attributes); String render = asciidoctor.renderFile("target/test-classes/rendersample.asciidoc", options);
Project Jigsaw: Phase zwei
Eclipse 4.4 (Luna) ist da
http://eclipse.org/luna/, 76 Projekte werden koordiniert, eine stolze Leistung. Download unter http://eclipse.org/downloads/
Schön ist Code Recommenders, doof ist, dass das Google Plugin für GWT noch nicht unterstützt wird. Welches eurer geliebten Plugins wird noch nicht unterstützt?
Neue Runtime-Umgebung für Android – heise online
DataNucleus 4.0
Unter der Apache Lizenz:
It is the most standards-compliant Open Source Java persistence product in existence. It is fully compliant with the JDO1, JDO2, JDO2.1, JDO2.2, JDO3, JDO3.1, JPA1, JPA2, JPA2.1 Java standards. It also complies with the OGC Simple Feature Specification for persistence of geospatial Java types to RDBMS. It utilises an OSGi-based plugin mechanism meaning that it is extremely extensible.
http://www.datanucleus.org/. Neues: http://www.datanucleus.org/documentation/news/access_platform_4_0_0_release.html:
- Java 1.8 : Upgrade to ASM v5 to allow for Java 1.8 bytecode changes
- Java 1.8 : support for the majority of java.time types
- Changed the bytecode enhancement contract to use an internal definition rather than the JDO contract
- JPA : no longer needs to have jdo-api.jar present
- Cassandra : support for Cassandra 1.2+
- Support for multicolumn TypeConverters (used by RDBMS, Cassandra, Excel, ODF, Neo4j, MongoDB, JSON, HBase)
- SchemaTool : support for create/delete of a schema (where the datastore supports it)
- RDBMS : support for HikariCP and DBCP2 connection pools
- RDBMS : ability to use single connection per PM/EM (rather than 1 for transactional operations, and 1 for non-transactional operations)
- RDBMS : removed the need to create JavaTypeMapping classes when the user type has a TypeConverter
- JSON : support for embedded 1-1 relation fields/properties
- Excel/ODF/JSON/MongoDB/Neo4j/HBase/Cassandra : move to using „core“ definition of table/columns meaning access to generalised features tested on other datastores