I have one IntelliJ project and I want to open it in Eclipse, so what should I do?
4 Answers
There is an export to eclipse option in Intellij Under file menu.
This option will generate you the necessary .project and .classpath files that will be used by eclipse. Personally, I would remove any IDE dependencies using some dependency management systems like Maven or Apache IVY. ( Is system the right term?)
-
1NB. You will need install the Eclipse plugin in IntelliJ in order to see the "Export to Eclipse" menu.– owksleyMar 24, 2014 at 7:22
-
-
2Note that this method will not convert your entire project and put it into a new directory. It'll simple add additional files into your existing IntelliJ directory so it will also run when opened in Eclipse.– NoNameJun 17, 2017 at 10:42
I had the same issue and (I don't have Intellij) but doc_180's comment pointed me in the right direction. Here is a simple solution. In Eclipse create a new blank Android project. Copy the .project and .classpath files and the .settings folder to the Intellij folder. Edit the .project file and change the name of the project.
You should now be able to Import the project in Eclipse by right clicking and selecting "Import->Existing Project into Workspace".
I see this is an old question, but thought I should add this answer for others Googling it like me ;)
-
1For me, it does not work with Android project. Creating a new Java project works the charm.– Joshua HMar 4, 2016 at 15:16
-
You also can run mvn eclilpse:eclipse on the command line to let the maven eclipse plugin create for you the .project and .classpath files and then import the existing eclipse project. May 29, 2016 at 15:19
Without access to IntelliJ to export and convert the project, try the following.
In STS or Eclipse create an empty project first, then, select File -> Import and choose General -> File System. In the resulting dialog box, select the root folder of the IntelliJ project as source and the empty project as the destination.
For unit tests, add the test folder as a source folder to the build path (right-click on the folder, select Build Path -> Use as Source Folder).
The projects I import this way run without any further modifications, including the tests.