Replace JNotify?

I used JNotify in windows. But I get a strange exception.

An unexpected error was detected by the Java Runtime Environment:

EXCEPTION_ACCESS_VIOLATION (0xc0000005) with pc = 0x6d94200c, pid = 22944, tid = 20528

Java VM: Java HotSpot (TM) virtual machine (mixed mode 1.6.0_01-b06, sharing) Problem frame: V [jvm.dll + 0xd200c]

So, I wanted to know some part of JNotify. An API that looks like a change in the file system and works great with windows and linux.

+4
source share
2 answers

We had the same problems. Since we used JNA anyway, we just used the FileMonitor example from this structure. It works like a charm.

+1
source

Java7 will have / have some solutions for this: http://docs.oracle.com/javase/tutorial/essential/io/notification.html

+2
source

Source: https://habr.com/ru/post/1396603/


All Articles