I am using the Robot class to simulate key press in Java. But i am unable to press Window key+L although i am able to press them individually. Here is my code:
Try this instead:
Runtime.getRuntime().exec("rundll32 user32.dll,LockWorkStation");