Problems with printf

Hi..

I have recently updated to 1.5 java version. I wrote a simple program but it seems to be having some problem with some commands (only). Say printf.

I get the following error on compilation.

The method printf(String, Object[]) in the type PrintStream is not applicable for the arguments (String, double)

The errorneous code is:

double pi = Math.PI;

System.out.printf ("pi = %5.3f%n", pi);

Same is the case with integers and other types.

I use eclipse 3.0.1 version and I have imported the latest jre system library to the env. Any idea why this is happening?

Cheers,

-Lal

[642 byte] By [lalc] at [2007-9-30 21:56:26]
# 1
Eclipse 3.0.1 doesn't understand Java 5.0 language changes. Eclipse contains its own Java compiler, so installing JDK 5.0 won't help.Compile with javac or wait for Eclipse 3.1 (release target 2Q2005).
sjasja at 2007-7-7 3:24:17 > top of Java-index,Administration Tools,Sun Connection...