This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java to capture OS related events

 
sanuji pillai
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am looking for example code in java to capture OS related events like Logout/Login/Shutdown/Restart/Monitor-Lock ..etc.


Regards,

Sanuji Pillai.
 
Stephan van Hulst
Bartender
Pie
Posts: 5399
52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah... you need native code for that. Google for a JNI or preferably a JNA solution to this problem.
 
Winston Gutkowski
Bartender
Pie
Posts: 10109
56
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sanuji pillai wrote:I am looking for example code in java to capture OS related events like Logout/Login/Shutdown/Restart/Monitor-Lock ..etc.

May I ask why? It goes against the entire ethos of Java, which is to be platform-independent.

Winston
 
sanuji pillai
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank You "Stephan van Hulst" & "Winston Gutkowski"
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic