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 trialAlexander Nowak
498 PointsHow do you the workspaces console.readLine("text"); in IntelliJ IDEA 14
I am trying to complete this task in IntelliJ but can't seem to find the right method to get it to readLine and accept input.
Thanks Guys.
3 Answers
oliverarroyo
7,363 PointsYou could use a simple text editor and use command line (Terminal) to execute the java file. For example, I use Sublime Text as my text editor to write my Java code when following along with the Treehouse videos. I then use Terminal to run my Java file. This works in the same context as workspaces. Hope this helps.
Alexander Nowak
498 PointsThanks Christopher.
Is there anything out there that is the same as workspaces but can be downloaded?
Christopher Augg
21,223 PointsI am not aware of anything you can download that is like workspaces. However, you really don't need to do so either. You can just use the command line of your current operating system or create a new workspace and write your code there. How you use the command line is dependent on the operating system you use. You can use the command prompt in windows or the terminal in OSX. While the video for the terminal is using emacs, you can also look into many other text editors like sublime, nano, vim, and more. On windows I like notepad++ but you will have to use them to see which you prefer.
Please let me know if this helps.
Regards,
Chris
Alexander Nowak
498 PointsThanks Chris!
Andre Colares
5,437 PointsSee this post: http://stackoverflow.com/questions/4644415/java-how-to-get-input-from-system-console You can use "java.io.InputStreamReader" (You have to import this).
And them: BufferedReader NAMEOFTHEREADER = new BufferedReader(new InputStreamReader(System.in)); System.out.print("ENTER YOUR QUESTION HERE"); String WHATEVER = NAMEOFTHEREADER.readLine();