1

I'm trying to use the new JShell from IntelliJ 2018.2 and although nothing seems to go wrong, the console isn't printing anything.

I'm using the following super simple snippet:

String test = "asdf";
System.out.println(test);

And get the following result: Console screenshot

I would expect to get one line saying "asdf" (as I do when I run the JShell directly from the command line). I want to leverage Idea's ability to read my project's classpath and run scripts using those dependencies.

Note that I'm using JDK 11 to run JShell.

UPDATE: Checking the idea log showed the following exception:

INFO - execution.jshell.JShellHandler - The pipe is being closed java.io.IOException: The pipe is being closed

Not sure if this is the root cause or normal behavior once the shell ends execution.

PentaKon
  • 4,139
  • 5
  • 43
  • 80
  • Do you have any errors in idea.log ("Help | Show Log in...")? Does it work fine with JDK 8? – y.bedrov Oct 17 '18 at 12:57
  • jdk 8 doesnt support jshell. However I checked the log and I'm actually getting an error: INFO - execution.jshell.JShellHandler - The pipe is being closed java.io.IOException: The pipe is being closed – PentaKon Oct 17 '18 at 14:54

0 Answers0