Here you can find the source of normalizePath(String path)
public static String normalizePath(String path)
//package com.java2s; //License from project: Apache License public class Main { public static final String FORWARD_SLASH = "/"; public static String normalizePath(String path) { return path.endsWith(FORWARD_SLASH) ? path.substring(0, path.length() - 1) : path; }/*from w ww. j a va2s . co m*/ }