- loading of .configure file fixed for eclipse

- testdevice.properties updated for new package names

git-svn-id: https://svn.code.sf.net/p/libusbjava/code/trunk@197 94ad28fe-ef68-46b1-9651-e7ae4fcf1c4c
This commit is contained in:
schlaepfer
2006-11-17 07:51:01 +00:00
parent b370621a91
commit 77b6d90492
3 changed files with 8 additions and 14 deletions

View File

@@ -1,9 +1,6 @@
package ch.ntb.usb.logger;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.net.URL;
import java.net.URLDecoder;
import java.io.InputStream;
import java.util.Properties;
import java.util.logging.ConsoleHandler;
import java.util.logging.Handler;
@@ -57,14 +54,11 @@ public class LogUtil {
private static void createLoggersFromProperties() {
try {
URL url = ClassLoader.getSystemResource(PROPERTIES_FILE);
if (url == null)
throw new FileNotFoundException(PROPERTIES_FILE
+ " not found -> file must be on classpath");
String filename = URLDecoder.decode(url.getPath(), "UTF-8");
FileInputStream fis = new FileInputStream(filename);
InputStream is = LogUtil.class.getClassLoader()
.getResourceAsStream(PROPERTIES_FILE);
// FileInputStream fis = new FileInputStream();
Properties prop = new Properties();
prop.load(fis);
prop.load(is);
// get global debug enable flag
debugEnabled = Boolean.parseBoolean(prop.getProperty(PLUGIN_ID
+ "/debug"));

View File

@@ -43,7 +43,7 @@ public class DeviceTest {
String devInfoClazzName = devInfoProp.getProperty(deviceInfoKey);
if (devInfoClazzName == null) {
throw new IllegalArgumentException("property " + deviceInfoKey
+ "not found in file " + testdevicePropertiesFile);
+ " not found in file " + testdevicePropertiesFile);
}
Class devInfoClazz = Class.forName(devInfoClazzName);
devinfo = (AbstractDeviceInfo) devInfoClazz.newInstance();

View File

@@ -4,6 +4,6 @@
################################################################
# Atmel AVR AT90USB1287
testdeviceInfo=ch.ntb.usb.AT90USB1287
testdeviceInfo=ch.ntb.usb.test.AT90USB1287
# Cypress FX2 CY7C68013A
# testdeviceInfo=ch.ntb.usb.CY7C68013A
# testdeviceInfo=ch.ntb.usb.test.CY7C68013A