Linked Questions

1 vote
1 answer
319 views

I want to prompt the user for a password in a Java code, and I'd rather not have the input printed to the screen for security reasons. I am aware of the class Console, but I would like to be able to ...
user2891462's user avatar
  • 3,343
90 votes
13 answers
104k views

I was using readLine of BufferedReader to get input/new password from user, but wanted to mask the password so I am trying to use java.io.Console class. Problem is that System.console() returns null ...
Gauls's user avatar
  • 1,965
54 votes
7 answers
56k views

I have just started learning Java with IntelliJ IDE. I know a bit C# so the logic makes some sense, however there is one thing so far I couldn't get over it. How do I read from the console? In C#, ...
LidorA's user avatar
  • 667
16 votes
4 answers
13k views

I want to make a Java program that reads a Password from STDIN silently. I mean, without outputting any pressed chars to the terminal and keeping it hidden from commandline history and the operating ...
rfgamaral's user avatar
  • 16.9k
4 votes
6 answers
67k views

I would like to know about other ways of getting input from users using other classes like BufferedReader,etc rather than using Scanner class. So, was there any other way of getting input from the ...
Gowtham's user avatar
  • 12.2k
8 votes
5 answers
12k views

I have tried code: import java.io.Console; public class Default { public static void main(String args[]) throws IOException { Console console = System.console(); String ...
Enthusiastic's user avatar
6 votes
2 answers
6k views

When I use System.console from Eclipse Helios, it always returns null. However, when I use it directly from command line (i.e. compiling and executing a java source code manually from command prompt)...
whitehat's user avatar
  • 2,390
0 votes
4 answers
18k views

When I start a java application, the Java Console is started. But when I start a java application from Eclipse, the Java Console does not start on its own. How can I make it start also when I run an ...
Jenny Smith's user avatar
  • 3,017
3 votes
3 answers
4k views

I tried the java.io.Console API using eclipse. My sample code follows. package app; import java.io.Console; public class MainClass { /** * @param args */ public static void main(...
Bharani's user avatar
  • 303
2 votes
5 answers
5k views

import java.io.*; public class ConsoleDemo { public static void main(String[] args) { String str; Console con; con = System.console(); if (con == null) return; str = ...
rIshab1988's user avatar
1 vote
2 answers
2k views

First of all, I read all related topics and none of them answered my question. I am developing a program in Java using Eclipse and I need to pass some arguments to the program continously after it ...
Oralet's user avatar
  • 347
3 votes
1 answer
5k views

Possible Duplicate: System.Console() returns null Code: public class Demo { public static void main(String[] args){ Console c = System.console(); if (c == null) { System.err....
user710818's user avatar
  • 24.4k
1 vote
5 answers
3k views

import java.io.Console; public class Talk { public static void main(String[] args) { Console c = System.console(); String pw; System.out.print("password: "); pw = ...
user2985842's user avatar
0 votes
5 answers
2k views

Since I've been learning Java, I've been able to create GUI programs. However, even simple "Hello World!" programs will not work, if they require a console. My research on the topic has lead me to the ...
Mackenzie's user avatar
  • 1,927
3 votes
2 answers
3k views

I have both a Java and a PyDev project in one workspace. When I run the PyDev project (either the main script with Run > Run As > Python Run or its associated unit test with Python unit-test), the ...
Eric W.'s user avatar
  • 814

15 30 50 per page