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

Java Java Objects Meet Objects Welcome Back

Is there a jshell for netbeans idle?

jshell in idle

I have only encountered IDLE as part of Python. (https://docs.python.org/2/library/idle.html)

NetBeans describes itself as, "the official IDE for Java 8." The jshell is part of Java 9. So I wouldn't expect it to have support for it. I would ask the NetBeans Community (https://netbeans.org/community/index.html) about this. They can probably give you a more complete answer.

1 Answer

Netbeans is an IDE (Integrated development environment). It's just going to help you organize/debug your code. 'jshell' is an 'application/command' of its own.

Here are some instructions on how to get it running on your PC.

Starting and Stopping JShell

JShell is included in JDK 9. To start JShell, enter the jshell command on the command line.

JDK 9 must be installed on your system. If your path doesn’t include java-home/jdk-9/bin, start the tool from within that directory.

The following example shows the command and the response from JShell. Text that you enter is shown in bold:

% jshell
|  Welcome to JShell -- Version 9
|  For an introduction type: /help intro


The examples in this tutorial use the verbose mode. Verbose mode is recommended as you work through this tutorial so that what you see matches the examples. When you are more familiar with the tool, you might prefer to run in normal or a more concise mode.

To start JShell in verbose mode, use the -v option:

% jshell -v
To exit JShell, enter /exit:

jshell> /exit
|  Goodbye

If I was able to help. Please mark my response as the answer.

Thank you!