0

I made a java swing application, but now I need some functionality for backup data from my application.

so I have a screen which gets backup data, backup schedule data, and schedule time.

So I want that on particular date and time, My some part of code which is in one java file, need to start automatically in background, so there is no need to application running or not at same time.

I search here and on Google but I am not getting right solution.

And one thing here that this application runs on Window as well as MAC or Linux environment. So I need for cross-platform.

so please give me some way how I can do this.

Sumit Singh
  • 15,743
  • 6
  • 59
  • 89
DEVANG SHARMA
  • 2,662
  • 5
  • 33
  • 52

2 Answers2

3

A good lib to make Java programs to run as services is the Java Service Wrapper. But be warned that the default behaviour of the services is to run tasks in headless mode. In other words, you won't the able to start a Swing window from the service process (but you can, of course, run another program which communicates somehow with the service).

Gilberto Torrezan
  • 5,113
  • 4
  • 31
  • 50
1

I haven't used it, but you can look at Quartz Scheduler. It looks like it can be run as a service, too.

Community
  • 1
  • 1
Catalina Island
  • 7,027
  • 2
  • 23
  • 42