properties文件读取配置信息
2024-09-19 21:41:00
public static void main(String[] args){
String printerName="";
String path = "C:\\BarCodeConfig\\Printer.properties";
Properties prop = new Properties();
FileInputStream fis;
try {
fis = new FileInputStream(path);
prop.load(fis);
fis.close();
printerName= prop.getProperty("printerName");
} catch (FileNotFoundException e) {
System.out.println(e);
} catch (IOException ex) {
System.out.println(ex);
}
System.out.println("NAME:"+printerName); }
最新文章
- Struts+Spring+Hibernate项目的启动线程
- mybatis hibernate比较
- windows配置nginx实现负载均衡集群
- HD 1533 Going Home(最小费用最大流模板)
- C# - (0x80040154): Retrieving the COM class factory for component with CLSID {877AA945-1CB2-411C-ACD7-C70B1F9E2E32} failed
- 易维清使用技巧:CHM编辑利器
- 【BZOJ 2143】 飞飞侠
- java 保留小数点后N位数(若干位),几种实现的方式总结
- 利用浏览器查找font-family的css编码
- Copy_on_write的简单实现
- 火狐浏览器打开html文件,中文乱码
- ceph-deploy出错UnableToResolveError Unable to resolve host
- c++ 中lambda
- WebRTC技术调研
- Linux云计算运维-Redis
- springboot 2.0部署到Tomat8.5上
- 访问WebServcie遇到配额不足的时候,请增加配额
- 实验吧CTF天网管理系统
- 如何修改Windows上某块网卡的MTU的值
- Java数组排序和搜索