Search code examples
java-8nashorn

How can I clear the cmd window after moving into nashorn mode


I am trying the Nashorn API of java 8. First I went to command prompt and typed jjs which opened the javascript mode of command prompt.

Now I need to clear the code which I wrote. cls does not work. how can I exit from javascript console ? Or clear the data in console ?


Solution

  • I got the answer just after I posted this question. Hope it helps someone.

    Just exit the jjs console by using

    quit() or exit(0)

    and then use

    cls

    Hope it helps.