如何使用Java检测PC闲置30秒? [英] How to detect that a PC has been idle for 30 seconds using Java?
本文介绍了如何使用Java检测PC闲置30秒?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用Java检测PC闲置了30秒?
How to detect that a PC has been idle for 30 seconds using Java?
已编辑
闲置时,是指没有用户活动.用户在30秒内不执行任何操作.我希望像Windows那样进行复制,以检测到用户什么也不做,并进入待机状态.
With idle I mean that there are no user activity. The user does nothing in 30 seconds. I wold like to do an apllication like Windows, that detects that the user does nothing and enter in stad-by.
推荐答案
直接来自Java是不可能的.您必须找到一些本机库并为此创建一个JNI包装器.
Directly from java it is not possible. You'll have to find some native library and create a JNI wrapper for that.
这篇关于如何使用Java检测PC闲置30秒?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文