Java application dynamic configuration using a properties file

Sample screenshot
When I first started out in programming I made the same mistake as I see countless people make when starting.  I wrote code for me and that worked, and that was good enough for me.  As time passed and the code I produced expanded and became more ambitious so my bad habits became more ingrained.  I think it is something we all do; we all go through.  It is not until we encounter an issue, a reason to change, that we appreciate the error of our ways.  Continue reading “Java application dynamic configuration using a properties file”

Advertisements
Java application dynamic configuration using a properties file

Java with SQLite embedded database

If your java desktop application needs to store data in a database between sessions then a good solution is to embed a database into your solution.  What this gives you is an application which installs the database as part of the application, builds the database tables and populates it with any initial data.  This approach avoids the need for the user to install a database separately from the application.

Let’s takes a look at how to you might go about this. Continue reading “Java with SQLite embedded database”

Java with SQLite embedded database

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