How do I run the code from a scratch file in IntelliJ 14?

旧城冷巷雨未停 提交于 2019-12-05 18:19:52

问题


I've created a simple Java scratch file containing a class named "TestGenerics" containing some code and a main method. The code seems to be fine, however when I try to run it (by right clicking > Run 'TestGenerics.main()', I get this error: "Module not specified"

Similar situation occurs with a scratch file containing Lua code, error message: 'Error running scratch.1 (2): Executable is not specified'

Any ideas?


回答1:


This was previously not possible, but is now supported for some languages. such as Java and Ruby. For these languages, you should be able to run the scratch file in the same way as you run any other file.



来源:https://stackoverflow.com/questions/27120806/how-do-i-run-the-code-from-a-scratch-file-in-intellij-14

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!