Autoboxing und Eclipse

  • Themenstarter Themenstarter Beni
  • Beginndatum Beginndatum
Status
Nicht offen für weitere Antworten.
B

Beni

Gast
Folgender Code:
Code:
import bibliothek.util.AVLTree;

public class Main{
  public static void main( String[] args ){
    AVLTree<Integer, String> tree = new AVLTree<Integer, String>();
    tree.put( 2, "hallo" );
    System.out.println( tree.get( 2 ) );
  }
}
ist, Java 1.5.0 technisch gesehen, korrekt und mit javac kompilierbar (und auch danach ausführbar).

Nicht jedoch mit Eclipse (M3.1), offenbar wird das Autoboxing nicht erkannt. Muss man dazu vielleicht eine der 1000en von Einstellungen verändern? Hat das schon jemand ausprobiert/herausgefunden?
 
eclipse scheint das noch nicht zu unterstützen...
es ist aber geplant in version 3.1 hinzuzufügen... vielleciht mit dem nächsten mileston ende september
 
Ich denke, Eclipse hat damit nicht zu tun, sondern das PlugIns namens JDT.
Die Entwicklung scheint mir aber langsam voran zu kommen ...
 
Folgender Link sollte Klarheit bringen:

http://download2.eclipse.org/downloads/drops/S-3.1M2-200409240800/eclipse-news-M2.html

The changes to the Java tools to support J2SE 5.0 (aka 1.5) are proceeding nicely. The Eclipse Java compiler now handles generics, enhanced for loops, and hexadecimal floating point literals (at this point we're passing 96.8% of the JCK1.5 compliance tests). The other language additions - enumerations, annotations, static imports, varargs, autoboxing - make it past the parser, but are not yet being processed any deeper than that. Support for these other new language features will be introduced in future 3.1 milestones.

In order to work with any of the new language features you must set the Java project's compiler compliance level to 1.5 (Java Compiler > Compliance and Classfiles > Compiler compliance level > 1.5) and configure the Java build path with the system libraries from an installed 1.5 JRE.
 
Status
Nicht offen für weitere Antworten.

Zurück
Oben