Properties properties=new Properties(); //读取properties文件
// InputStream inputStream=new FileInputStream(new File("src/property.properties")); 文件在src目录下
InputStream inputStream=JdbcUtil.class.getClassLoader().getResourceAsStream("property.properties"); //使用classLoader加载classpath路径
properties.load(inputStream);
String str=(String) properties.get("JdbcUtil");
Class c=Class.forName(str);