----- Mail original -----
> De: "Patrick Reinhart" <patr...@reini.net>
> À: "Remi Forax" <fo...@univ-mlv.fr>
> Cc: "core-libs-dev" <core-libs-dev@openjdk.java.net>
> Envoyé: Mercredi 16 Novembre 2016 11:29:55
> Objet: Re: JShell doesn't provide a ToolProvider

> Hi Remi,
> 
> At the moment there is only the both outputs and the arguments. So there
> seems to be no way to actually interact with a ToolProvider using the
> "run" method. Since there is no way to interact, the benefit is not
> given this way or am I wrong here?
> 
> -Patrick

Hi Patrick,
good question !

The Tool provider interface provide a non-interactive interface, so it's 
equivalent to calling jshell with some scripts as arguments and not with 
interacting with jshell on the console.
So the input scripts are provided in the argument.

Rémi

> 
> 
> On 2016-11-16 10:23, Remi Forax wrote:
>> Hi all, hi Robert,
>> currently, unlike javac or javadoc, there is no way to directly invoke
>> jshell (JShellTool) because it lies in an internal package (which is a
>> good idea).
>> 
>> I think the module jdk.jshell should provide a
>> java.util.spi.ToolProvider so i can embed jshell, like i can embed any
>> dynmic langage runtimes, in my program instead of having to invoke it
>> using the command line (without being able to control the exact
>> version of jshell or even if jshell is present in case of a custom jdk
>> image).
>> 
>> regards,
> > Rémi

Reply via email to