使用Java锁定屏幕
基本上我只需要创建一个应用程序(具有某种用户访问权限),其第一个屏幕是一个全屏窗口,如果不输入有效的用户名和密码,则无法最小化或关闭该窗口。类似 Windows 屏幕保护程序之类的东西。能做到吗?我应该查看哪些图书馆?这就是我所需要的,如果我的问题不完整或不清楚,请随时提问!
Basically i just need to create an application (with sort of user access) which first screen is a fullscreen window that cannot be minimized or closed without entering valid username and password. Something like windows screensaver. Can it be done? What libraries should i look into? This is all i need, if my question is incomplete or unclear, feel free to ask!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有一次,我用 Java 写了一些东西,你无法逃脱它。实在是不可能。它适用于 Windows。给你:
这段代码的背景:我写了某种假终端,我可以在其中显示我想要的一切。例如,愚蠢的 Windows 消息如:“未找到键盘,请按任意键继续”。我用它作为学校的笑话。启动这个应用程序并离开房间,一分钟后它会自动注销Windows帐户。但我没想到会有老师用Ctrl-Alt-Del杀死我的应用程序。他在我的个人文件中留下了一条信息,其中写下了他所做的事情,并以“我打败了你,哈哈,我是邪恶的”结束了他的信息。所以,我想和他一起竞争。然后写了这段代码。他在学校里尝试了五次以上逃离该应用程序,但他做不到(我也做不到:D)。当然,他可以关闭机器或注销。但目标是访问我的个人文件。
Once, I wrote something in Java, out of which you can't escape. Really impossible. It is for Windows. Here you go:
Background of this code: I wrote some kind of fake terminal in which I could let appear everything what I wanted. Eg, the stupid Windows messages like: "Keyboard not found, press any key to continue". I used it as a joke on school. Fire up this app and leave the room, it would log out the Windows account automatically after one minute. But I hadn't thought that there would be a teacher that used Ctrl-Alt-Del to kill my application. He left a message in my personal documents in which he wrote what he did and ended his message with "I've beaten you, haha I'm evil". So, I wanted to go in competition with him. And then wrote this code. He tried more than five times in school to escape from the app, but he couldn't (I can't as well :D). Of course he could turn off the machine or log out. But the target was to access my personal documents.
在任何一个半像样的操作系统中,操作系统将负责为每个进程分配一个区域或窗口。
您将需要检查执行此操作的每个操作系统方法,并使用 JNI 以本机代码(可能是 C 或 C++)实现它。
In any half-decent OS, the OS will be the one in charge of assigning an area or window to each process.
You will need to check each OS method of doing that, and implement it in native code (probably C or C++) using JNI.