Unable to run Java code with Intellij IDEA

后端 未结 12 2480
说谎
说谎 2020-12-14 05:18

I have just downloaded the IDE, and I want to edit my first Java file with it, I\'m not interested in creating a whole project, just editing the single file.

So I op

12条回答
  •  暖寄归人
    2020-12-14 06:03

    I had the similar issue and solved it by doing the below step.

    1. Go to "Run" menu and "Edit configuration"
    2. Click on add(+) icon and select Application from the list.
    3. In configuration name your Main class: name of your main class.
    4. Working Directory : It should point till the src folder of your project. C:\Users\name\Work\ProjectName\src

      This is where I had issue and after correcting this, I could see the run option for that class.

提交回复
热议问题