Return to site

JBang: Run java as scripts anywhere.

· java

1) Given this class:

2) Open Powershell in Windows, typing "PowerShell" in Cortana search box.

3) Change of directory in PowerShell to the directory containing the "" file:

cd my_directory

4) Execute this command line in PowerShell:

iex "& { $(iwr } ./"


Here you go, you are executing Java code in a very trivial way!

broken image