[英]Applications of REPL process in development
現在,我正在閱讀Heroku的文檔,並且對如何在開發中使用REPL流程有疑問。 我遇到的障礙是這一條。
https://devcenter.heroku.com/articles/getting-started-with-java#start-a-one-off-dyno
“它也可以用於啟動連接到本地終端的REPL流程,以便在您的應用程序環境中進行試驗,或與您的應用程序一起部署的代碼”
我知道我們對REPL流程在stackoverflow中如何應用它有幾乎相同的問題,這是什么REPL流程,我可以將其用於什么? 。 但是,我無法理解答案,因為問題的語言是Node.js,不幸的是我不熟悉。 那么,您能否將答案翻譯為使用其他單詞的答案? 我知道Java。 因此,我希望您會使用與Java有關的術語。
謝謝。
Java尚未發布REPL,在Java 9+中將是JShell 。 REPL是Read,Evaluate,Print,Loop的縮寫,是一種解釋語言的標志(已編譯Java)。 但是,REPL是如此有用,以至於添加了一個。
efrisch@eeyore ~ $ jshell
| Welcome to JShell -- Version 9-ea
| For an introduction type: /help intro
jshell> /help intro
|
| intro
|
| The jshell tool allows you to execute Java code, getting immediate results.
| You can enter a Java definition (variable, method, class, etc), like: int x = 8
| or a Java expression, like: x + x
| or a Java statement or import.
| These little chunks of Java code are called 'snippets'.
|
| There are also jshell commands that allow you to understand and
| control what you are doing, like: /list
|
| For a list of commands: /help
jshell> for (int i = 0; i < 4; i++) {
...> System.out.println(i);
...> }
0
1
2
3
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.