- This topic has 2 replies, 2 voices, and was last updated 19 years ago by Roel De Nijs.
-
AuthorPosts
-
Roel De NijsMemberWhat operating system and version are you running? WinXP Professional SP 2
What Eclipse version and build id are you using? Version: 3.1.1 Build id: M20050929-0840
– Was Eclipse freshly installed for MyEclipse? Yes
– Are any other external plugins installed? No
– How many plugins in the <eclipse>/plugins directory are like org.eclipse.pde.* 4
What MyEclipse version are you using? Version: 4.0.1 Build id: 20050930-4.0.1-GA
What JDK version are you using to run Eclipse? jdk1.5.0_04
What JDK version are you using to launch your application server? jdk1.5.0_04
What application server are you using? Tomcat 5.0
Are there any exceptions in the Eclipse log file? No
What steps did you take that resulted in the issue?I wanted to change the following line of code
private transient Logger logBestand = Logger.getLogger(Login.class);
with
private transient Logger logBestand = Logger.getLogger(Class<Login>);
If you read documentation of new Java 5.0 features this should be possible, but i got following error
Severity = 2 Description = Syntax error on token ">", Expression expected after this token Id = 103043
Of course i changed the compiler compliance level to 5.0 and i don’t have any problems with other generics (e.g. HashMap<String, String> works fine).
ps. the class Logger is from the log4j-package
Riyad KallaMemberhysterio,
Are you having this trouble while editing a Java source file? The Java editor is provided by the base JDT project from eclipse.org, we don’t instrument it in any way.
Roel De NijsMemberHi,
It’s my mistake: class literal Foo.class is of type Class<Foo> and that’s not the same thing as Foo.class itself (so the error shown is logical).
Greetz
And thanks for the quick reply -
AuthorPosts