标签:static string 3ds 属性 void color lin tin int
package com.cn.test;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.net.URLDecoder;
import java.util.Properties;
import java.util.Scanner;
public class FileTest {
public static void main(String[] args) throws IOException {
Properties prop=new Properties();
String path=null;
System.out.println(new File("").getCanonicalPath()+"\\setting.txt");
// String path = Thread.currentThread().getContextClassLoader().getResource("setting.txt").getPath();
if(path==null)
{
path="./setting.txt";
}
FileInputStream in=null;
while(true){
Scanner sc = new Scanner(System.in);
String s = sc.next();
char c = s.charAt(0);
if(c==‘0‘)
{
break;
}
try {
path = URLDecoder.decode(path, "UTF-8");
in = new FileInputStream(path);
prop.load(in);
prop.list(System.out);
} catch (Exception e) {
e.printStackTrace();
}finally{
try {
if(in!=null){
in.close();
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
}
A=2323333dsfds
标签:static string 3ds 属性 void color lin tin int
原文地址:http://www.cnblogs.com/xujintao/p/7587528.html