使用Java弹出CD [英] Eject CD using Java

查看:74
本文介绍了使用Java弹出CD的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有使用Java在Windows 7中弹出D驱动器的简单方法?目前,我并不特别在意跨平台兼容性。我已经做了一些研究,并且 Runtime.getRuntime()。exec(); 最多出现了...但是我不知道该把什么作为字符串参数,我已经尝试了一些方法,但是它只是丢在我身上!

Is there any simple way to eject the D drive in Windows 7 using Java? I don't particularly care about cross-platform compatibility at the moment. I've done some research andRuntime.getRuntime().exec(); has shown up most... but I have no idea what to put as the string parameter, I've tried a few things but it just throws up on me!

推荐答案

您可以传递vbscript代码以弹出CD。作为 exec()函数中的参数。

You can pass the vbscript code to eject the cd as an argument in the exec() function.

这篇关于使用Java弹出CD的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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