How to execute console or GUI input as if it was actual Java code?

前端 未结 4 933
眼角桃花
眼角桃花 2021-01-21 08:37

I want to be able to input java commands/code to execute during run-time (during the execution of a \"persistent\" program) in the same way, or as close as possible, to the same

4条回答
  •  清酒与你
    2021-01-21 09:14

    I know this is an old answer but for future Googlers:

    I would recommend JavaREPL whose source is available here: https://github.com/albertlatacz/java-repl

    What AlmightyR is asking for is called Read-Eval-Print-Loop (REPL) for the Java language which is what JavaREPL provides.

    JavaREPL has an online demo available here: http://www.javarepl.com/console.html

    JavaREPL also has an Intellij plugin and a CLI version which are both linked to in the Github repository.

    It looks sort of abandoned currently but perhaps it just doesn't need to be maintained?

提交回复
热议问题