Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Java Java Basics Using your New Tools Coding the Prototype

why doesn't this code work in eclipse (or why doesn't it work in MY eclipse)?

I can't get the console.readLine or console.printf to work in my eclipse. I did the import of java.io.Console but it still doesn't work.

1 Answer

Ken Alger
STAFF
Ken Alger
Treehouse Teacher

Churchel;

Both Eclipse and IntelliJ have, um, issues(?) with utilizing the console commands as they do not seem to natively run a console. There are work arounds for that, for which I would suggest looking at stackoverflow.com or doing a Google search for your particular version of Eclipse and console command replacement.

The other option would be to utilize the Workspace feature here on Treehouse. You should be able to write your code there and test it using the console without issue. You could also compile and run your code outside of Eclipse.

At least that has been my experience with using console features and those two IDEs. Perhaps my development environment is just very wacky.

Ken