有没有类似 LINQPad for Java 的程序?
我发现 LINQPad 在回答 C# 或 VB.NET 的 StackOverflow 问题时非常有用。它允许我编写一些快速代码,运行它,并且(如果我愿意)查看格式良好的结果转储。这样我就可以确保我发布的代码确实运行。到目前为止,我还没有看到任何可以用 Java 实现相同结果的东西。那里有类似的东西吗?
我不是寻找一些东西来查询数据源;我只想要一个轻量级的IDE。这些是我特别感兴趣的功能:
- 无需建立整个项目或文件结构即可编写和运行简短代码片段的能力。
- 运行时报告代码中的编译器和运行时错误。
- 添加对特定编辑器实例的引用的能力。
- 语法突出显示和自动完成/智能感知将是一个优点。
I've found LINQPad to be extremely useful when answering StackOverflow questions for C# or VB.NET. It allows me to write up some quick code, run it, and (if I want) see a nicely-formatted dump of the results. That way I can be sure that the code I post actually runs. Thus far I haven't seen anything that I can use to achieve the same result with Java. Is there anything like that out there?
I am not looking for something to query data sources; I just want a light-weight IDE. These are the features I'm particularly interested in:
- The ability to write and run short snippets of code without establishing a whole project or file structure.
- Reporting of compiler and runtime errors in the code when it is run.
- The ability to add references to a particular editor instance.
- Syntax highlighting and Autocomplete/Intellisense would be a plus.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
JPad - 用于运行代码片段的 Java 暂存器
由于我也找不到一个,所以我决定编写一个。目前它可以:
这非常粗糙,但我会随着时间的推移对其进行补充。绝对欢迎反馈。
JPad - A java scratchpad for running snippets
Since I also couldn't find one I've decided to write one. Currently it can:
It's very rough but I will add to it over time. Feedback is definitely welcome.
这可能会有所帮助:
http://www.browxy.com:9000/codeRunner< /strike>编辑:网址似乎已更改为 http://www.browxy.com
This may help :
http://www.browxy.com:9000/codeRunnerEDIT: Url seems to have changed to http://www.browxy.com
您可以使用 Groovy Web 控制台 ;在时髦的地方可以说java。
You can use the Groovy web console ; it's possible to speak java in groovy land.
Java 代码片段运行器:
执行类似于 Linqpad 的操作(jar 文件,不仅仅适用于 mac)
http ://mac.softpedia.com/get/Development/Java/Java-Snippet-Runner.shtml
代码运行器(商业):
仅适用于 Mac,它将运行 Java 中的代码片段,以及许多其他语言(例如 Objective C)
http:// krillapps.com/coderunner/
Java Snippet Runner:
Does something similar to Linqpad (jar file, not just for macs)
http://mac.softpedia.com/get/Development/Java/Java-Snippet-Runner.shtml
Code Runner (Commercial):
for Mac's only, it'll run code snippets in Java, and lots of other languages too (e.g. Objective C)
http://krillapps.com/coderunner/
http://ideone.com 是一项在线服务,具有您想要的功能。
http://ideone.com is an online service that has the features you want.
我已经使用 JEdit 很长时间了,它是一个非常强大的跨平台编辑器,而不是 IDE。它确实有可以在编辑器中执行 Java 代码的插件,甚至使用 BSH 来执行宏。
I've been using JEdit for a long time, which is a very powerful cross-platform editor, NOT an IDE. It does have plugins to execute Java code right in the editor, and even uses BSH for macros.
我一直在使用 IntelliJ IDEA,它作为 Groovy 便签本效果非常好。社区版也是免费的。
您需要创建一个新项目,然后可以向其中添加 Groovy 脚本并即时运行它们。但对实际的暂存文件功能没有任何运气。
作为 Jetbrains 编辑器,它也非常流畅。 (与其他一些选项不同)
不过,没有什么比 LinqPad 更好的了。
I've been using IntelliJ IDEA and it works really well as a Groovy scratchpad. The Community Edition is free too.
You need to create a new project, but then can add Groovy scripts to it and run them on the fly. Not had any luck with the actual Scratch File functionality though.
Being a Jetbrains editor it's pretty slick too. (Unlike some of the other options)
Nothing beats LinqPad though.
我也在寻找“Java LinqPad”,我发现了:
这个
I was looking for a "Java LinqPad" also, and i came across :
this