"Using the power of open source software to redefine the horizons of your world."

Java Programming Community

I’ve been using the Java programming language to work on geospatial or GIS) desktop software and programming libraries for the last several years. This web page explains how I got involved in Java programming, why it is my favorite programming language, examines some disadvantages of the programming language, and provides lists of my favorite Java programming books, articles, programming libraries, and tools.

I hope the content on this web page will be useful to others that are just starting to explore the Java programming language (especially land surveyors and other mapping professionals). I hope to write my own articles on various aspects of Java in the future.

My Path to Java Programming

I have no formal training or education as a Java programmer. I learned to program in Java primarily to write plug-ins and other customizations for OpenJUMP. OpenJUMP is an open source desktop GIS application written in the Java programming language. I learned Java by working through books on the programming language, by asking questions on internet forums and message boards dedicated to Java, and by participating in open source projects written in Java.

Why is the Java programming language my favorite programming language?

There are several different reasons why Java is my favorite programming language:

  • Java is an object-oriented programming language. That means it is easier to model real world systems and develop modular or reusable software components.
  • Java is supported by great open source tools like Ant (a software “build” tool), JUnit (an automated software testing tool), Eclipse (Java programming language integrated development environment), and Netbeans (another Java programming language integrated development environment).
  • Java has a large set of standard programming libraries that allow client code to do things like manipulate strings, utilize math functions, and work with collections of objects.
  • The Java programming community has produced a large number of “third party” programming libraries for a variety of tasks. Some of examples include the libraries that support the creation and manipulation of PDF files, construction of modular graphical user interfaces, collections of general purpose utility functions, 2D geometry libraries, and map projections.
  • There are a lot of books and other training materials available for those that want to learn programming in Java. This includes the Java Trail from Sun Microsystems.
  • Java is a cross-platform programming language. That means (in most cases) you can write and build (or compile) programs one time that will run on both Microsoft Windows operating system and on Linux operating systems. (Other operating systems are supported as well.)
  • Java provides the ability to build quality graphical user interfaces with a built-in or standard library known as Swing. This is a feature missing from a lot of other programming languages used in the open source community, which require you use a third-party GUI library, like WxWidgets or GTK.
  • Java offers common functionality like file input and output and automatic memory management ( garbage collection) that makes it easier to use than other high-power programming languages like C++.

What are some disadvantages of Java?

There are a number of disadvantages to the Java programming language that might make it a less-than-ideal programming language for a number of projects or programmers:

  • Because Java is powerful, it is also complex. This complexity can make it more difficult for a non-programmer to learn. This is especially true because Java is not an interpreted computer language, which allows language statements to be immediately executed and examined by the student.
  • Java depends on a “virtual machine”. This means you can’t directly create a native executable file (dot exe) for a Java program. (There are other ways to “wrap” a Java program in a dot exe file.) The virtual machine is another program that executes compiled Java programs, and it is commonly called a Java Runtime Environment.
  • It can be difficult to access functionality particular to a specific operating system in Java programs. (This is because Java programs are made to be cross-platform.)
  • It may not be possible to create a graphical user interface that perfectly mimics the look, feel, and behavior of a native graphical user interface.

My Favorite Java Articles

Below you will find a list of my favorite articles on Java programming:

My Favorite Java Programming Books

This is a list of my favorite Java programming books. I've indicated in parentheses which books are for beginners and which are for more advacned programmers:

  • Learning Java (For Beginners): This is a great book the provides a comprehensive introduction to the Java programming language. It's coverage of some topics is often better than books for more advanced Java programmers. My main disappointment in the book is that its author is no longer maintaining Beanshell, which was a great way to learn Java.
  • Effective Java (For More Advacned Programmers): This book provides a series of "items" or topics that discuss some very important concepts in Java programming. A good understanding of these concepts is critical to writing effective and professional Java programs. If you've been programming in Java for a while, and want to improve your skill set with the language, this is a great book to add to your bookshelf.
  • Hardcore Java (For More Advacned Programmers): This book is a good complement to another one of my favorite Java Books, "Effective Java". It covers topics like the proper use of the Java keyword "final", the correct way to use Exceptions in Java, and has a great chapter on how object references in Java work .

"Learning Java" Resources For Non-Programmers

There are some great online resources that can help a non-programmer learn to program in Java. I will list a couple of them below. Another thing that can help is to help out with an open source program that is written in Java. To do this, find a project that interests you, join the mailing list, and ask how you can help.

A great place to ask questions about the Java programming language is the Big Moose Saloon at Java Ranch. The moderators at the forum do a great job, and you will rarely find that an intelligent question goes without an answer. There are also good articles posted on the site.

The Java Trails from Sun Microsystems is another good resource to learn about particular aspects of the Java programming language. I have found their tutorials on Swing to be particularly useful. The tutorials also have sample code that you can cut and paste into your IDE for tweaking and experimentation.

My Favorite Java Programming Libraries

One of the best things about Java is the abundance of high-quality open source programming libraries available for use by the Java programming community. These libraries make it a lot more efficient and enjoyable to work in Java, because you can focus on writing code that does the stuff you want, and not on mundane code that you need to do the stuff you want.

Below is a list of some of my favorite Java programming libraries.

  • JUnit is a great Java programming library that allows Java programmers to easily use unit tests in their programming process. I believe the use of unit tests is very important if you want to produce high-quality and easily maintained Java programs. There are other unit testing libraries in Java, but JUnit is my favorite. It is also well documented and has built-in support in the Eclipse IDE and Netbeans IDE.
  • Joda is a library that allows programmers to work with dates, calendars, and other temporal objects in their code.
  • Jodd is a library that collects miscellaneous utility code. Apache Jakarta Commons is another, although I like Jodd the best.
  • The InfoNode Docking Windows Framework is a great way to create a modular graphical user interface.
  • The JGoodies Forms library makes layout of typical forms used in graphic user interfaces very easy. It beats any of the standard Java layout managers.