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

Jan Lahoda jan.lahoda at oracle.com
Thu Aug 13 13:04:14 UTC 2015

Hi Sundar,

Seems fine to me. I've filled:

for generalizing the EditingHistory.


On 13.8.2015 14:46, Sundararajan Athijegannathan wrote:
> Hi Jan,
> Yes, I took that part of code from jshell code - hoped that I can do
> multiline editing support + history on that  for jjs later. But, you're
> right. For now, it is better to have a simpler history code in Console
> as you suggested.
> Also if we want more common code, perhaps jdk.internal.le could have
> abstract classes shared b/w jshell and jjs (later).
> I've updated Console with your simpler history implementation. Updated
> nashorn webrev:
> http://cr.openjdk.java.net/~sundar/8133347/nashorn/webrev.01/
> Thanks,
> -Sundar
> On 8/13/2015 3:37 PM, Jan Lahoda wrote:
>> 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