FAQ for NetBeans users moving to IntelliJ IDEA
Items marked with * reqired Ultimate Edition
Project-related topics
How can I open a NetBeans project in IntelliJ IDEA?
Currently there is no "Import NetBeans project" functionality in IntelliJ IDEA. However in IntelliJ IDEA you can create a new project with existing sources. So in many cases moving the project to IDEA is not a complex operation, you can create a new project from existing sources using the "File | New Project" action. You can ask IDEA to use the same directory as your NetBeans project is using. IntelliJ IDEA then adds the .ipr file (IDEA project file) into this directory, as well as other necessary files into the project directory. The NetBeans .nbproject directory and build.xml remain untouched, so you can continue using IntelliJ IDEA along with NetBeans.
Some of the most common steps required during import include: fixing missing libraries, adding facets for different web frameworks and defining a Run Configuration. These steps are described in the FAQ entries below.
In case you use Maven with NetBeans and you want to import the Maven project in IDEA, you can simply use the "File | Open Project" action. Point IntelliJ IDEA to your project's pom.xml file and it will be able to open the project. You still need to configure the Run Configuration, however project dependencies should get resolved thanks to Maven's dependency resolution mechanisms.
What's the difference between projects and modules?
IntelliJ IDEA creates a project for the entire code base you work with, and a module for each of its individual components. So, IntelliJ IDEA module is more like an NetBeans project.
This table can help you see how NetBeans and IntelliJ IDEA concepts map to each other:
| NetBeans | IDEA |
| Project | Module |
| Project-specific JDK | Module JDK |
| Global library | Global library |
| Project library | Module library |
| Project dependency | Module dependency |
Is there a directory-based project format similar to NetBeans available for IntelliJ IDEA?
Yes, there is a new directory-based project format available in IDEA and can be used instead of the traditional .ipr project format. See this discussion for details.
How do I change the JDK for my project?
To configure a JDK for a project, go to "File | Project Structure" (or press Ctrl+Alt+Shift+S), under Platform Settings choose JDKs and specify JDK using the "plus" sign at the top of the window. After that, you can click Project and specify which of the JDK you have configured should be used in the current project. JDKs are configured on IDE level, so when you create another project, you won't need to add the same JDK again.
How can I add a library to my project?
You cannot add a library right in the Projects view, as you would do in NetBeans. You need to use the "File | Project Structure" dialog (keyboard shortcut: Ctrl+Alt+Shift+S), under Project Settings choose Libraries, click on the top "plus" sign to add a new library. Specify the library name and then choose modules this library should be added to. Now you can choose classes or directories which you want to get added as jars as well as attach JavaDoc files. To add a jar file to your project choose the "Attach Classes" option.
How do I configure a web framework for my project?*
In NetBeans you would add a web framework using the Project Properties dialog. In IntelliJ IDEA you need to use the "File | Project Structure" dialog (keyboard shortcut: Ctrl+Alt+Shift+S). IntelliJ IDEA uses a concept of facets which is more flexible than NetBeans, because in NetBeans you need to choose the type of the project you want to create upfront and then you can configure a web framework. In IntelliJ IDEA you just create a Java project and then add facets based on the needs for different frameworks in your project.
To add a facet, go to the Modules view in the Project Structure (do not use the Facets view, it won't let you configure new facets). In the Modules view click on the top "plus" sign and choose the type of the facet you want to add (example: EJB or Hibernate). Then you can configure the facet. For some of the web frameworks you need to download the framework jars to your disk and these are provided for your comfort on jetbrains.com and can be downloaded directly using the dialog. However if you prefer to use your own version of jars, you can also point IntelliJ IDEA to the directory where your jars a located.
The Run button is disabled when I start a new project. How do I run my application?
The reason for your Run button to be disabled is that there is no Run configuration defined. If you have a pure Java SE project, you can run a Java class simply by right clicking in the editor and choosing "Run File" or by pressing Ctrl+Shift+F10. Similarly you can debug the Java class from the context menu. This action creates a new Run configuration, so you can use the "Run" button from now own.
If your project requires deployment (e.g. a Java EE project) you cannot run it using the "Run File" action, you need to configure a proper Run Configuration. Use the "Run | Edit Configurations" action or use the Run Configurations combobox in the IDE toolbar. Use the "plus" sign to add a new configuration and choose how you want to deploy your application. Note that "local" servers are managed by IntelliJ IDEA and "remote" servers are managed by yourself, which means you need to start and stop the server yourself outside of the IDE. If you can't find the server you are using as one of the options make sure to check available plug-ins for IntelliJ IDEA (check the "Where can I find useful plug-ins?" FAQ entry below).
Where can I find the "Close project" action?
NetBeans users may be used to closing projects from the Projects window. This can't work in IntelliJ IDEA because what you see in the window are modules, not projects. Each global window with IntelliJ IDEA instance represents a single project. So if you want to close the opened project, you need to run the global Close Project action which is located in the main menu as "File | Close Project".
Where can I find the "Options" dialog?
The Settings (Options) dialog is located in "File | Settings". You can configure global IDEA settings here as well as many project-related settings. Note that you can use the search functionality to quickly find an option — this is very practical because there are many options to configure. Also note that some project-related settings are located in a different dialog — in the "File | Project Structure" dialog, which lets you configure options such as project JDK, Java version, libraries, facets and so on.
IntelliJ IDEA doesn't use Ant by default. Can I easily generate an Ant build script for my project?
Yes, there is a feature that can generate an Ant build script — try running "Build | Generate Ant Build".
Editor-related topics
Can I use NetBeans keybindings in IntelliJ IDEA?
Yes! Since version 8.1.3 there is a NetBeans keymap available. To activate it, go to "File | Settings" and then "IDE Settings | Keymap" and choose NetBeans 6.5. Note that this keymap is very new so in case you encounter any issues please file an issue into our JIRA bug database.
Can I enable "compile on save" in IntelliJ IDEA?
IntelliJ IDEA currently doesn't support this feature. However there is an "Eclipse-mode" plug-in which provides similar functionality, so we suggest you to try this plug-in. Note that by default IntelliJ IDEA saves the files for you, so you don't have to press the Ctrl+S shortcut frequently like you need to do in other IDEs.
Can I enable "deploy on save" in IntelliJ IDEA?*
Unfortunately IntelliJ IDEA doesn't not have such feature at this moment. However note, that you can speed up your deployment by checking the "Build on frame deactivation" checkbox in the Run Configurations dialog.
Can I enable "mark occurrences" in IntelliJ IDEA?
Yes! You can enable this features using "File | Settings" and then "IDE Settings | Editor" and in this window enable "Highlight usages of element at caret".
How does code completion in IntelliJ IDEA differ from NetBeans?
In IntelliJ IDEA you have three types of completion, that work differently so that you can always pick what's best for the code you're working with.
For example, when you just need to quickly complete an obvious statement, you can press Ctrl+Space and it's done. It's called Basic Completion. It also comes in handy when you want to look at the complete list of available choices in the current context, or need to complete a keyword.
If you need more precision and don't want to scroll through an endless list of selections, use Ctrl+Shift+Space to narrow the selection down by the expression type. Smart Completion that is invoked this way will filter the list for you, letting you get what you need quicker. Moreover, if you press it once again it will even show you the symbols that can be reached through a chained method call.
Finally, the Class Names Completion (Ctrl+Alt+Space) lets you quickly complete a class name, and insert an import statement if it's not referenced yet. (See also Intelligent Coding Assistance.)
Is there a difference in how the local history feature is implemented?
Local history in IntelliJ IDEA tracks user actions, so it is more granular and you can see which activity you performed in the editor including VCS operations. So you get more details than in NetBeans where you can only see text-based changes to the individual files. Note that the default setting is to keep local history for 3 days. You can change this setting as well as configure which actions trigger local history in "File | Settings" and then "IDE Settings | Editor | Local History".
Are there any special code analysis features in IntelliJ IDEA?
Absolutely, IntelliJ IDEA has very advanced code analysis features many of which you cannot find in NetBeans. Read this article for details. Also make sure to check out the "Analyze" top menu for different possibilities of code analysis including quality analysis, dependency analysis, detection of duplicates and stacktrace analysis.
Plug-in related topics
Can I use NetBeans plug-ins in IntelliJ IDEA?
Unfortunately no, NetBeans APIs are different from IDEA's APIs, so you can't use .nbms in IDEA. However a lot of functionality that is available for NetBeans as plug-ins is already available out of the box in IntelliJ IDEA. There is also a very healthy community of plug-in writers for IntelliJ IDEA, so check out available plug-ins, they may provide similar functionality as your favorite NetBeans plug-ins.
Where can I find useful plug-ins?
You can install plug-ins right from the IDE using the "File | Settings" dialog. In the "IDE Settings" section choose "Plug-ins" and then click on the "Available" tab to see which plug-ins are available. Description of the plug-ins is available in this tab as well. You can also search the online plug-in repository, there are many useful plug-ins available there.
How do I install a plug-in from my disk?
Plug-ins are usually provided as zip files or jar files. Close IntelliJ IDEA, extract the zip file or copy the jar into one of IntelliJ IDEA's plug-in folders — either into <user-home>/.IntelliJIdeaXX/config/plugins or into <intellij-idea-install>/plugins. Restart IntelliJ IDEA and the plug-in will get loaded.
Where can I find documentation for writing plug-ins for IntelliJ IDEA?
Check out the resources available in the documentation area at jetbrains.com. For specific questions you can use the OpenAPI forum (also available as a newsgroup).
Is it possible to build NetBeans RCP applications with IntelliJ IDEA?
Yes it is possible, however you will not get the same kind of support you would get from NetBeans (wizards, menu actions, etc.). Currently there is no tutorial about this topic but you can check out the Eclipse RCP tutorial, which explains concepts related to building RCP applications with IntelliJ IDEA. Although this tutorial is targeted to Eclipse RCP developers you can still learn about necessary steps if you want to build NetBeans platform based applications in IDEA. Also look at this article on DZone about building NetBeans-platform based applications with IntelliJ IDEA.
Is there a platform similar to NetBeans platform available from JetBrains?
Internally JetBrains uses IntelliJ IDEA platform for it's products — e.g. MPS is built using the same sources as IntelliJ IDEA. A lot of work has been done to make IntelliJ IDEA platform less Java IDE-specific. However it is currently not possible to use the IntelliJ IDEA platform to build your own applications.
Feature-related topics
What are the typical features where IntelliJ IDEA excels over NetBeans?
You can check out the "Why IntelliJ IDEA" article at jetbrains.com. IntelliJ IDEA has better refactorings capabilities than NetBeans. It also has more code quality-related features such as intentions and code analysis features. IntelliJ IDEA provides very good integration with many web frameworks, many of which have only basic support in NetBeans (available only in the Ultimate edition). Many languages are supported including new languages such as Groovy, Scala and Clojure, whose support in NetBeans is not as good. We also believe IntelliJ IDEA has better understanding of code and thus offers better productivity than NetBeans due to it's code editor centric approach to development.
Are there features from NetBeans that are not present in IntelliJ IDEA?
IntelliJ IDEA does not currently provide an RCP platform. Profiler is not available out of the box, although it can be installed as a plug-in. JavaFX support is still basic in IntelliJ IDEA and C/C++ is not supported. There are fewer visual designers in IntelliJ IDEA than in NetBeans, although visual approach seems to be less important for professional developers due to various limitations of visual designers. Other features should be on par or have better support in IntelliJ IDEA according to our current knowledge.
Where can I get a profiler for IntelliJ IDEA?
There is no built-in profiler available for IntelliJ IDEA however we can recommend JProfiler which nicely integrates into IntelliJ IDEA.
Is there a similar functionality in IDEA as integration with Hudson?
JetBrains provides it's own continuous integration product called TeamCity. We recommend to check out this product, also because it can be used for free for up to 30 build configurations with up to 3 build agents and provides some features that are missing in Hudson, such as pre-tested commits or immediate test result delivery.
I do not see a "JSF" file option, how do I create a JSF file in IDEA?*
First, add the JSF facet to your project. See the "How do I configure a web framework for my project?" for details. Then simply create a JSP. Add the <f:view></fview> tags into your source code. You should see an intention that tells you you can add the import for the tag library. Run this intention using Alt-Enter. Similarly you can add other tags such as <h:outputText/> and fix tag library imports.
How do I configure a JDBC database connection in IntelliJ IDEA?*
You can use the Data Sources window to define a JDBC database connection. The Data Sources window should be docked on the right side of the IDE, you can also open it using the top menu in "Window | Tool Windows | Data Sources". There are two different data sources available — one is a JDBC data source which connects to the database. You can also use the SQL data source which uses SQL DDL files for data definition (the advantage of this data source approach is that you can refactor the DDL together with your source code, however you are not communicating with the database directly).
Is there a visual designer for Swing similar to project Matisse?
Yes, IntelliJ IDEA has a built-in visual designer. You can read more about the designer on jetbrains.com. Although it doesn't support the GroupLayout layout manager which is used by Matisse, it also has many advanced features including refactoring, inspections, data binding and so on. There is also a JFormDesigner plug-in for IntelliJ IDEA.
Is there a visual designer for JSF or Java ME?*
No, IntelliJ IDEA doesn't currently provide such features. As for JSF support, we believe a great JSF code editor is more useful than a visual designer with various limitations. Also note that Java ME is supported out of the box (code editor-centric approach) and Android support is available in IntelliJ IDEA 9 as well.
