RFR 8133347: Add makefiles support and basic session, persistence history navigation with jline

Jan Lahoda jan.lahoda at oracle.com
Thu Aug 13 10:07:18 UTC 2015


Hi Sundar,

Regarding the new Console.java, there is a copy of EditingHistory from 
JShell. That implements a support for simpler editing of multi-line 
snippet from history (still somewhat experimental, I think). If that 
would be useful for jjs, then I think we(/I) should work on sharing that 
code between jjs and jshell.

If just a simple persistent history would be desired, then it can be 
simpler, I think. Persistence to Preferences could be done like this:
http://cr.openjdk.java.net/~jlahoda/8133347/Console.java

Persistence to a file could be done using JLine's FileHistory.

Otherwise, looks OK to me (although I am not an expert on the build 
system changes, etc.)

Jan

On 12.8.2015 19:03, Sundararajan Athijegannathan wrote:
> Hi,
>
> Please review changes for the bug:
> https://bugs.openjdk.java.net/browse/JDK-8133347
>
> This is a subtask of "jjs should use jline"
> https://bugs.openjdk.java.net/browse/JDK-8080678
>
> This subtask addresses infrastructure changes (module.xml, makefiles,
> security policy) and basic jjs use of jline.  In session command history
> and persistent history are implemented. Old jjs main class
> jdk.nashorn.tools.Shell is still available and that can be used on
> non-desktop platforms such as "compact1". The new "jjs" main class is
> jdk.nashorn.tools.jjs.Main subclasses Shell and adds only support for
> interactive mode using jline internal API.
>
> jdk9-dev "top" repo webrev:
> http://cr.openjdk.java.net/~sundar/8133347/top/webrev.00/
> "jdk" repo webrev:
> http://cr.openjdk.java.net/~sundar/8133347/jdk/webrev.00/
> "nashorn" repo webrev:
> http://cr.openjdk.java.net/~sundar/8133347/nashorn/webrev.00/
>
> Thanks,
> -Sundar


More information about the nashorn-dev mailing list