4

I have used JNotify on the windows. But I am getting weird exception.

An unexpected error has been detected by Java Runtime Environment:

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

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

So I wanted to know some subsitute of the JNotify. API which looks change in file system and works fine windows and linux.

Dhruv
  • 10,291
  • 18
  • 77
  • 126

2 Answers2

2

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

PeterMmm
  • 24,152
  • 13
  • 73
  • 111
1

We had the same problems. Because we used JNA anyways, we just used the FileMonitor example from this framework. Works like a charm.

Daniel
  • 27,718
  • 20
  • 89
  • 133