Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / January 2007

Tip: Looking for answers? Try searching our database.

System.console().readPassword(); does not work in Eclipse3.2

Thread view: 
xmx - 06 Jan 2007 10:12 GMT
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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.