Mittwoch, 14. März 2012

Windows: Shutdown via command line

You can shutdown a computer running Windows using the command line. Use the shutdown command to force a shutdown, reboot or hibernate.

Shutdown computer
shutdown /s

Restart computer
shutdown /r

Hibernate computer
shutdown /h

The shutdown command is available since Windows XP. On older versions of Windows use this command:

Restarting the computer
RUNDLL.EXE user.exe,exitwindowsexec

Shut down the computer
RUNDLL32.EXE user,exitwindows

Freitag, 2. März 2012

Java: Creating an undecorated window with LWJGL

This system property removes the window decorations (title bar, icons, border) from LWJGL applications in window mode.

org.lwjgl.opengl.Window.undecorated=<true|false>

You can specify the property on the command line, when you start the application

java -Dorg.lwjgl.opengl.Window.undecorated=true -jar application.jar

or in your code by setting it manually.

System.setProperty(" org.lwjgl.opengl.Window.undecorated", "true");

See the LWJGL wiki for more hidden property switches.