Java tutorial
//package com.java2s; public class Main { private static final String SEPARATOR = System.getProperty("file.separator"); private static String getImgDirPath() { StringBuilder dirPath = new StringBuilder(); dirPath.append(System.getProperty("user.dir")); dirPath.append(SEPARATOR + "report" + SEPARATOR + "worktemp" + SEPARATOR + "images" + SEPARATOR); return dirPath.toString(); } }