I would imagine that you cannot do these things in Java... since for one thing, compiled Java classes aren't even native machine code. They require the JVM to run them, and the JVM itself is specific to the OS it's being used on. My guess is Java is unable to do that kind of low-level stuff.
-Sam
> Hi:
> I need a Java Application which can prevent
> t CTRL-ALT-DEL , Print Screen, Copy & Past, etc and
> can disallow any other processes in the operating
> system. Does any body know if there're such types of
> commerical products or application?
Maybe for windows, but most of them are called "viruses" or "worms".
Why do you "need" one?
It seems to me as if he/she wants to replace the OS' desktop by a self written one.
This idea is not totally wrong.
MS has cheated us as if OS and desktop have to be the same. And integrate the browser, and WORD (tm) and ...
I don't know much about this, but there have been plans or prototypes even (by Oracle?) for "NC"s which would run the JVM and some addons as their OS.
So I try to take this question seriously:
You should tell us something more:
- which OS or OSses?
- shall this "top" app be the only one running?
- What about system processes - do you want to control them as well? How?
- For what do you want to use this? A desktop which limits the user? A customer self-service terminal? A steering device, realtime?
Not that I would know the answer, but I am first interested in the question.
Create a VM that runs on directly on the processor without depending on Windows features. Key presses CTRL-ALT-DELETE or otherwise are sent to the VM by the underlying OS, so the OS get the first opportunity to take action (or not). The only way to prevent this from happening might be to replace the OS (can this even be done by a program launched from the OS the VM?) or maybe a while(true) {} could make it seem like the system is locked up.
Sorry. Not sure why a good program would want to do this anyway.
If this is a kiosk type application, use a touch-screen monitor, and lock away the keyboard.
Can't be done wholly within a Java app.
The JVM is a user space process.
The desktop GUI intercepts the keystrokes and acts on them - either replace the desktop GUI or hack it so that either:
- the key strokes are ignored
- the user can't switch processes (and have your app intercept the key strokes)
Actually it's not a virus or worm. We will use it for security reason. I understand it's very hard (maybe impossible) for a pure java application to do these kinds of things because the JVM. So we're going to switch to a native OS-dependant application as the secruity application.
- Denis
Stop,
wait a minute!
What's with you 5 Duke Dollars now?
Do you want to throw them away? You can't get hold them or get them back!
One or two of the answers (not mine) were helpful to lead you to the right direction.
So please be fair as well!
Hartmut
> It seems to me as if he/she wants to replace the OS'
> desktop by a self written one.
> This idea is not totally wrong.
> MS has cheated us as if OS and desktop have to be the
> same. And integrate the browser, and WORD (tm) and
> ...
It is entirely possible to write your own shell/desktop for Windows, you don't have to use the default one, there are plenty available as freeware. Check out cnet.com.
Only issue is that it can't be done in pure Java, since there is a need to use Windows API calls...
For schillj it was fair.
Give him the last 1, too.
I thought, if you promise Duke Dollars, you should give them finally.
But don't worry if you have none left.
In this forum a lot of people will gladly help you if they can, for Duke Dollars or without.
Hartmut