Error: cannot find symbol - on every command
Error: cannot find symbol - on every command
出于好奇,我决定玩JShell。
现在,我正在经历这些 Examples
而且我不知道如何使用它。我正在使用 JDK 9 - 108 build
简单的 Linux shell 命令似乎不起作用。我尝试了 ls
、cd
、mkdir
,但我得到的只是:
Error: cannot find symbol
示例与 JShell shipped with Java 9. From the first section of the page you link to:
完全不同
JShell is a UNIX-like shell written in Java, and intended primarily for working with Java programs. It was written to overcome the problems in working with Java on the Psion 5mx:
Java 9 附带的 JShell 并不是要与操作系统交互,而是要将 Java 代码片段扔到 运行 JVM 上,这可以尝试一些东西。来自你的另一个 link:
REPL allows you to evaluate code snippets such as declarations, statements, expressions. You can test your code as you create it, and way before you are done with your whole project.
所以这只是一个不幸的名称冲突。
Robert Field(real JShell 的设计者)在 Devoxx 上对它做了很好的介绍。如果你能抽出一个小时,看看here。
出于好奇,我决定玩JShell。 现在,我正在经历这些 Examples
而且我不知道如何使用它。我正在使用 JDK 9 - 108 build
简单的 Linux shell 命令似乎不起作用。我尝试了 ls
、cd
、mkdir
,但我得到的只是:
Error: cannot find symbol
示例与 JShell shipped with Java 9. From the first section of the page you link to:
完全不同JShell is a UNIX-like shell written in Java, and intended primarily for working with Java programs. It was written to overcome the problems in working with Java on the Psion 5mx:
Java 9 附带的 JShell 并不是要与操作系统交互,而是要将 Java 代码片段扔到 运行 JVM 上,这可以尝试一些东西。来自你的另一个 link:
REPL allows you to evaluate code snippets such as declarations, statements, expressions. You can test your code as you create it, and way before you are done with your whole project.
所以这只是一个不幸的名称冲突。
Robert Field(real JShell 的设计者)在 Devoxx 上对它做了很好的介绍。如果你能抽出一个小时,看看here。