tags:

views:

41

answers:

2

Hi,

I want to handle the system events through java program.

For example, if I want to insert a disc in dvd drive, I would click the eject option from a drop down box. I'll then handle that event and show the status as "Eject event generated".

How to do that one ? Which api is preferable ? Please help me.

I am using Ubuntu8 version os.

Thanks in advance

+3  A: 

Try writing appropriate driver in C/C++ and invoke it via JNI.

jarekrozanski
+1  A: 

Java is very much the wrong tool for this kind of thing. It doesn't have an API for general "system events" because those are very OS dependant and Java is designed to be OS-independant.

Michael Borgwardt