I use jdk6 and Eclipse3.2
When I run the following codes in eclipse:
---------------code begins---------------------------------
public class Test {
public static void main(String[] args) {
System.console().readPassword();
}
}
---------------code ends------------------------------------
I get this:
--------------------------------
Exception in thread "main" java.lang.NullPointerException
at HelloWorld.main(HelloWorld.java:3)
--------------------------------
But it runs well in command line.
Who can tell me why?
Is this a bug of eclipse or jdk6?
Thanks very much!
Flo 'Irian' Schaetz - 06 Jan 2007 11:21 GMT
And thus spoke xmx...
> Who can tell me why?
> Is this a bug of eclipse or jdk6?
Afaik: Eclipse does not support that console yet. Perhaps in 3.3.
Flo