25

How can I import an IntelliJ IDEA project into Netbeans?

I know I can just use IntelliJ but I prefer Netbeans...

With this particular project I can't just copy the source directory into a Netbeans project... That doesn't work?

How may I use this IntelliJ IDEA project within Netbeans?

svick
  • 236,525
  • 50
  • 385
  • 514
José
  • 1,525
  • 3
  • 14
  • 12
  • 2
    Export an Eclipse project in IDEA, use the Eclipse import plugin in Netbeans. – Thorbjørn Ravn Andersen Jul 25 '11 at 17:58
  • how large is the project? does it have many dependencies, artifacts? maybe you'd better ask a question about creating a Netbens project from sources? and why would someone choose Netbeans over IDEA? – Denis Tulskiy Jul 25 '11 at 18:04
  • Netbeans is like a thin layer between your code and you. Where as eclipse is its morbidly obese cousin and Idea seems to be on the thicker side too. – ShaggyInjun Mar 12 '13 at 23:34
  • @ThorbjørnRavnAndersen Does that method actually work, or was that just thinking out loud? I'd really like to know how to do this. – Steve the Maker Jan 29 '16 at 03:27
  • IntelliJ has "File->Export to Eclipse". Netbeans has File -> Import Project -> Eclipse project. I have not tried this myself. Today I would say "redo as a maven project and open whereever you want". – Thorbjørn Ravn Andersen Jan 29 '16 at 14:27
  • @ThorbjørnRavnAndersen, does maven works better with a dev computer not connected to Internet? just a side note, in most big finance companies no dev system is connected to Internet. – AaA Jun 29 '16 at 02:56
  • @AaA Maven works the best with Internet access. If you don't have that you need to pull the needed artifacts in house and use them. A bit cumbersome but doable. – Thorbjørn Ravn Andersen Jun 29 '16 at 06:29

2 Answers2

4

The nbproject is a required folder by NetBeans, where it keeps its project settings. The only necessary project build files needed are the project.xml and project.properties.

In project.xml, line 5 is changed to reflect the accurate name of the user's project. Also for IntelliJ, nbintellij.iml is the required file.

So for a IntelliJ project, if you create the nbproject folder with the required files (project.xml and project.properties), you'll be able to open the folder in NetBeans


You can use the following tool I've created to convert an IntelliJ project to NetBeans, and also convert a NetBeans project to IntelliJ. Please make sure you have python installed.

https://github.com/devanshkaloti/IDEProjectConverter-Java

2

Short answer: I don't believe such a tool exists.

Longer answer: You probably should not be relying on a proprietary format for your project. Depending on the project, Ant+Ivy or Maven may be a better solution.

Will Iverson
  • 2,009
  • 12
  • 22
  • Agree 100%. IMO, ant + ivy only goes so far. Eclipse, Netbeans and Idea all setup projects differently when using ant. Unless there is a strong company wide culture, it is hard to achieve this at work. If it is a personal project, then ofcourse there is no excuse. – ShaggyInjun Mar 12 '13 at 23:33