I am working on a client product which requires new File I/o to be included. While browsing i came accross java.nio package in JDK1.7. I stared including it in my project. However, when i was going through the java.sun.com site i noticed that JDK1.7 download was listed below next release(earlest Access) tab. Here i want a clarification that, whether JDK1.7 is released and whether can we suggest customer to use JDK1.7 as i am trying to code my project on JDK1.7.
JDK 1.7 has not been released. You should not expect customers to have it for quite a while (certainly not for the next 18 months). Most people/companies will upgrade software when it's convenient to them, not when it's convenient for the developer.
thanks for your reply. i want to know whether can we use packages (java.nio) or jar files which includes those class along with the JDK1.6 or something like writting my own class having the logic of classes in nio package. is that legal?
I'm not quite following what you're proposing to do. If you expect your code to run on Java 6, then you can't use any of the new features. There's no way to break out some of the new functionality and somehow make it work with Java 6.
Actually my requirement in my project to monitor a folder. Whenever a xml file gets added or xml file present in that folder gets updated i need to listen to those changes and parse the xml file to get the message. Do you have clue how we can approch that. I thought of using quartz but schedular will execute the job for every certain interval of time instead of executing the jod whenever folder gets modified.
pavithra M K wrote:I thought of using quartz but schedular will execute the job for every certain interval of time instead of executing the jod whenever folder gets modified.
That's exactly what WatchMonitor does if the file system does not support listeners. Check out this thread.
i have thought of using JDK1.7 API's for folder monitoring, however JDK1.7 is not yet released we cannot suggest this to customers. And we dont want to use Threads here.
Can i use quartz- job, schedular and trigger listener in this scenario.
JOb -to read the xml file.
trigger listener - to listen to the folder changes and execute the Job.
Actually i want to know how to use trigger listener or job listener or schedule listener in my Java Application.
i checked with the common VFS it looks like it has some API for File I/O and event handling. For that do we need to write a XML file or to include the VFS jar file in the CLASSPATH is enough.
Hmm yes, they have gone a bit overboard with the abstractions. I'm having the most trouble getting a FileObject instance. So let's get back to that later. The base code: