加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

如何将Scala 2.8解释器嵌入到Java应用程序中?

发布时间:2020-12-16 09:31:14 所属栏目:安全 来源:网络整理
导读:我想要能够以交互方式在我的Java应用程序中操作内存中的对象进行调试。我非常喜欢使用Scala的2.8解释器,利用其功能,如tab-completion。我该如何做? 解决方法 见Josh Suereth的 Embedding the Scala Interpreter。 You can see the auto-complete suggesti
我想要能够以交互方式在我的Java应用程序中操作内存中的对象进行调试。我非常喜欢使用Scala的2.8解释器,利用其功能,如tab-completion。我该如何做?

解决方法

见Josh Suereth的 Embedding the Scala Interpreter。

You can see the auto-complete suggestions below.

josh@suereth-desktop:~/projects/blog/embed-the-interpreter$ java -jar target/embedded-interpreter-0.1-SNAPSHOT-jar-with-dependencies.jar 
Welcome to Awesomeness!
This is my version of the Scala interpreter
TestInterpreter> j

java javax jline

我认为他也实现了Scala IDE for Eclipse的功能,所以你也可以看看。最新的是available online。

我想运行Scala代码作为测试的一部分,所以我已经实现了CompilerMatcher在他的文章之后。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读