Archiv der Kategorie: Entwicklungsumgebung

Was Eclipse bisher bei Java 9 unterstützt


Feature / Steps
Expected Result

The Pre-requisite: Java 9 JRE Support

Add Java 9 JRE
Use Eclipse Preferences -> Java -> Installed JREs -> Add


Java 9 JRE recognized as a valid JRE

Project JRE
In Package Explorer Use Project Context Menu and add Java 9 JRE
JRE specific (eg Object) gets resolved in the project.

Package Explorer
Go to Package Explorer and expand the Java 9 JRE
Modules (eg java.base etc) are listed in the package explorer view

The First Step: Module Creation

Context Menu of src -> New -> File – give the as name
no compiler errors

Context Menu of Project -> Cofigure -> Create module-info.


A default with all packages exported should be created

Basic Necessity : Compilation, Module Dependency & Error Reporting

Unspecified Dependency
create projects "first" and "second" and create files in each of giving the module names "first" and "second" respectively.

In the first module add the directive requires second; . This initial configuration would look something similar to the one shown in the figure.

Compiler gives error "second cannot be resolved to a module"

Define Dependency
In the above scenario, add Project second as a dependent project for project first
Compiler error goes away

Duplicate Dependency
Continuing from the above scenario, add a duplicate requires second; directive in the file of the first
Compiler gives error "Duplicate requires entry: second"

Circular Dependency
add a circular dependency ie

add second project dependent on first
add requires first; directive in the file of the second project ie replace // empty by design comment by this directive

Two compiler errors " Cycle exists in module dependencies, Module second requires itself via first"

Editing with Ease: Completion in file

Keyword Completion (1)
In the file of say second project, after module first {, press completion key (for eg, ctrl+space in windows)


keywords exports, opens, requires, provides and uses shown

Keyword Completion (2)
after exports packagename, or opens packagename press completion key
keyword to is shown as an option

Package Completion
after exports, opens, provides or uses, press completion key
package completion shown.

Type Reference Completion
after exports, opens, provides or uses, or optionally after a dot after a package, ie exports packagename. press completion key
Type completion shown.

Implementation TypeRef Completion
after provides typename with press completion key
Type completion shown and these typereferences are implementations of the type given before with.

The Essential Utilities: Code Select, Hover, Navigate, Search and Rename

Module Select & Hover

In the file of the first project, select second in the requires second; directive

Hover appears

Module Select, Hover & Navigate
In the above scenario, after hover appears, click on the navigate file of second opened

Module Select, & Search

In the file of the second project, select second in module declaration module second { and search for references

In the search view, the reference in directive requires second; in file first -> is shown.

Package Search

create package pack1 to the project first.
add exports pack1; directive in file of first.
search for references of pack1

In the search view, the reference of pack1 in directive exports pack1; in file first -> is shown, similar to other pack1references if any

Type Search
create Type X in the project first, add directive uses X; in file of first, and search for references of X
In the search view, the reference of Xin directiveuses X; in file first -> is shown, similar to other Xreferences if any

Code Select & Rename
in file of first, select X in directive uses X; and rename to X11
rename exhibits usual behavior – renames definition and references of Xto X11

The Outlier: Milling Project Coin Enhancements

@SafeVarargs is now allowed on private instance methods. There is even a support of quick assist for that. Use the following code which has warnings, and use the quick assist at the point mentioned in the comment

package packsafe;
import java.util.ArrayList;
import java.util.List;   public class SafeVar {
	private int getLen(List<String>...list) {
		List<String>[] l = list;
		return l.length;
	}   public static void main(String[] args) {
		SafeVar x = new SafeVar();
		List<String> l = new ArrayList<>();
		int len = x.getLen(l); // Use Quick Assist of SafeVarargs here<br>
		System.out.println("Length:" + len);

@SafeVarargsinserted before getLen() and the warnings go away

Effectively Final Autoloseables

Effectively-final variables are allowed to be used as resources in the try-with-resources statement. The code below has an error. Try removing the line t1 = null; // Remove this code .

package packtry;
import;   class Two implements Closeable {
	public void close() throws IOException {
		// nothing
public class TryStmtTwo {   public void foo() throws IOException {
		Two t1 = new Two();
		try (t1; final Two t2 = new Two()) {
		// Empty by design
	t1 = null; // Remove this code
	public static void main(String[] args) {

Code without errors. For the more inquisitive, check the generated code to see that the close is generated for t1 as well which is not a final variable but an effectively final variable.

Anonymous Diamond

In the following code, there is a warning about Y being a raw type and need to be parameterized. with Java 9 support, just add a diamond operator after Y.

public class Dia {
	public static void main(String[] args) {
		Y<?> y1 = new Y(){}; // Change this to new Y<>(){}
class Y<T> {}

Diamond operator <>accepted and code compiles without warning

Illegal Underscore

Underscore is an illegal identifier from Java 9 onwards. Uncomment the commented line in the following example

public class UnderScore {
	//Integer _ ;

error: "’_‘ should not be used as an identifier, since it is a reserved keyword from source level 1.8 on"

Private Methods

private interface methods are allowed. Change the default of worker to private

public interface I {
	default void worker() {}<   default void foo() {
	}   default void bar() {

Code compiles with privateas well. Note that this is a useful feature if two default methods wants to share the worker code and does not want the worker to be an public interface method.

Eclipse Oxygen (4.7) ist fertig

Alle Neuerungen unter


Unter Java 9 bedarf es Vorbereitungen für den Start:

Launching on Java 9

If you are launching eclipse with a Java 9 build (either via system or via -vm option in eclipse.ini file) then, in eclipse.ini file, after -vmargs line add --add-modules=ALL-SYSTEM. This should launch eclipse. If you get an IllegalAccessException or InaccessibleObjectException, you can add --permit-illegal-access additionally after the -vmargs.



The switches can be entered on the command line after -vmargs, e.g.

$ ./eclipse -vm *[path to jdk9]*/bin -vmargs --add-modules=ALL-SYSTEM --permit-illegal-access


Support for Building Java 9 Applications

The Java™ 9 specification has not been released yet and so support has not yet been integrated into our standard download packages. You can add an early access preview to the Eclipse IDE, Oxygen Edition (4.7).

The Eclipse Java™ 9 Support (BETA) contains the following:

  • ability to add JRE and JDK 9 as installed JRE;
  • support for JavaSE-9 execution environment;
  • ability to create Java and Plug-in projects that use a JRE or JDK 9; and
  • ability to compile modules that are part of a Java project
  • For up-to-date information, please see Java 9 Support (BETA) for Oxygen in the Eclipse Marketplace.

Install the beta by dragging the install button onto your running Eclipse IDE, Oxygen Edition instance.

UML-Diagramme mit Eclipse Papyrus

Papyrus ( ist ein Modellierungswerkeug, mit dem UML-Diagramme gezeichnet und generiert werden können.


  1. Help -> Install New Software mit Papyrus selbst:
    – „Papyrus“ auswählen -> installieren
  2. Help -> Install New Software mit:
    – Papyrus Designer Category“ aufklappen
    – „Papyrus Java profile library and code generation (Incubation)“ auswählen -> installieren

Weitere Schritte

  1. New -> Other… -> Papyrus -> Papyrus Model erstellen
  2. Windows -> Show View -> Model Explorer / oder Create View im Model
  3.  Im Model Explorer Rechtsklick auf das RootElement: New Diagram -> Class Diagram
  4. Anschließend können einzelne Klassen oder Pakete per Drag & Drop reingezogen werden.


Alle Elemente die man reingezogen hat können markiert werden um folgende Operationen durchzuführen:

  1. Rechtsklick -> Filters -> Show/Hide Contents : Anzeigen/Ausblenden von Attributen und Operationen etc.
  2. Rechtsklick -> Filters -> Show/Hide Related Links: Anzeigen/Ausblenden der Klassenbeziehungen zueinander
  3. Rechtsklick -> Arrange All : Ordnet alle Elemente übersichtlich innerhalb der Model an
  4. Rechtsklick -> Filters -> Show/Hide Compartments: Anzeigen/Ausblenden der Abteile (für Attribute/Operationen/“nested classifiers“ etc.)

Eclipse 4.7 M3 (Oxygen)

Alle Neuigkeiten unter

Für mich interessanter sind:

Ctrl+E command improvements You can use the Quick Switch Editor (Ctrl+E) command to list and filter all the open editors. This works now also if you have selected a view in the editor area. You can filter the list using wildcards, and select editors using mouse or keyboard.Now you can also cycle through the list by pressing Ctrl+E again. Or use Arrow Up/Down as before.

Na endlich:

Escape text when pasting into a string literal The Java > Editor > Typing > Escape text when pasting into a string literalpreference option is now enabled by default. This will escape the special characters in pasted strings when they are pasted into an existing string literal.

To paste without escaping, you can either paste outside of a string literal, or you can disable Edit > Smart Insert Mode.

Eclipse Oxygen (4.7) M2 Neuigkeiten

Alle Neuigkeiten unter

Für mich als Java-Programmierer ist eignetlich nur das interessant:

Method result after step operations During debugging, the last method result (per return or throw) that was observed duringStep Into, Step Over or Step Return, is shown as first line in the Variables view.

This can be disabled with the new option Preferences > Java > Debug > Show method result after a step operation (if supported by the VM; may be slow)

Release Date für das GA:  Wednesday, June 28, 2017

Eclipse 4.6 (Neon) News

Alle News unter

Interessant sind:

Commands and shortcuts to zoom in text editors In text editors, you can now use Zoom In (Ctrl++ or Ctrl+=) and Zoom Out (Ctrl+-) commands to increase and decrease the font size.Like a change in the General > Appearance > Colors and Fonts preference page, the commands persistently change the font size in all editors of the same type. If the editor type’s font is configured to use a default font, then that default font will be zoomed.
Full Screen The Full Screen feature is now also available on Windows and Linux. You can toggle the mode via shortcut (Alt+F11) or menu (Window > Appearance > Toggle Full Screen).When Full Screen is activated, you’ll see a dialog which tells you how to turn it off again.

On the Mac, Window > Toggle Full Screen (Control+Command+F) still works as before.

Substring code completion Content Assist now supports substring patterns. Enter any part of the desired proposal’s text, and Content Assist will find it! For example, completing on selection proposes all results containing selection as a substring.Popup with proposals like addSelectionListener(..), getSelection(), etc.

This feature can be disabled using the Show substring matches option on the Java > Editor > Content Assist preference page.

Clean Up to remove redundant type arguments A new option to remove redundant type arguments has been added under the „Unnecessary Code“ group of the Clean Up profile.
Create new fields from method parameters You can now assign all parameters of a method or constructor to new fields at once using a newQuick Assist (Ctrl+1):Assign all parameters to new fields
Quick Fix to configure problem severity You can now configure the severity of a compiler problem by invoking the new Quick Fix (Ctrl+1) which opens the Java > Compiler > Errors/Warnings preference page and highlights the configurable problem.

The Quick Fix icon may look familiar to you. In older Eclipse versions, this was a toolbar button in enriched hovers (i.e., you had to press F2 or move the mouse into the hover to see it).




UML-Werkzeuge für die Java-Entwicklung

Hier eine Auswahl von Produkten:

§ Enterprise Architect ( ist ein Produkt von Sparx Systems; es unterstützt UML 2.5 und bietet umfangreiche Modellierungsmöglichkeiten. Für die Business & Software Engineering Edition Standard License sind 599 USD fällig. Eine 30-tägige Testversion ist frei. Das Tool ist an sich eine eigenständige Software, die Integration in Eclipse (und MS Visual Studio) ist möglich.

§ MyEclipse ( von Genuitec besteht aus seiner großen Sammlung von Eclipse-Plugins, unter anderem auch mit einem UML-Werkzeug. Einblick in das kommerzielle Werkzeug gibt

§ ObjectAid UML Explorer for Eclipse ( ist ein kleines und kompaktes Werkzeug, das Klassen aus Eclipse einfach visualisiert. Es entwickelt sich langsam zu einem größeren kommerziellen Produkt.

§ TOPCASED/PolarSys ( ist ein umfangreicher UML-Editor für Eclipse.

§ Together ( ist ein alter Hase unter den UML-Tools – mittlerweile ist der Hersteller Borland bei Micro Focus gelandet. Es gibt eine 30-tägige Demoversion. Die Version 12.7 basiert auf Eclipse 4.4, ist also hinreichend aktuell.

§ Rational Rose ( ist das professionelle UML-Werkzeug von IBM. Es zeichnet sich durch seinen Preis aus, aber auch durch die Integration einer ganzen Reihe weiterer Werkzeuge, etwa für Anforderungsdokumente, Tests usw.

§ UMLet ( ist ein UML-Zeichenwerkzeug und geht auf ein Projekt der Vienna University of Technology zurück. Es kann alleinstehende eingesetzt oder in Eclipse eingebettet werden. Auf Google Code liegt der offene Quellcode:

§ Der quelloffene UML Designer ( greift auf viele Eclipse-Projekte zurück.

§ UML Lab von yatta (

Viele Werkzeuge kamen und gingen, unter ihnen:

§ eUML2 ( und EclipseUML von Omondo ( sind Eclipse-basierte UML-Tools. Es gibt ältere freie, eingeschränkte Varianten. eUML2 basiert auf Eclipse 4.3, die letzte Version ist von Dezember 2013. Bei EclipseUML hält das Unternehmen sogar an Eclipse 3.7 fest, und schreibt „Omondo will not anymore deliver builds for Eclipse 4 because it was a technological failure.“

§ ArgoUML ( ist ein freies UML-Werkzeug mit UML 1.4-Notation auf der Basis von NetBeans. Es ist eigenständig und nicht in Eclipse integriertEnde 2011 stoppte die Entwicklung, die letzte Version ist 0.34.

§ NetBeans hatte lange Zeit ein schönes UML-Werkzeug, das jedoch nicht auf die neuen Versionen portiert wurde.

Fehlt was?