Guest User

Untitled

a guest
Aug 21st, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. Lock windows desktop from Java after timeout
  2. javax.swing.Timer tim = new javax.swing.Timer(1000, new ActionListener() {
  3. public void actionPerformed(ActionEvent e) {
  4. System.out.println("CARD NOT PRESENT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
  5. // LOCK SCREEN
  6. Runtime rt = Runtime.getRuntime();
  7. Process pr = rt.exec("%windir%/System32/rundll32.exe user32.dll,LockWorkStation");
  8. }
  9. });
  10.  
  11. Runtime.getRuntime().exec("C:\Windows\System32\rundll32.exe user32.dll,LockWorkStation");
Add Comment
Please, Sign In to add comment