Java Tools and Environment
Although it’s possible to write, compile, and run Java
applications with nothing more than Oracle’s Java Development
Kit (JDK) and a simple text editor (e.g., vi, Notepad, etc.),
today the vast majority of Java code is written with the benefit of an
Integrated Development Environment (IDE). The
benefits of using an IDE include an all-in-one view of Java source code
with syntax highlighting, navigation help, source control, integrated documentation, building,
refactoring, and deployment all at your fingertips. Therefore, we are
going to skip an academic command-line treatment and start with the most
popular IDE, Eclipse. If you are adverse to using an IDE, feel free to use
the command-line instructions javac HelloJava.java for
compilation and java HelloJava to run the upcoming
examples.
IBM originally spearheaded The Eclipse Project in 2001, leading a consortium of software vendors to create an open and extensible development environment to rival the then-legendary Visual Studio environment from Microsoft. Today, Eclipse has grown into a powerful open source platform supported by individuals and corporations alike, backed by a thriving ecosystem of plug-ins and frameworks. Although Java is the most popular language associated with Eclipse, the IDE supports dozens of languages. We will be doing a light introduction to Eclipse in this chapter. For a more comprehensive approach, see Appendix A.
Eclipse requires a Java Runtime Environment (JRE) to be installed. ...