In this post, we feature the complete IDE Comparison on IntelliJ vs Eclipse. IntelliJ and Eclipse are the integrated development environment tools. IntelliJ Idea has an integrated development environment with different features for faster and efficient coding. Eclipse has a workspace and extensible framework for plugins to customize the development environment. In this tutorial, we see the features of the IDEs to compare them.
We look at the feature comparison of IntelliJ vs Eclipse IDEs in this article. Integrated development environment has an editor, compiler, interpreter, and debugger. They can be used from an user interface for developing software and running the code.
Table Of Contents
- 1. Overview
- 2. IntelliJ vs Eclipse
- 2.1. Prerequisites
- 2.2. Download
- 2.3. Setup
- 2.4. Launching IDE
- 2.5. UI
- 2.6. Code Completion
- 2.7. Navigation
- 2.8. Quick Actions
- 2.9. Refactoring
- 2.10. Code Style and Formatting
- 2.11. Version Control Basics
- 2.12. Make
- 2.13. Execution
- 2.14. Debugging
- 2.15. Integration with Build Tools
- 2.16. Advantages
- 2.17. Disadvantages
- 3. Conclusion
- 4. Download the Source Code
Java 8 is required on the linux, windows or mac operating system. Eclipse Oxygen can be used for this example. IntelliJ Idea Ultimate 2019.1 is necessary on the operating system which you want to execute the code.
2.3.1 Java SetupJava Environment
JAVA_HOME=”/jboss/jdk1.8.0_73″ export JAVA_HOME PATH=$JAVA_HOME/bin:$PATH export PATH
2.3.2 IntelliJ Setup
The intelliJ idea-2019.1.3.dmg can be downloaded as the macOS Disk Image file. You can mount the disk image file as a disk in the Mac. Ensure that you have copied the IntelliJ IDEA to the Applications folder
2.3.3 Eclipse Setup
The ‘eclipse-java-oxygen-2-macosx-cocoa-x86_64.tar’ can be downloaded. The tar file is opened by double click. The tar file is unzipped by using the archive utility. After the unzipping, you will find the eclipse icon in the folder. You can move the eclipse icon from the folder to applications by dragging the icon.
IntelliJ idea has functionality to improve efficiency and programmer’s productivity. The IDE has the features related to coding assistance and supplementary tools. Click on the IntelliJ Idea icon to launch the IDE. The welcome screen comes up as shown in the above.
The screen pops up where you need to create a new project. The screenshot is attached below:
You can create a new project and select the Java Project. It is shown below in the attached screen shot.
You can create a Java HelloWorld project. The selection can be done as shown in the picture below:
The project workspace screen comes up. The screen shot is as shown below:
Eclipse has features related to language support, customization, and extension. You can click on the eclipse icon to launch eclipse. The eclipse screen pops up as shown in the screen shot below:
You can select the workspace from the screen which pops up. The attached image shows how it can be selected.
You can see the eclipse workbench on the screen. The attached screen shot shows the Eclipse project screen.
IntelliJ Idea has the user interface elements such as Main menu, toolbar, navigation bar, status bar, editor and tool windows. The tool windows are related to execution, debugging, searching and integration with source control systems. The screen shot below shows the elements of the Idea welcome screen.
Eclipse’s workbench has perspectives, views and editors. A project explorer view shows the current project folders and files. The screen shot below shows the Eclipse workbench with Java perspective.
Code completion in IntelliJ is related to class name completion and name completion of methods, fields, and keywords. On IntelliJ, you can use the keys ⌃Space (Mac OS ) and ⇧⌃[SPACE] (Windows OS) for code completion. You can also select the Completion menu item and then the Basic from the main menu. The screenshot below shows the code completion in intellij.
Eclipse has support for code completion for source code related classes, methods and properties. On eclipse, you can use the command Ctrl+ Space (Mac OS and Windows OS) for code completion. The screen shot below shows how the code completion works in eclipse.
You can navigate the project folders using “Autoscroll to Source” and “autoscroll from Source”. The screenshot is attached below related to navigation.
You can select the symbol and use the command ⌘B (Mac OS ) and ⌃B (Windows OS) to navigate to the declaration. In the code,
System declaration is selected for navigation. The screenshot below shows the
You can use the keys ⌥⌘B (Mac OS ) and ⌥⌃B (Windows OS) to navigate to the method implementation. In the code,
println method is selected for navigating to the implementation. The screen shot below shows the method
You can navigate to the declaration or implementation by selecting navigate menu at the top in eclipse. The screenshot below shows the eclipse navigation.
You can create a list of Quick actions. The list has a group of commands. Each command is related to a key or mouse shortcut. You can create one or more quick lists. Commands are identified by numbers in sequence.
A list of shortcuts can be created in eclipse UI. The keys are associated with menus and menu items. Controls in a dialog or view or editor can be added to the list. The keys can be related to menu item actions and buttons.
In IntelliJ Idea, you can pick an item for refactoring. ⌃T (Mac OS) and ⇧F6 (Windows OS) is the command for refactoring the source. The screen shot for Idea refactoring is shown below:
In eclipse, you can right click on the source element in the IDE and pick Refactor menu item. You can also use the key Shift + Alt + T (Mac OS ) and alt+shift+R (Windows OS).
In Idea, you can format your code based on the required code styles. You can go to the Settings or Preferences to set the Editor Code Style. The screenshot below shows the Code style settings.
To reformat code, you can use the key ⌥⇧⌘L (Mac OS) and Ctrl+Alt+L(Windows OS). You can right click on the source code and reformat the code using the menu item Reformat. The attached screenshot below shows the reformatting of the code.
You can format your code using the keys “Ctrl+Shift+F” (Mac and Windows OS). You can also format the source by navigating to the Source and Format document menu. The screenshot below shows the formatting of the code in the eclipse.
You can enable the settings repository plugin from Settings or Preferences. The version control repository URL can be set by choosing the Tools and Settings Repository. The screenshot below shows the settings repository url window.
You can install the repository plugin first from the menu Help and Install New Software. The repository link is set for git as the egit plugin link. The screenshot attached below shows how to install the repository plugin.
You can build the project in IntelliJ Idea using the keys ⇧⌘F9 (Mac OS) and ⌃F9 (Windows OS). You can also click on the menu Build and Build Project for building the project. The screenshot below shows the IntelliJ building of the project.
In eclipse, from the project menu you can build the project by selecting the menu Build Project. The project can be built automatically by selecting the Build Automatically. The screenshot attached below shows the building of the project
In IntelliJ Idea, you can run the project by clicking on the menu Run and Run Main. You can choose the keys ⌃R (Mac OS) and ⇧F10 (Windows OS) to execute the project.
In eclipse, You can execute the project by choosing the Run under Run menu. You can also use the keys Ctrl + F11 (Windows and Mac OS) to execute the project.
In IntelliJ, you can set the debugger options choosing Settings and Preferences. Debugger will be in the build, execution and deployment section. Compiler can be set as Java Compiler for the java code. You can start the debugger by choosing the run and debug configuration. Debugger can be started by setting the break point.
Debugger can be started by selecting startDebugger menu item. You can also use the key ⌃D (Mac OS) and ⇧F9 (Windows OS) for starting the debugger
In eclipse, you can set the break points in the source code. You can choose Toggle breakpoint in the menu to set the break point. The screen shot is attached below to show the breakpoint created.
You can choose Run and Debug to start the debugger. Debugger starts at the breakpoint. The attached screenshot shows the debugger start menu.
Intellij can be integrated with build tools such as Maven and Gradle. A maven project can be created using the menu File, New and Project. Maven can be selected from the left navigation menu. After picking the project’s SDK and maven archtype, maven project can be configured. The screenshot attached below shows the creation of the maven project
You can set the GroupId, ArtifactId and Version of the Maven project using the wizard. The attached screenshot shows the setting of maven project attributes.
You can set the project name and location in the wizard. The attached screenshot shows the wizard for project settings.
After updating, Groupid, artifactid and Version in the editor of eclipse, you need to choose Finish to create the maven project.
You can create a gradle project using the menu File, New and Project. Gradle can be selected from the left navigation menu.
You can set the Gradle project name and location. The attached screenshot below shows the setting of the gradle project name.
The output screen after the idea project creation is shown below:
In Eclipse, you can choose Configure and Convert to Maven Project by right clicking on the project name. The screenshot shows the maven project creation.
You can create a gradle project by selecting Configure and add gradle nature by right clicking on the project. The screenshot below shows the Gradle project creation.
Intellij Idea is a popular IDE with intelligent contextual capabilities. It has the project-specific syntax tree and uses indexing to analyse the project. Based on the current developer’s context, it can provide search and autocomplete features. Idea is a good IDE for beginners and small projects. It supports different version control systems in a single interface.
Eclipse has a good look and feel. It is a well-designed IDE with good fonts and icons. It has a project perspective with support for different project structure. It has a workspace where different projects can be managed. Eclipse has features to manage more than one projects in a window. Eclipse has an extensible framework for adding and creating plugins. Eclipse has support for more than 1276 plugins. For large and complex projects, Eclipse suits the requirements.
Intellij Idea uses more memory than the normal IDEs. Building projects and using auto build takes longer as it requires more memory. The community edition is free and there is a cost associated with the Ultra edition. It has a poor UI look and feel and it is less responsive. Idea has only 700 plugins in the marketplace. It does not provide search capability in the output console
Eclipse has poor features in code completion area in spite of having more than one plugins. It does not have good features related to code merging from local to source control. Eclipse does not have compare with clipboard feature. Go to symbol in the entire project is another missing feature.
Overall, if you are going for a large project, Eclipse might be the better choice based on the foot print comparison with Idea. If you are working on a smaller project, IntelliJ Idea is better and intelligent for beginners.
4. Download the Source Code
You can download the full source code of this example here: IntelliJ vs Eclipse: Complete IDE Comparison