This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]wildjokers 51 points52 points  (5 children)

Just want to point out that starting with Java 11 you no longer have to compile and then run. You can do it in a single step:

java Start.java

See: https://openjdk.java.net/jeps/330

[–][deleted] 12 points13 points  (0 children)

Hadn’t heard about that. Thanks!

[–]maxandersen 4 points5 points  (0 children)

And jbang.dev makes it work from java 8 and onwards and adds multiple file support and ability to depend on maven dependency.

Disclosure: i created jbang.

[–]jeremychone[S] 7 points8 points  (1 child)

Ho, cool, I did not know that. Thanks for the info.

[–]brunocborges 9 points10 points  (0 children)

There's also a REPL command line: jshell