Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
victor ghosh
724 PointsHelp using Console on Eclipse
I have made a mad libs on the workspace here and it works but when I move it to Eclipse I cannot type into the console... When I run it I get the error "Exception in thread "main" java.lang.NullPointerException at TestPackage.TestClass.main(TestClass.java:14)" Please help me by saying how or if I can communicate to the console on Eclipse like I do here for things such as "javac" and "clear" and jShell
Jeremy Hill
29,567 PointsJeremy Hill
29,567 PointsIn Eclipse you don't do console.printf like you do on treehouse. You can use the Scanner class.
You might be able to set up the Console object to print to the console in Eclipse but I didn't have much luck with it. I haven't coded in java in a while but hopefully this helps.