1.将XXX..properties放到jar包里src目录下
2.程序里获取方法案例:
方法一:
private static Properties p = new Properties();
p.load(TestDlg.class.getResourceAsStream("/iPort.properties"));
int iPort = Integer.parseInt(p.getProperty("iPort"));
方法二:
InputStream in = new BufferedInputStream(new FileInputStream("src/ESupplierFacade.properties"));
ResourceBundle rb = new PropertyResourceBundle(in);
WSWSForESupplierFacade_address = rb.getString("URL");