-1

I would like to know if using the new command jshell, it is possible to test a whole Java class.

Many thanks in advance.

Juan antonio

jabrena
  • 1,166
  • 3
  • 11
  • 25
  • Yes. Just try it. – David Conrad May 11 '17 at 10:36
  • It depends what the class contains. – Maroun May 16 '17 at 12:03
  • 2
    Title asks if possible to *paste*. It's actually broken for some reason, only first 2 lines are pasted. But you can use command `/edit` to get an editor where you can paste a big snippet. See [this question](https://stackoverflow.com/questions/41833901/multiline-paste-in-jshell) for details. – Hugues M. Jun 06 '17 at 22:08
  • Possible duplicate of [Multiline paste in jshell](https://stackoverflow.com/questions/41833901/multiline-paste-in-jshell) – Naman Dec 07 '17 at 12:48

1 Answers1

0

Use /open command to let JShell read the Java class as a snippet.

/open C:\Test.java should add contents of Test.java as a snippet.

A question on similar lines is answered here

Kavitha Karunakaran
  • 1,340
  • 1
  • 17
  • 32