java 硬件编程
只是想知道每当有按键时是否可以向在后台或前台运行的java代码(没有控制台)发送中断
just wanted to know if it is possible to send interrupts to a java code which is running in background or foreground(with no console), whenever there is a key stroke
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的意思是,控制台可以在非线路缓冲模式下使用吗?
在这种情况下,你无法用纯 Java 来做到这一点。您可以使用相当简单的 JNI 库来完成此操作,如果您用 google 搜索,可能会找到一个可用的开源库。
Do you mean, can the console be used in a non-line-buffering mode?
In that case, you can't do it with pure Java. You can do it with a fairly simple JNI library and if you google there may be an open source one available.