Sign in with
Sign up | Sign in
Your question
Solved

How to lock computer using java

Last response: in Applications
Share
April 14, 2010 12:49:57 PM

Hello,
I m developing project on internet cafe management with java.
where we hv to lock certain pc when the given time is finished.

pls help me as very short time is left

More about : lock computer java

Best solution

a b L Programming
April 14, 2010 11:39:26 PM

Look up locking a computer from the command line (that will differ depending on the OS) and making system calls from java.

EDIT: this site aperently has sample code for running system calls in java:
http://javaevangelist.blogspot.com/2008/08/making-syste...
I haven't tested this, and don't know if this is the proper way to handle it, but it should be a good starting point.
Share
April 15, 2010 12:01:40 PM

thanx buddy....it helped me.
but i m lookin for an easier way....
m
0
l
Related resources
a b L Programming
April 15, 2010 4:25:37 PM

There may be another library that has this functionality already build in, but i dunno if it exists or where you would find it (HINT, start with google).

The system call wouldn't be hard to code at all. If you are having problems with it, if you let what OS you are using, i could create a simple function that could do it for you... but again, this shouldn't be very hard to do, i recommend spending 15 minutes figuring this out.

Let me know if you need anything else.
m
0
l
April 16, 2010 2:51:11 PM

Best answer selected by rakeshfdd.
m
0
l
April 16, 2010 2:51:48 PM

thanx dude...............
its enough from u..
m
0
l
!