A basic Application to get started – part 1

What is our code doing?

Now you may be thinking that we have just completed a basic application in the previous section and whilst that is true, that was all about proving our environment works.  Now we are going to assume our tools work and take a look at building our application.

As any experienced developer will tell you, when things go wrong with your application, it’s too late to wish you had some information to tell you what is going on; develop a strategy for capturing what your application is doing behind the scenes and implement it throughout your code.

For this application we are going to use a log file to write out what’s going on, more specifically we are going to use Log4J that we downloaded earlier. Continue reading “A basic Application to get started – part 1”

A basic Application to get started – part 1

Installing Apache log4j

  • Open a browser and go to ‘logging.apache.org/log4j/1.2/
  • Click on the ‘download’ link
  • Select the installation package suitable for your machine
  • You are then presented with a list of download sites to select from.  As I am in the UK, I tend to go with UK sites but, you can select whichever you prefer.
  • Wait for the download to complete
  • Open the download package, locate the Java ARchive (JAR) file ‘log4j-1.2.17.jar’ and take a copy.
  • Go to the directory where Eclipse was installed; locate the subdirectory ‘plugins’ and copy the JAR file to this location. This will make it easier when we come to add these into our program.
Installing Apache log4j