Note that there are some explanatory texts on larger screens.

plurals
  1. POerror exception access violation in JNotify
    primarykey
    data
    text
    <p>I am trying to implement JNotify. but I am getting a bit weird error messages when I compiled the program. I get the sample code from this site ttp://jnotify.sourceforge.net/sample.html</p> <p>as an info, JNotify is used for directory monitoring and this is how my source code looks like.</p> <p>this is the content of the class watching.java </p> <pre><code>import net.contentobjects.jnotify.JNotifyListener; import net.contentobjects.jnotify.JNotify; public class watching{ public void watching(String s) throws Exception { // path to watch String path = System.getProperty(s); // watch mask, specify events you care about, // or JNotify.FILE_ANY for all events. int mask = JNotify.FILE_CREATED | JNotify.FILE_DELETED | JNotify.FILE_MODIFIED | JNotify.FILE_RENAMED; // watch subtree? boolean watchSubtree = true; // add actual watch int watchID = JNotify.addWatch(path, mask, watchSubtree, new Listener()); // sleep a little, the application will exit if you // don't (watching is asynchronous), depending on your // application, this may not be required Thread.sleep(1000000); // to remove watch the watch boolean res = JNotify.removeWatch(watchID); if (!res) { // invalid watch ID specified. } } class Listener implements JNotifyListener { public void fileRenamed(int wd, String rootPath, String oldName, String newName) { print("renamed " + rootPath + " : " + oldName + " -&gt; " + newName); } public void fileModified(int wd, String rootPath, String name) { print("modified " + rootPath + " : " + name); } public void fileDeleted(int wd, String rootPath, String name) { print("deleted " + rootPath + " : " + name); } public void fileCreated(int wd, String rootPath, String name) { print("created " + rootPath + " : " + name); } void print(String msg) { System.err.println(msg); } } } </code></pre> <p>then this is the main class that named nowwatch.java</p> <pre><code>public class nowwatch { public static void main(String[] args) throws Exception { System.out.println("Hello World!"); watching hello = new watching(); hello.watching("C:/Users/Raden/Documents/Downloads"); } } </code></pre> <p>but why did the error went like this? I had screenshot the error so that you can see it by clicking on this <a href="http://imgur.com/sBK1O.jpg" rel="nofollow">link</a></p> <p>has any of you ever experience this type of error? any help would be appreciated though. thanks</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload