Benvenut nel club! Mi sembra un uso ovvio, almeno su Linux. Comunque:
https://bugs.openjdk.java.net/browse/JDK-8167440
Vota anche tu :)

Ciao,

    Bruno

(p.s. credits to
https://stackoverflow.com/questions/44916618/how-to-execute-a-java-script-with-jshell
)


2017-11-17 8:34 GMT+00:00 Federico Fissore [email protected]
[it-torino-java-jug] <[email protected]>:

>
>
> Roberto Franchini [email protected] [it-torino-java-jug] ha scritto
> il 17/11/2017 alle 09:00:
> > Se ne parlava mercoledi' sera al meeting:
> >
> > https://medium.com/oracledevs/jshell-a-quick-look-d26f7e91a864
> >
> >
> > FRANK
> >
>
> Mi è venuto in mente di fare uno script "shell" ma usando "jshell".
> Purtroppo non funziona: non riconosce il cancelletto come riga
> commentata e non termina alla fine dello script
> Magari si può fare un wrapperino
>
> federico@pawa:~$ cat test.sh
> #!/usr/bin/env /opt/jvm/jdk1.9.0/bin/jshell
>
> System.out.println("hello world!")
>
> federico@pawa:~$ ./test.sh
> | Error:
> | illegal character: '#'
> | #!/usr/bin/env /opt/jvm/jdk1.9.0/bin/jshell
> | ^
> | Error:
> | illegal start of expression
> | #!/usr/bin/env /opt/jvm/jdk1.9.0/bin/jshell
> | ^
> hello world!
> | Welcome to JShell -- Version 9
> | For an introduction type: /help intro
>
> jshell>
>
> federico
> 
>

Reply via email to