JShell doesn't provide a ToolProvider

forax at univ-mlv.fr forax at univ-mlv.fr
Sat Nov 19 14:37:02 UTC 2016


----- Mail original -----
> De: "Robert Field" <robert.field at oracle.com>
> À: forax at univ-mlv.fr, "Alan Bateman" <Alan.Bateman at oracle.com>
> Cc: "core-libs-dev" <core-libs-dev at openjdk.java.net>
> Envoyé: Jeudi 17 Novembre 2016 02:57:55
> Objet: Re: JShell doesn't provide a ToolProvider

> On 11/16/16 15:00, forax at univ-mlv.fr wrote:
>> So i respectfully disagree with Robert :)
>>
>> While the interactive mode of jshell is something important, being able to
>> replay interactive sessions (stored in a file) automatically is in my opinion
>> as important.
>> If the module jdk.jshell provide an implementation for the interface
>> ToolProvider inside the package jdk.internal.shell.tool, it can start
>> JShellTool with exacly the same arguments as the main() does.
>>
>> Rémi
> 
> I respectfully AGREE with Rémi.
> 
> My arguments were for support of an InputStream parameter, and I agree
> that without that is better than nothing, so I have created:
> 
>     https://bugs.openjdk.java.net/browse/JDK-8169821
> 
> The InputStream could be addressed in the SPI by having one more default
> in ToolProvider, roughly:
> 
>     default int run(InputStream in, PrintStream out, PrintStream err,
> String... args) {
>         return run(System.in, out, err, args);
>     }
> 
> Maybe I was unclear --

Many thanks !

Rémi


More information about the core-libs-dev mailing list