Here you can find the source of buildPathString(String[] folders, boolean addDefaultValues)
protected static String buildPathString(String[] folders, boolean addDefaultValues)
//package com.java2s; public class Main { protected static final String JAVA_LIBRARY_PATH = "java.library.path"; protected static String buildPathString(String[] folders, boolean addDefaultValues) { String del = System.getProperty("path.separator"); StringBuffer path = new StringBuffer(); if (null != folders && folders.length > 0) { for (String folder : folders) { path.append(folder).append(del); }// w ww .jav a 2s . com } if (addDefaultValues) { path.append(".").append(del); // append current directory path.append(System.getProperty("user.dir")).append(del); path.append(System.getProperty(JAVA_LIBRARY_PATH)); } return path.toString(); } }