In my last blog [1], I showed, how to use the upcoming Java Shell within a NetBeans terminal window. By now, this is fine using Linux. Using Windows, you need to install cygwin to run a terminal window, because the native windows prompt is not supported yet. And launching JShell within the NetBeans (cygwin) terminal still has a display issue. Today I tried an alternative: The Java Platform Shell.The Java Platform Shell is available within the prototypes-repl build [2]. Its in an early state and yet not included within the nightly builds. Unlike the JShell which is available as part of the JDK9, you can run NetBeans Java Platform Shell with Java 8. Even more, currently this is more stable than running NetBeans with Java 9 as default platform.

NetBeans Java Platform ShellNetBeans Java Platform ShellOf course, there is still a lot of development to do. For example, NetBeans displays some errors (red balls in the image), even though the statements are ok. Another construction area is code completion. Whilst JShell offers a code completion by Tab, this key will repeat the last statement, deleting the current line. Hopefully, the NetBeans team implements a fully fledged autocompletion comparing to that in the Java editor. I believe, they’ll do a great job.

I’m eagerly awaiting the next build. And you may try this feature too.

Enjoy!

 

[1] blog.mueller-bruehl.de/netbeans/cool-stuff-netbeans-and-jshell

[2] deadlock.netbeans.org/job/prototypes-repl