java 在使用getresource获取中午目录时,出现乱码的处理
String inputFileName = BufferedDataSetSample.class.getResource("data/iris_data_normalised.txt").getFile();
try {
inputFileName=
java.net.URLDecoder.decode(inputFileName,"utf-8");
} catch (UnsupportedEncodingException e)
{
e.printStackTrace(); //To change body of catch statement use File |
Settings | File Templates.
}
原文:http://www.cnblogs.com/cndavy/p/3518497.html