现在的位置: 首页 > 综合 > 正文

java创建文件夹并共享此文件夹

2013年08月21日 ⁄ 综合 ⁄ 共 250字 ⁄ 字号 评论关闭

File f=new File("d:\\share3");
   if(!f.exists()){
    f.mkdir();
   }
   
    

   try {
Process pro=Runtime.getRuntime().exec("cmd /c net share share=d:\\share3");
//Process pro=Runtime.getRuntime().exec("cmd /c mkdir d:\\share2");
} catch (IOException e) {
e.printStackTrace();
}
    

抱歉!评论已关闭.