To run the program from eclipse first select from the menu bar ‘Run-Run Configurations’. This opens the configurations dialog box for running applications.
Navigate to the Application Class code and open
Continue reading “Testing our Environment – part 3”
Having created the Java Project
• Select the newly created Project and create a Class by selecting from the menu bar ‘File-New-Class’. The new Class dialog box appears.
• Give the Class a package name. I will use ‘softwarepulse.app’.
Continue reading “Testing our Environment – part 2”
Just to make sure we have everything up and working we will quickly create a small program just to prove the basics are in place.
Almost any programming course will start you off with a ‘Hello World’ app, so why should we be any different.
Now, I think I said right back at the beginning that this is not about learning the Java language and this is not about learning how to program, this is about using Java and our programming knowledge to build a desktop application in Java. So that said the code presented here should not be a surprise to anyone; it’s a simple Class with a Main method that launches the application and will form the corner stone of everything we do going forward.
So let’s get started.
Continue reading “Testing our Environment – part 1”
Missed this, WinRAR tool required for manipulating the Java Archive files.
Continue reading “Installing WinRAR”
I am a firm believer in code comments among other things. So when I came across a blog post at http://blog.jooq.org/2013/12/04/when-source-code-comments-indicate-trouble/ talking about amusing comments coders leave in their code for people to find later I followed the links and found this:
// Dear maintainer: // // Once you are done trying to 'optimize' this routine, // and have realized what a terrible mistake that was, // please increment the following counter as a warning // to the next guy: // // total_hours_wasted_here = 42 //
The code comment above does however highlight an issue for consideration when writing code. Who will support and maintain your code? Write comments to help them as they have to live with your creation.
When coaching youngsters I would always challenge them to write code that people less able than themselves could read and follow. By doing this it allows you to easily handover your code to a support group and you can move on and write new applications.
As JGoodies provides both the Bindings and Forms libraries we can download these both from the same site.
- Open a browser and go to ‘
- Select ‘Download and choose ‘
- From the list of java libraries select and download ‘
JGoodies Forms’ and ‘
JGoodies Bindings’. For this program I will be using Forms 1.7.1 and bindings 2.9.1.
- Open each package in turn, locate the Java ARchive (JAR) file (‘
jgoodies-binding-2.9.1.jar’ and ‘
jgoodies-forms-1.7.1.jar’) and copy these files.
We are going to place a copy of the JAR files into the ‘
plugins’ directory of the Eclipse installation. Locate where you installed Eclipse and find the subdirectory ‘
plugins’. Copy the JAR files into this directory. This will make it easier when we come to add these into our program.