JShell doesn't provide a ToolProvider
forax at univ-mlv.fr
forax at univ-mlv.fr
Wed Nov 16 23:00:40 UTC 2016
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
----- Mail original -----
> De: "Alan Bateman" <Alan.Bateman at oracle.com>
> À: "Remi Forax" <forax at univ-mlv.fr>, "core-libs-dev" <core-libs-dev at openjdk.java.net>
> Envoyé: Mercredi 16 Novembre 2016 12:29:42
> Objet: Re: JShell doesn't provide a ToolProvider
> On 16/11/2016 09: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).
>>
> This was discussed as part of introducing the SPI [1], you'll see the
> mails from Robert where he points out that this doesn't fit.
>
> -Alan
>
> [1]
> http://mail.openjdk.java.net/pipermail/compiler-dev/2016-October/010379.html
More information about the core-libs-dev
mailing list