InputStream inputStream = null;
try
{
JarFile testJarFile = new JarFile("D:\\E\\wtp\\MyEclipse85\\workspace85\\FileService\\dist\\lib\\FileService.jar");
JarEntry jarEntry = testJarFile.getJarEntry("log4j.properties");
inputStream = testJarFile.getInputStream(jarEntry);
// inputStream = new LogConfig().getClass().getClassLoader().getResourceAsStream(LOG_CONFIG_FILE);
// inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(LOG_CONFIG_FILE);
// inputStream = new FileInputStream(new File("jar:file:/" + System.getProperty("user.dir")
// + File.separator + LOG_CONFIG_FILE));
// inputStream = LogConfig.class.getResourceAsStream("config.properties");
properties.load(inputStream);
}
try
{
JarFile testJarFile = new JarFile("D:\\E\\wtp\\MyEclipse85\\workspace85\\FileService\\dist\\lib\\FileService.jar");
JarEntry jarEntry = testJarFile.getJarEntry("log4j.properties");
inputStream = testJarFile.getInputStream(jarEntry);
// inputStream = new LogConfig().getClass().getClassLoader().getResourceAsStream(LOG_CONFIG_FILE);
// inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(LOG_CONFIG_FILE);
// inputStream = new FileInputStream(new File("jar:file:/" + System.getProperty("user.dir")
// + File.separator + LOG_CONFIG_FILE));
// inputStream = LogConfig.class.getResourceAsStream("config.properties");
properties.load(inputStream);
}