问题
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