【发布时间】:2019-12-08 18:43:44
【问题描述】:
我尝试了以下程序
import java.io.*;
class dr
{
public static void main(String args[])
{
try{
File[] roots = File.listRoots();
for (int index = 0; index < roots.length; index++)
{ //Print out each drive/partition
System.out.println(roots[index].toString());
}
}
catch(Exception e)
{
System.out.println("error " +e);
}
}
}
但是在我的系统中软驱没有连接 我收到如下消息
" 驱动器尚未准备好使用;它的门可能打开,请检查驱动器 A:并确保磁盘已插入并且驱动器门已关闭" 然后显示三个选项取消,再试一次,继续 当我尝试继续时,它可以工作 但我怎么能避免那个味精
【问题讨论】: