Eject CD using Java [duplicate]

只谈情不闲聊 提交于 2019-12-13 01:28:08

问题


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!


回答1:


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



来源:https://stackoverflow.com/questions/5813876/eject-cd-using-java

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!