Error: Module not specified, but there is no field to enter module

Viewed 1638

I have just created a new Java EE project in IntelliJ and I tried to create a new run configuration. The run configuration fails to run because I did not specify a module, but there is no field to specify a module as seen in a picture: enter image description here

In the older project, however, there is a field to add a new module. I don't understand why it is not visible in the new module.

enter image description here

I believe this only started to occur during the last update. Any help would be appreciated.

Update: I looked into workspace.xml, here's a difference between two configurations:

<configuration name="Test" type="Application" factoryName="Application" activateToolWindowBeforeRun="false">
  <option name="ALTERNATIVE_JRE_PATH" value="14" />
  <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
  <option name="MAIN_CLASS_NAME" value="com.kumuluz.ee.EeApplication" />
  <method v="2">
    <option name="Make" enabled="true" />
  </method>
</configuration>

And the other one

<configuration name="SledilnikObiskovalcev" type="Application" factoryName="Application">
  <option name="MAIN_CLASS_NAME" value="com.kumuluz.ee.EeApplication" />
  <module name="api" />
  <method v="2">
    <option name="Make" enabled="true" />
  </method>
</configuration>
2 Answers

Please click on "Modify options" and select "Use classpath of module".

Working workaround is to edit Workspace.xml in folder .idea and add the following line into the configuration manually:

<module name="api" />

No idea why this issue happens.

Related