1

Im Currently working in an old java swing project with eclipse IDE. we wanted to change from eclipse to intellij but we have a problem configuring our eclipse application in intellij. I have tried to generate .launch file and convert it as intellij launcher with eclipser plugin but didn't work.

I have configured maven and everything. The only problem is that im not finding any type of configuration in Intellij as Eclipse application configuration.

Any suggestions? eclipse application configuration

Ricard Kollcaku
  • 1,622
  • 5
  • 9

2 Answers2

1

Goto Add maven project , then Just locate your POM.xml and add it.

This is the simplest way to add maven project to intelliJ.

enter image description here

To add Run configuration:

enter image description here

After Edit Configuration you need to add Maven there like below image:

enter image description here

Vishwa Ratna
  • 5,567
  • 5
  • 33
  • 55
  • im trying to run the application not to build it. I have configured maven successfully. – Ricard Kollcaku Jan 28 '20 at 12:32
  • if you see the picture in eclips i have created an Eclipse application run configuration but i cant do the same in intellij – Ricard Kollcaku Jan 28 '20 at 12:33
  • on top right side near the bug, you will see a green triangular button, near that click like image above. – Vishwa Ratna Jan 28 '20 at 12:36
  • @RicardKollcaku , now after clicking **Edit Configuration** , just select the files and comman like `clean` `build` etc – Vishwa Ratna Jan 28 '20 at 12:38
  • yes i have tried to configure as Application but it doesn't work – Ricard Kollcaku Jan 28 '20 at 12:38
  • go to left most + sign in Edit configuration menu, you have to add maven there., wait a sec, i will add image. – Vishwa Ratna Jan 28 '20 at 12:39
  • you're misunderstanding the problem. i have configured maven successfully but the problem is im not able to run it – Ricard Kollcaku Jan 28 '20 at 12:40
  • @RicardKollcaku , explain me what error you are getting. – Vishwa Ratna Jan 28 '20 at 12:42
  • i dont have any maven error. Maven is cool :D. in eclipse i have an Eclipse application configuration with product and plugins that run my application. But in intellij i dont have any – Ricard Kollcaku Jan 28 '20 at 12:48
  • You really need to read the application configuration and add exactly match the requirement in intelli run configuration. – Vishwa Ratna Jan 28 '20 at 12:49
  • You too have to build the project as the target folder would not be generated while copying the project just from eclipse and pom in intellij. – Vishwa Ratna Jan 28 '20 at 12:50
  • the problem is that im not finding in intellij any type of configuration that i can make it as in eclipse – Ricard Kollcaku Jan 28 '20 at 12:50
  • What i see from your partial screenshot is that you need to set the location and same here also you will be required. – Vishwa Ratna Jan 28 '20 at 12:51
  • Send the screenshot after after my last screenshot. I am sure there is file option there also. – Vishwa Ratna Jan 28 '20 at 12:52
  • location is screenshot is generated by eclipse as runtime location and is not part of my project but is in eclipse workspace – Ricard Kollcaku Jan 28 '20 at 12:53
  • Workspace is auto generated by eclipse that save all the project configurations is not created by me. – Ricard Kollcaku Jan 28 '20 at 12:55
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/206791/discussion-between-ricard-kollcaku-and-vishwa-ratna). – Ricard Kollcaku Jan 28 '20 at 12:55
  • Ohh..man you need to point maven to the working directory, then only it will know what work on, pom is just set of dependency management. – Vishwa Ratna Jan 28 '20 at 12:56
  • @VishwaRatna It's an Eclipse application, not a plain Java application. The dependencies are not specified in the `pom.xml` file. Maven can only be used with the Maven plug-in Tycho to build an Eclipse application. Eclipse is based on OSGi, with plug-ins/bundles that can be installed, started, stopped and uninstalled at runtime. A Maven repository cannot be used to resolve these OSGi dependencies. Intellij does not support Eclipse applications. – howlger Jan 28 '20 at 23:11
0

The easiest way to run a project in Intellij, after you created or imported the project, is to alt-click the main class or the Application class and select "run Application". Intellij will setup your run and debug configurations for you.

Christine
  • 5,617
  • 4
  • 38
  • 61
  • the problem is im using eclipse application not Application. i dont have any main class i just have some configurations when i select running product and plugins – Ricard Kollcaku Jan 28 '20 at 12:46
  • Under "run a project" there is a class you specified. I assume the code for that class is specific for the Eclipse application plugin. You'll have to modify it to work with Intellij. Like you'll need a main class, a Spring Boot Application class, or a plugin-specific class that works witn Intellij. I would be surprised if there's a way to mimic the Eclipse Application plugin in Intellij out of the box. – Christine Jan 28 '20 at 12:58
  • Thank you for your answer but i was searching for any solution with configuration as im not allowed to change the code. – Ricard Kollcaku Jan 28 '20 at 13:02