
Eclipse IDE
As we have seen in the previous section, using a simple text editor to create JVM programs can be a quite cumbersome process. In some languages, including Java, you'll have to make sure that the package name structure matches the directory structure of the source code. As we will soon see, there are more rules that some languages impose on the developer. Java requires that the source code filename should match the corresponding class name. Also, you have to manually specify the ClassPath when running programs. The list goes on.
In the JVM world, most programmers use the sophisticated IDE to develop their projects. Both commercial and open source IDEs that support the JVM concept are available on the market. Java support is extremely strong on all popular IDEs. Java programmers can expect the following features in a modern IDE:
- First is the autocompletion feature. When a class name is recognized, it offers a list of its members while typing (called IntelliSense in the Microsoft world).
- Then, it provides sophisticated refactoring tools. When renaming variables or methods, the code of the whole project can be automatically modified to reflect the changes.
- There are fully featured GUI debuggers with breakpoints, variable inspection, and profilers.
- There is an option to automatically rewrite existing code to use new Java features.
- It warns about problems that the Java compiler does not catch, such as accessing members on null references.
- It runs the project itself or runs the project's unit tests with a press of a button.
- It provides automatic deployment of Java EE projects to JVM applications servers.
- Also available are additional tools, such as dialog builders, visual database tools (SQL), and so forth.
- There is plugin support to add other features.
IDE support for JVM languages other than Java sometimes leaves something to be desired, as we will see in the following chapters. However, the situation has improved a lot over the years.
The most well-known IDEs for JVM developers are:
- IntelliJ IDEA (modern IDE available in both a fully featured commercial and simpler, free community edition)
- Apache NetBeans IDE (previously Oracle NetBeans; it is well known for its build tools support and enormous number of built-in features, while also supporting plugins)
- Eclipse IDE (A very good offering from the Eclipse Foundation that includes IBM and many other big companies and, like NetBeans IDE, can be extended with plugins)
Both NetBeans IDE and Eclipse IDE are open source projects, while IntelliJ is proprietary. For this book, I've chosen Eclipse IDE. It was not an easy choice as all the IDEs listed are very good and all have their advantages and disadvantages. Eclipse IDE seemed to have the best support for all the languages covered in this book, although it requires installing some external plugins.