Reputation: 478
There is a client who would like to install a custom Java application on his business owned computers, However, he doesn't want to give the ability for the limited users to close the application, even from Windows Task Manager.
The purpose of the application is to monitor some specific resources and do several tasks silently. The users of these computers will be aware of this software and what it does exactly.
I couldn't find a way to do this by using the Java programming language! Is it possible or it's mainly related to Windows users' permissions and capabilities system?
Upvotes: 2
Views: 467
Reputation: 5751
You could run it as a Windows service, started by the Administrator. That way, users won't be able to close the process as they do not have high enough privileges.
Refer to http://wrapper.tanukisoftware.com/doc/english/download.jsp for a fantastic wrapper that you can use.
For a short tutorial, look at http://wrapper.tanukisoftware.com/doc/english/launch-win.html
Upvotes: 3
Reputation: 6359
Having something unclosable and invisible sounds unethical, but I'd imagine it does have legitimate uses. If it is for something worthwhile like protecting vulnerable people online etc. then they should probably not have task manager access in the first place, preventing them from stopping the JVM. Consider user privileges over attempting to code around corners.
Upvotes: 0
Reputation: 62593
You can't do such a thing in the program itself. It is more of a system level thing. Try launching the JVM (java.exe
) as a System process.
Upvotes: 5