Hands-On: Development Environment

To complete the work in this course you will need a development environment – a collection of tools with which you build software. Development environments range from the small and simple to the large and complex, but at the core of each is the compiler and runtime system of the programming language being used. At a minimum, a development environment must provide the tools necessary for you to write a program as a text file, translate the program into an executable form, and then run/execute the program on a computer. For the purposes of this course it will be important to choose a development that is a “Goldilocks fit” for you – not too little, not too much, but just right.

There is quite of bit of material here, so you can jump to a particular section through the following list.

Java Development Kit (JDK)

The Java Development Kit (JDK) is a computing platform for developing and deploying software written in Java. This course will use the Java SE Platform, which includes the language, compiler, debugger, runtime environment, and extensive software libraries - everything you need to develop software in Java, except for an editor to create source code text files.

To work on your own computer, you must download and install the Java SE JDK from Oracle or the essentially identical open source OpenJDK. The latest release of the JDK is recommended, although version 7 or above will be sufficient for this course.

Here are direct links to the latest Java SE JDK downloads from both Oracle and OpenJDK.

Integrated Development Environment (IDE)

An integrated development environment (IDE) is a software application that provides access within a single interface to a variety of tools such as an editor, compiler, debugger, runtime environment, and so on.

While there are many IDEs available for Java, here are some that I can recommend.

jGRASP

jGRASP is a lightweight IDE developed at Auburn and used in hundreds of schools across the world. It is designed with education in mind, and strives to be simple but complete. Object viewers are unique to jGRASP and offer dynamic visualization of program execution during debug mode. jGRASP is freely available from https://jgrasp.org/.

IntelliJ

IntelliJ IDEA (“IntelliJ”) is a modern, professional IDE and is the basis for Google’s Android Studio. It is one of the “big three” IDEs for Java along with Eclipse and NetBeans. As fitting a professional-grade tool, IntelliJ is large, complex, and comes with a learning curve, but it is a powerful tool. The Community Edition of IntelliJ is freely available from https://www.jetbrains.com/idea/download.

A jGRASP plugin for IntelliJ is available to provide the object viewers from within the IntelliJ environment.

Eclipse

Eclipse is a large, complex, professional IDE that offers a lot of power and flexibility but, of course, comes with a steep learning curve. Eclipse is freely available from https://www.eclipse.org/downloads/.

A jGRASP plugin for Eclipse is available to provide the object viewers from within the Eclipse environment.

Visual Studio Code

Visual Studio Code is an open-source source code editor from Microsoft that has become one of the most popular IDEs in recent years. VS Code is highly capable and full-featured while retaining a small, easily-used feel. A jGRASP plugin for VS Code is planned for development, so all the benefits of jGRASP’s object viewers should be available within VS Code soon.

Online IDE provided by Vocareum

Vocareum, the cloud-based auto-grading tool that we will use in this course, provides a simple IDE. You will be required to use this IDE for the lab tests, and you can use this IDE for the programming assignments if you like. More details and instructions regarding Vocareum will be provided in a separate activity.

Editor + Command Line

While IDEs can provide convenience and power, there are reasons that you might want to use a small set of separate tools rather than an integrated environment.

The minimum tools necessary to work in this mode are an editor, a Java compiler, a Java runtime environment, and a terminal/shell/command-line window.

Text Editors

A good text editor can be used for far more than programming, and this is another advantage of going this route. Once you get comfortable with a powerful text editor, you’ll want to use it for most everything.

Sublime, Zed, NotePad++

Sublime Text is a well-known example of a set of modern, powerful text editors. I’ve included two other examples (Zed and NotePad++), but there are many offerings in this category and most are supported by extensive package managers that allow features to added and removed. Certain collections of these features can offer a level of tool integration that can feel like a simple IDE.

Sublime is implemented in C++ and Python and offers significant speed even under heavy workloads. Sublime is a closed-source project developed by a small private company (Sublime HQ) in Australia. A limited version of Sublime is available for free, but the full version - with all the nice features you really want - must be purchased.

Zed is an impressive successor to Atom but it is still in the development stage. You can sign up to use a pre-release version if interested and is (currently) completely free.

NotePad++ is a popular editor for Windows users. Most of the features are similar to what you would find in Sublime and VS Code.

Emacs and vi

Emacs and vi are the old guard of text editors, each with its own legion of devoted followers who keep the editor war coals smoldering to this day. This is Marvel-D.C., Hamilton-Burr, Coke-Pepsi. This is Auburn-Alabama, Michigan-Ohio State, Army-Navy. If vi had oak trees, Emacs would have poisoned them. Think I’m kidding or exaggerating? I’m not.

Hyperbole and drama aside, both Emacs and vi (now Vim) are extremely powerful, extremely stable, and simply excellent text editors. Anyone who considers themselves a programmer or who wants to be one should give both a try, and be able to at least write a Hello World in one of them.

Command Line

The command line is a text-based interface to your computer’s operating system. Terms such as command prompt, terminal, shell, shell prompt, and others are often used interchangeably, but for our purposes I’ll just use command line.

Both macOS and Linux distributions provide a command line interface through built-in terminal applications: macOS Terminal, Ubuntu terminal. Terminal applications can be added to Microsoft Windows, including the Ubuntu terminal for Windows 10 through Ubuntu on Windows.

Here are a few good resources for learning to work with the command line.

And finally, makefiles are very helpful if you work at the command line. Here’s a good tutorial: https://www.gnu.org/software/make/manual/html_node/Introduction.html.

Compiler and Runtime Environment

The JDK includes commands to invoke the Java compiler and the Java runtime environment (JRE) from the command line. The compiler can be invoked with the javac command and the JRE can be invoked with the java command.

Once the JDK is installed, you can compile and run the Java source code file WarEagle.java from the command line as follows. (The $ character represents the command-line prompt.)

$ javac WarEagle.java
$ java WarEagle

Testing Framework - JUnit

JUnit is a framework for unit testing software written in Java. Writing good test cases is an important skill to develop, and you are strongly encouraged to write JUnit test cases for all your assignments.

You can learn more about JUnit and install version 4.12 from this link.

Source Control - Git

If you want to get a head start on using a professional tool for backup, synchronization, and more, then you could explore the use of git. This carries a steep learning curve and isn’t necessary for this course so … caveat discipulus.

If you use git you may also want to use a web-based code hosting service like GitHub. I support the use of hosting services, but all assignment-related code must be kept strictly in private repositories during the semester. Services such as GitHub, BitBucket, and GitLab all offer free private repos for educational use.