I am trying to get a Console using System.console() method,
but it returns null. Please let me know how to get a Console object?
Is their other criteria need to be satisfied?
java_programmer 0 Junior Poster
Recommended Answers
Jump to PostDid you read the API doc? It says:
Returns the unique Console object associated with the current Java virtual machine, if any.
I assume the "if any" means there might not be a console.
Why do you think there is a console for the JVM?
There wouldn't be if …
Jump to PostHow did you start its execution?
Did you open a command prompt window and enter the java command there or how?
All 6 Replies
NormR1 563 Posting Sage Team Colleague
tong1 22 Posting Whiz
java_programmer 0 Junior Poster
NormR1 563 Posting Sage Team Colleague
java_programmer 0 Junior Poster
NormR1 563 Posting Sage Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.