Solved

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

Posted on 2013-07-01
7
280 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
  • 3
  • 3
7 Comments
 
LVL 16

Accepted Solution

by:
krakatoa earned 500 total points
Comment Utility
No.
0
 

Author Closing Comment

by:searchsanjaysharma
Comment Utility
Tx
0
 
LVL 16

Expert Comment

by:Valeri
Comment Utility
THERE IS a way to lock screen, if it's Windows.
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 16

Expert Comment

by:Valeri
Comment Utility
0
 
LVL 16

Expert Comment

by:krakatoa
Comment Utility
>>Tx<<

;)

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

Expert Comment

by:Valeri
Comment Utility
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
Comment Utility
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now