Friday, August 10, 2012

Blog Posting

It's actually quite difficult to have a continuous stream of daily posts. I will try again from today and put in more effort for this java blog.

Saturday, May 12, 2012

What is an instance?

An instance is created from a class. The class can be seen as a blueprint and the instance is the actual object that is created from the blueprint. The class can make several objects or instances with different attributes. A Car Class would be able to have different instances for example, such as BMW, Honda, Jaguar, Mercedes.

In my own words,

an instance is a particular case in which an object is created from a set of defined attributes and functions from a blueprint or class.

Friday, May 11, 2012

What is a class?

A class is a blueprint or a model on which individual objects or instances can be created. A class will contain variables, methods that describe its behaviours. A class usually represents a blueprint of a real-life object that needs to be represented.

Example: The car Honda can be an instance of a Car class. It will have its own set of properties includign the color, model, design, number of doors etc. The instance, Honda, will have different properties than another instance of the car class, Ferrari for example.

12/5/12 Edit:

A class is a blueprint that contains attributes and functions that will be used to create instances as a representation of something.

Wednesday, May 9, 2012

Download Scheduler Release

I have completed my download scheduler and am quite pleased with it. The link is below:

http://www.mediafire.com/?uk8050sva9niw2n

It is a simple download scheduler that can set the time of when files should be downloaded. In order to use the download scheduler java must be insttalled. The urls must be inputted properly with "http://" set in the beginning.

Monday, May 7, 2012

Jar Errors

Unfortunately, using netbeans, I keep getting a class not found error. I think this is because I have not set the class properly in netbeans as I use a different folder than the normal default one. I have uploaded another jar file that uses the default netbeans settings and I will test with this to see if i can get the problem resolved

http://www.mediafire.com/?44dv3qx2zwjhfmi

Download Scheduler

I have finished my Download Scheduler. I am quite happy with it as I have used it several times to download files during my internet provider's off peak periods. The link for my program is

http://www.mediafire.com/?nr14ay62e0do053

I will post more details during the week. I am uploading this and I will test it on my friend's computer.

Sunday, May 6, 2012

JAR and File Associations

I have finished my program and I wanted to create a Jar file using netbeans. Everything seems to be working fine when I run the jar file from the command prompt. However, when I decide to double click the jar file in the hopes of having the program run properly, an error came up saying that java was unable to find the specified main class. After googling around I found that the solution to this problem is because the file type associations is not set properly. As I am using windows 64 bit, I would have to use the proper file type associations.


I needed to go to
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\jarfile\shell\open\command

and changed the value from the original to

"C:\Program Files\Java\jre7\bin\javaw.exe" -jar "%1" %*

Originally it was something along the likes of

"C:\Program Files (x86)\Java\jre6\bin\javaw.exe" -jar "%1" %*

Not only was it using the previous version of jre, jre 6, but it was also using the 32 bit version. I suppose this is what caused the error as now it works completely fine