Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Lock windows desktop from Java after timeout
- javax.swing.Timer tim = new javax.swing.Timer(1000, new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- System.out.println("CARD NOT PRESENT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
- // LOCK SCREEN
- Runtime rt = Runtime.getRuntime();
- Process pr = rt.exec("%windir%/System32/rundll32.exe user32.dll,LockWorkStation");
- }
- });
- Runtime.getRuntime().exec("C:\Windows\System32\rundll32.exe user32.dll,LockWorkStation");
Add Comment
Please, Sign In to add comment