不要在Linux上的Intellij Idea中添加Intellij Idea中的主类或程序参数
我最近在Linux设备上通过Jetbrains Community Edition安装了Intellij Idea。但是要运行我的第一个程序,我需要添加配置(我对Java没有太多想法,但是过去我使用了Pycharm,并且添加配置面板与在此处添加解释器的东西非常相似)。我不知道任何配置设置,我认为应该自动加载配置设置,这是第一次默认设置,但事实并非如此。如果我必须先创建一个主类,那么我就不会在其中编写什么代码。在每个安装指南中,他们只是假设配置已经存在。在文档等中,他们讲述了如何编辑这些字段以及主类决定在任何程序中要执行的内容。但是我无法添加配置来开始执行任何程序。
中,我需要有关突出显示字段的帮助。
我不确定,但是我首先要创建类似main.java的东西,然后在主类字段中添加它,但我对程序参数完全毫无意义。我猜环境变量是可选的。
请帮忙。谢谢
编辑:这是我要在配置中用于主类字段的文件。
public class Lbasic1 {
public static void main (String args[]) {
System.out.println("I make mistakes");
}
}
I recently installed IntelliJ IDEA by Jetbrains community edition on my linux device. But to run my first program I need to add configuration (I don't have much idea about Java but I have used PyCharm in the past and add configuration panel is quite similar to add interpreter thing there). I don't know any configuration setting, I think it is supposed to automatically load configuration settings, a default one for the first time, but it doesn't. If I have to create a main class first then I don't what code to write in that. In every installation guide, they just assume that a configuration is already there. In documentations etc. they tell how to edit those fields and the way main class decides what to find in any program to execute. But I couldn't add a configuration to start executing any program.
I need help with the highlighted fields in the following screenshot
This guide from jetbrains.com didn't help:
I'm not sure but I get that first I have to create something like main.java and then add it in the main class field but I'm completely clueless about program arguments. Environment variables are optional I guess.
Please help. Thank You
Edit: Here's the file which I'm trying to use for main class field in the configuration.
public class Lbasic1 {
public static void main (String args[]) {
System.out.println("I make mistakes");
}
}
Edit 2: I don't get any option as Run Lbasic1.main() anywhere. Here is the screenshot of IDE
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论