Here you can find the source of filePathToClassPath(String path)
private static String filePathToClassPath(String path)
//package com.java2s; //License from project: Apache License public class Main { private static String filePathToClassPath(String path) { path = toForwardSlashes(path);/*from w w w . j av a 2 s . c o m*/ if (path.charAt(0) == '/') { path = path.substring(1); } return path.replace('/', '.'); } public static String toForwardSlashes(String path) { if (path == null) { return null; } return path.replace('\\', '/'); } }