Here you can find the source of makeRelativePaths(String classDir, List
public static List<String> makeRelativePaths(String classDir, List<File> files)
//package com.java2s; //License from project: Open Source License import java.io.File; import java.util.ArrayList; import java.util.List; public class Main { public static List<String> makeRelativePaths(String classDir, List<File> files) { List<String> relativePaths = new ArrayList<String>(); for (File file : files) { int prefixEnd = classDir.length() + 1; relativePaths.add(file.getPath().substring(prefixEnd)); }/*from ww w . j a v a 2s . c om*/ return relativePaths; } }