通过远程 REPL 访问正在运行的 Clojure 系统
我有一个在使用 Clojure 的 JVM 中运行的 Web 服务器。我想从 REPL 远程连接到这个 JVM,但我找不到任何“明确”的步骤来帮助我做到这一点。有人已经这样做了吗?
注意:我可以使用标准 REPL 或 jline
I have a web server running in a JVM which uses Clojure. I want to remote connect to this JVM from a REPL, but I cannot find any "CLEAR" steps which work on how I can do this. Has anyone already done this?
Note: I can use either the standard REPL or jline
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以在代码中包含 nREPL 。如果您只想查看 JVM 堆和其他统计信息,您可以使用 jconsole。
You can include nREPL in your code. If you just want to look into JVM heap and other statistics you can use jconsole.
简单地使用 GNU screen 怎么样 http://www.gnu.org/software/screen/ ?它可以让您连接到终端中运行的任何内容。
编辑:这里是对 Screen 的一个很好的简短介绍,其中包含更高级的链接到底。它实际上使用起来非常简单,并且如果您在远程计算机上工作则非常有用,因此我建议您研究一下它。
How about simply using GNU screen http://www.gnu.org/software/screen/? It lets you connect to anything running in terminal.
EDIT: Here is a good short intro to Screen with more advanced links in the end. It is actually very simple to use and extremely useful if you work on remote machines, so I recommend looking into it.
如果您使用 Emacs,http://ametry-view。 com/2009/08/20/emacs-slime-remote-repl.html 描述了如何将本地 Emacs 连接到远程 swank-clojure。
If you use Emacs, http://asymmetrical-view.com/2009/08/20/emacs-slime-remote-repl.html describes how you would connect your local Emacs to a remote swank-clojure.