Java tutorial
//package com.java2s; import java.io.File; public class Main { private static String createDir(String dirPath) { try { File dir = new File(dirPath); if (!dir.exists()) { dir.mkdirs(); } return dir.getAbsolutePath(); } catch (Exception e) { e.printStackTrace(); } return dirPath; } }