Java 8 Nashorn: Console pretty unusable

后端 未结 1 1627
南笙
南笙 2021-02-05 11:23

I am using Java 8 build 1.8.0-b132 on OSX 10.9.2.

I am playing with Nashorn the new JavaScript runtime in Java 8.

I am using Library/Java/JavaVirtualMachin

相关标签:
1条回答
  • 2021-02-05 11:48

    Thanks to @assylias for pointing me to rlwrap.

    I installed rlwrap via homebrew:

    brew install rlwrap
    

    Then I defined an alias in my .zshrc (would be the same for bash in .bashrc)

    alias jjs='rlwrap /Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/bin/jjs'
    

    Now I can use jjs on the commandline and the <- and -> keys are working as expected.

    0 讨论(0)
提交回复
热议问题