从Java的待机调整音量和prevent电脑......(Mac和Windows XP,Vista中) [英] Adjust volume and prevent computer from standby in Java... (Mac and Windows XP, Vista)

查看:236
本文介绍了从Java的待机调整音量和prevent电脑......(Mac和Windows XP,Vista中)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写一个想要做3件事Java程序,我不知道该怎么办他们,或者如果它甚至有可能与Java。

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 - 我想,以确保计算机是否运行Mac OS或Windows XP / Vista中,不会去运行,而我的应用程序睡

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 - 我想我的应用程序可以播放声音之前,音量转向全面上述所有操作系统的的

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 - 最后,当播放声音我想确保该屏幕中,如果关闭了关于'节电',被接通

3 - Finally, when a sound is played I want to make sure that the screen, if turned off for 'power saving', is switched on.

时的任何这可能吗?只见这表明javax.sound这个职位。*作为一个答案( 2),但会在OS X和Windows XP,Windows Vista中?

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.

编辑:应用程序是一个Wi-Fi局域网通信程序,允许使用客户端软件来弹出一个消息运行服务器软件在网络上的任何一台计算机上的用户。软件必须通知用户,即使他们不是对着电脑,因此它是一直在(为WOL通过Wi-Fi不支持)的要求,并为它使噪声放大器很多;唤醒屏幕上显示任何消息。

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.

推荐答案

有关部分 1 ,你可能想看看的 OnNow的/ ACPI支持 ES_DISPLAY_REQUIRED 。不是Java,但你很可能将不得不去本地或者找第三方包装库为这种类型的控制。

For part 1, you might want to look at the OnNow/ACPI Support for Windows and the likes of ES_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.

这篇关于从Java的待机调整音量和prevent电脑......(Mac和Windows XP,Vista中)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆