Effective Java – Getting Started

As I stated in the previous article, this series is about effectively developing Java. In this article I’ll cover getting started with the basic tools & practices you’ll need to be effective in your daily development. I’ll also spotlight a few landmines that can tank your effective development & point you towards some further reading on the subject.

The Importance of Tooling

As a quick precursor to the rest of this article (and the series, really), I want to make something clear: Java is a high level language (proof) and as such you should utilize tools to help manage the higher level of abstraction.

Many a neck beard & novice gawk at Java’s syntax and filesystem structure, claiming the verbosity and overhead of managing “all these directories and files” adds unnecessary complexity. These frustrations are only valid if you approach the Java world with another languages preferences, similar to the frustration one would feel when using a socket wrench to pound a nail.

With that in mind, please be ready to discard <your favorite editor> in favor for something a little more comprehensive. I know, I know, I love Vim / Sublime / Emacs (just kidding) just as much as you do, but we’re building sky scrapers not shell scripts.

Note: The toolset I preach is entirely free. It is entirely possible to bootstrap an entire enterprise organization with little-to-no upfront costs.


Getting Started

Every real Java developer relies on at least a few of the tools in the following list :

  • The Java Development Kit or JDK – because you can’t develop Java without the JDK. 
  • An Integrated Development Environment or IDE – this bad boy helps you manage all your code by integrating a number of editors, plugins and other goodies so you can focus on writing your application. 
  • Debugger – the tool that allows you to manually step through your code and inspect the state of your software at any given point. These are usually bundled into your IDE
  • Dependency Management – because somebody else has already written every non-business-specific component of your application for your & all you need to do is utilize their code. No need to symlink or copy & paste their source, just add a simple dependency and get their code “for free”.

Most modern computers have the Java Runtime Environment to run Java applications, but many don’t come with the JDK. You’ll need to download it before proceeding. Google can help you determine how to do so if you need to.

SpringSource Tool Suite

Once you have the JDK, the only other thing you’ll need to download is the SpringSource Tool Suite or STS. This IDE is based on the ubiquitous Eclipse platform (of Eclipse IDE fame), but provides a few extra tools to make life easy on us.

Of the dozens of things STS comes bundled with, we’ll look at the following:

  • Eclipse Web Toolkit Platform (WTP)
  • Eclipse Platform Debug
  • Embedded Maven


Wrapping Up

I know, I know… A few articles deep and we have yet to really accomplish anything. Now that we have our IDE and covered some of the base ideologies, we’re finally able to start a project. In the next article we’ll actually create a project and look at using STS effectively.