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 Bansal
  • 8,907
  • 17
  • 71
  • 118

2 Answers2

2

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

PeterMmm
  • 22,286
  • 12
  • 68
  • 104
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
  • 25,883
  • 17
  • 87
  • 130