How to Schedule a task in java?

Well,scheduling a task was made easy in java by the Timer and TimerTask classes in java.util.

Here is simple example of how to use it.

import java.util.Timer;
import java.util.TimerTask;

/**
* Schedule a task that executes every 2 seconds starting immediately.
*/
public class Scheduler1 extends TimerTask
{
// the number of times to run this task
int num = 5;

public void run()
{
if (num > 0)
{
// this is the task we are doing
System.out.println("Hello!");
num--;
}
else
{
// to terminate the currently running Java Virtual Machine
System.exit(0);
}
}

public static void main(String args[])
{
Timer timer = new Timer();

// TimerTask is a task that can be scheduled for one-time or repeated
// execution by a Timer.
TimerTask task = new Scheduler1();

// delay in milliseconds before task is to be executed.
long delay = 0;

// time in milliseconds between successive task executions,
// 2 seconds for this case
long period = 2 * 1000;

// to schedule the specified task for repeated fixed-rate execution,
// beginning after the specified delay. Subsequent executions take
// place at approximately regular intervals, separated by the
// specified period.
timer.schedule(task, delay, period);
}
}

Here is another example of how to schedule EOD jobs
http://www.javaeecoding.com/JavaUtil/Timer/Scheduler2.html

How to open/edit Office 2007 files when you have office 2003?

From AIA blog


Microsoft is keep on releasing new versions of Office with new features.So corporates will buy and use the latest versions of MS office.

But you have personally Office 2007 and you own only office 2003.If You have files such as .docx,.docm which you created in Office 2007 and you want to edit it ,but you have only Office 2003 installed on your machine.

Don't worry.There is a way.

Just download the Compatibility pack for the 2007 Office Word,Excel and Powerpoint from Microsoft and install it.
Afterthis you will be able to read,edit the documents created in newer versions of MS office.

You can download the compatibility pack from here:
Download Compatibility Pack from Microsoft


Alternatively you can use a conversion tool,to convert between doc and docx and various other formats

For that purpose use the tool from the below link
Convert To/From Word Files