The other day I came across an example where a formula written in a Java program could be represented in standard notation on the screen. I thought this was brilliant. I recall back in my Uni days using the formula editor in Microsoft Word to present formulas. Now I don’t have a use for this in Java yet but, you never know. However in case anyone out there does have a requirement to represent a formula written in a programming language in standard notation then maybe this will help. Continue reading “Math Formula in Java”
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”
Having tested our code in Eclipse and proved it works there we now need export our code to the file system.
To get our code out of Eclipse we will export the files from Eclipse to our file system. Continue reading “Testing our Environment – part 5”
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”