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();
}