我无法使用以下代码段加载属性文件
URL configURL = null;
URLConnection configURLConn = null;
InputStream configInputStream = null;
currConfigProperties = new Properties();
try {
String configPropertiesFile = getParameter("propertiesFile");
if (configPropertiesFile == null) {
configPropertiesFile = "com/abc/applet/Configuration.properties";
}
System.out.println("configPropertiesFile :"+configPropertiesFile);
configURL = new URL(getCodeBase(), configPropertiesFile);
configURLConn = configURL.openConnection();
configInputStream = configURLConn.getInputStream();
currConfigProperties.load(configInputStream);
} catch (MalformedURLException e) {
System.out.println(
"Creating configURL: " + e);
} catch (IOException e) {
System.out.println(
"IOException opening configURLConn: "
+ e);
}
获取 java.io.FileNotFoundException 异常。