Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Is is possible to lock the computer unless the user enters the password.

Posted on 2013-07-01
7
Medium Priority
?
291 Views
Last Modified: 2013-07-01
I have created the Attendance Utility. Here in the module contains Short Break, Lunch break ,Day Attendance  etc etc.

Suppose the candidates goes for short breaks he needs to click on the button and the moment he click on the login screen will come and the screen should be locked.

When one enters the password the screen should be unlocked and so on.

Is there any method in java that can lock the screen.

Application is Windows Based using Swings.
0
Comment
Question by:searchsanjaysharma
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 16

Accepted Solution

by:
krakatoa earned 1000 total points
ID: 39289720
No.
0
 

Author Closing Comment

by:searchsanjaysharma
ID: 39289956
Tx
0
 
LVL 16

Expert Comment

by:Valeri
ID: 39290034
THERE IS a way to lock screen, if it's Windows.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 16

Expert Comment

by:Valeri
ID: 39290042
0
 
LVL 16

Expert Comment

by:krakatoa
ID: 39290096
>>Tx<<

;)

"Is there any method in java . . . " - was my point.
0
 
LVL 16

Expert Comment

by:Valeri
ID: 39290155
Runtime r = Runtime.getRuntime();
Process p = r.exec("rundll32.exe user32.dll, LockWorkStation");
p.waitFor();
BufferedReader b = new BufferedReader(new InputStreamReader(p.getInputStream()));
String line = "";

while ((line = b.readLine()) != null) {
  System.out.println(line);
}
0
 
LVL 16

Expert Comment

by:krakatoa
ID: 39290574
searchsanjaysharma : If you want to change to Valeri's workaround, then feel free to call Mod and get the points re-allocated.
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question