2

I'm learning to use jshell, and tried to write a snippet of code in the edit pad. When hitting accept, if all the code is in the window only the first line is processed and saved. If I close and open the edit pad, all other lines vanish.
I can use the edit pad if I input the lines one at a time and hit accept after every one, but then it's no different than just writing in the command prompt.

I'm using JShell 10.0.2.

Alessandro
  • 21
  • 2
  • what is your OS? Try to link to a screenshot. If you can, put the screenshot directly here by uploading image. (new accounts can only link to images as I recall.) – Thufir Dec 20 '18 at 11:22

1 Answers1

0

Starting JDK 12, it runs multiple lines when you hit Accept in JShell Edit Pad. Just make sure you start fresh JShell Edit Pad by resetting as below:

/reset

enter image description here

gbdcool
  • 974
  • 7
  • 18