java读取ini文件遇到的难题
ini文件 :\key=valuebindphonewaiting=.\voice\business\systemworkplzwaiting.wavjava 代码: Properties prop = new Properties();
try{
String path = System.getProperty("user.dir");
prop.load(new FileInputStream(path + File.separator + "System.ini"));
value = prop.getProperty(propertyName);取到的value是.voicebusinesssystemworkplzwaiting.wav
ini文件 :\key=valuebindphonewaiting=.\voice\business\systemworkplzwaiting.wavjava 代码: Properties prop = new Properties();
try{
String path = System.getProperty("user.dir");
prop.load(new FileInputStream(path + File.separator + "System.ini"));
value = prop.getProperty(propertyName);取到的value是.voicebusinesssystemworkplzwaiting.wav
C:\\123.txt或者 C:/123.txt 方法可以解决,但是...但是读的是文件目录,不能改配置文件的~~
我想有没有办法不改配置文件直接可以读取正确的目录名
C:\\123.txt或者 C:/123.txt 方法可以解决,但是...但是读的是文件目录,不能改配置文件的~~
我想有没有办法不改配置文件直接可以读取正确的目录名