> Hi All,
> I have simple java application which monitors a directory (on
[quoted text clipped - 4 lines]
> change in directory. any pointers
> Nataraj
What is the problem here?
Assuming your C++ is running quite fine and whenever there is a change
in directory it is notifing the code in java. rite?
>Monitoring part is in c++ and i want to call that from java
> using JNI.
You want the help in C++ part or Java part? I mean are you able to
monitor the native thread in C++?
Nataraj M Basppa - 05 Feb 2007 12:29 GMT
> > Hi All,
> > I have simple java application which monitors a directory (on
[quoted text clipped - 11 lines]
> You want the help in C++ part or Java part? I mean are you able to
> monitor the native thread in C++?
I am sorry my mistake... C++ notifies in C++ part of the code. Is
there a way to get
the notification from C++ code to java Code. Like making a Java thread
an observer for C++ directory change notification
Gordon Beaton - 05 Feb 2007 12:45 GMT
> C++ notifies in C++ part of the code. Is there a way to get the
> notification from C++ code to java Code. Like making a Java thread
> an observer for C++ directory change notification
You can invoke any Java methods from the C++ code.
For example, pass a reference to your observer object when you make
the initial native call to set up the directory watcher. When it's
time to notify, call the appropriate method.
/gordon

Signature
[ don't email me support questions or followups ]
g o r d o n + n e w s @ b a l d e r 1 3 . s e