Java Java Basics Getting Started with Java Receiving Input

Okei so i have done some java before and in Eclipse. The command console.print(); is confusing me and some others.

My concern is that it is confusing me. The work i have done in Eclipse the commands are different then in here.

Steve Hunter
Steve Hunter
Treehouse Moderator 57,551 Points

Hi Mihkel,

What exactly is confusing you? What else is, or are the others you mention people?

I'm not clear what your question is so I'd like a bit more info so I can try to help.

Steve.

well for example console.readLine(); does not work in Eclipse and as i understand that is the main place where people actually code. If i learn stuff here in console that are different in Ecplice will i be confused later on?

1 Answer

Steve Hunter
MOD
Steve Hunter
Treehouse Moderator 57,551 Points

Hi Mihkel,

The issue here is not Eclipse, it is how an IDE handles the Console instance or, doesn't, more to the point!

You can run a program using Console in code generated with the IDE but you need to run it outside of the IDE environment. You can create a console application and run that from the command line and it should work fine. If you want to run from within the IDE, try an alternative such as Scanner or System.in.

I needn't go on - there are hundreds of Stack Overflow posts with some excellent solutions and workarounds. Have a quick Google.

As for Eclipse being the most popular IDE; maybe it is. Others may prefer Intelli-J but they'd have this problem too. I guess the reason for this is that command line apps aren't really what most people are writing. And if they are, they run them from the command line, not from the IDE.

I hope that helps.

Steve.