You are not logged in.

#1 2010-02-17 02:49:22

samuele.mattiuzzo
Member
From: Treviso, IT
Registered: 2009-10-12
Posts: 307
Website

Lock the screen with java

I'd like to know if it's possible to create a java application that locks screen and can be unlocked only with username or password. Alt-f4, ctrl-alt-canc or windows key shouldn't be able to kill it smile

Don't need the code, just need to know where i can read some guides or what part of java rfc should i find something useful

thanks!!

Offline

#2 2010-02-17 02:58:21

Peasantoid
Member
Registered: 2009-04-26
Posts: 928
Website

Re: Lock the screen with java

I know jack squat about Java, but you could probably call vlock or some such.
(Ohh... Windows. Never mind.)

Last edited by Peasantoid (2010-02-17 02:58:48)

Offline

#3 2010-02-19 15:54:41

scottman
Member
From: Utah
Registered: 2010-02-12
Posts: 27
Website

Re: Lock the screen with java

I dont think you can in Java since its a higher level language.
http://www.coderanch.com/t/328389/Java- … oard-input <--this is for windows saying you can not.

there may be a way via the JNI in java.
http://en.wikipedia.org/wiki/Java_Native_Interface
it really depends how much work you want to go through to do this, you can probably find one that does this already. But using JNI with some c/c++ to catch those keys before they get sent to the system should work.

good luck

Offline

#4 2010-02-19 17:02:15

robrene
Member
Registered: 2009-04-16
Posts: 168

Re: Lock the screen with java

I don't think it's possible directly from Java, seeing the code will run on its own virtual machine. Your best chance would be to run a different (nonjava) program from within your own program using java.lang.Runtime.exec(). See here for an example.


smile neutral sad big_smile yikes wink hmm tongue lol mad roll cool

Offline

Board footer

Powered by FluxBB