I am writing a Java program that wants to do 3 things, and I don't know how to do them or if it's even possible with Java.
1 - I want to ensure that the computer whether running mac OS or windows xp/vista, doesn't go to sleep whilst running my app.
2 - I want my app to be able to turn the volume to full on all of the above OS's before playing a sound.
3 - Finally, when a sound is played I want to make sure that the screen, if turned off for 'power saving', is switched on.
Is any of this possible? I saw this post which suggested javax.sound.* as an answer to (2), but does that work on OS X and Windows XP, Windows Vista?
If anyone knows I would be very grateful.
EDIT: The app is a wi-fi LAN communications program that allows a user using the "client" software to pop up a message on any computer on the network running the "server" software. The software must notify the user even if they are not at the computer, hence the requirements for it to be always on (no support for WOL over wi-fi) and for it to make alot of noise & wake the screen to display any messages.
For part
1
, you might want to look at the OnNow/ACPI Support for Windows and the likes ofES_DISPLAY_REQUIRED
. Not Java, but you're probably going to have to go native or find a 3rd party wrapper library for this type of control.