static File dir=new File("file:/opt");这句话有问题,改一改就可以得出正确结果。
给他加上个正确的路径,比如c:/或者别的路径
给他加上个正确的路径,比如c:/或者别的路径
解决方案 »
- JSplitPane的分割问题
- junit test就一个test方法,运行几次,每次使用不同样本数据,如果辩别哪次使用的是哪批样本
- JTree节点名字修改?
- 请问一下,如何不重启TOMCAT而更新SPRING里面创建的SINGLETON对象呢?谢谢
- 关于使用java开发电力配网系统的问题
- 如何屏蔽掉双击前的单击
- 请教各位高手:(100分)
- 请问哪里有linux下jdk1.4.1下载
- 子类与父类的hashcode一样?
- java中有没有destructor的东东,好像一般的class里都没有嘛,难道不要手工做这些事情,全部交给gc处理吗?
- 我在dos 下java命令无效,javac有效?why?
- 求教关于网络爬虫问题
For Microsoft Windows platforms, the prefix of a pathname that contains a drive specifier consists of the drive letter followed by ":" and possibly followed by "\" if the pathname is absolute. The prefix of a UNC pathname is "\\"; the hostname and the share name are the first two names in the name sequence. A relative pathname that does not specify a drive has no prefix.
Instances of the File class are immutable; that is, once created, the abstract pathname represented by a File object will never change.
http://java.sun.com/j2se/1.4.1/docs/api/java/net/URI.html
yefc(yefc)说得好,将"file:/root/" 改成"/root"就行了。