[英]IntelliJ IDEA Java How to make Run configurations automatically select Main Class
当您在包含public static final void main(String[] arg)
方法的java文件中时,可以按Ctrl+Shift+F10
为当前类生成并运行临时运行配置。 设置配置时,这可以节省一些时间。
或者,您可以尝试与他共享.idea
目录,因为它包含所有项目的设置。 我不确定会分享哪些其他选项。
我也有同样的问题,这就是我解决它的方法
I realised i was creating the java class files by right clicking on my project name which is not right because this way, the java class is created outside the src(source folder) where the jvm expects to find the java class.
所以我必须创建 java class 文件,方法是右键单击 src(源文件夹)然后选择新的和 Z93F725A07423FE1C889F448B33D21F4026ABB4CBB4.CBB4. 然后它跑了。 这就是我所做的一切
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.