摘要: java.net.URL url = this.getClass().getResource("/");
String mSchemaPath = url.getFile();
if (mSchemaPath != null || !mSchemaPath.equals("")) {
String separator = "/";
int lastSlash = mSchemaPath.lastIndexOf(separator);
if (lastSlash == -1) {
separator = "\\";
lastSlash = mSchemaPath.lastIndexOf(separator);
}
prefix = mSchemaPath.substring(0, lastSlash);
阅读全文