• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

File Watcher utility scheduling

 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All,

I am planning to implement a file watcher utility similar to one as mentioned in this link
http://download.oracle.com/javase/tutorial/essential/io/notification.html

My question is related to options in the java space on how do I keep this utility up and running all the time to listen to the file change events.
Should I create it as a web component and deploy it in a web/application server or resort to creating a java program configured to run in OS level scheduler.

Do post your thoughts on how to go about the scheduling aspect for this utility.

Thanks,
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can just run a Java program and leave it running; there's no need to make it run in a Java EE application server. If you want your program to be started whenever the computer starts, then you'd need to do that using some operating specific method to start programs at startup. Which operating system are you using?

Note that the APIs that are used in that tutorial are new in Java 7, which is not officially released yet. You can't use things like WatchService in Java 6 or older.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you want to implement the same but using java before 7 just visit the followinv site:
http://jpathwatch.wordpress.com/
 
Marshal
Posts: 80647
473
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That looks a useful application. and welcome to the Ranch
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic