1 | FileInputStream fis=null;↵ | | 1 | File↵
|
2 | try {↵ | | |
|
3 | File file = JMeterUtils.findFile(sysProp);↵ | | |
|
4 | if (f↵ | | 2 | propFile = new File(name);↵
|
5 | ile.canRead()){↵ | | 3 | if (propFile.canRead()) {↵
|
6 | log.info("Loading system properties from: "+file.getCanonicalPath());↵ | | |
|
| | | 4 | log.info("Setting Global properties from the file "+name);↵
|
| | | 5 | try {↵
|
7 | fis = new FileInputStream(file);↵ | | 6 | fis = new FileInputStream(propFile);↵
|
8 | System.getProperties().load(fis);↵ | | 7 | ↵
|
9 | }↵ | | |
|
| | | 8 | remoteProps.load(fis);↵
|
| | | 9 | } catch (FileNotFoundException e) {↵
|
| | | 10 | log.warn("Could not find properties file: "+e.getLocalizedMessage());↵
|
10 | } catch (IOException e) {↵ | | 11 | } catch (IOException e) {↵
|
11 | log.warn("Error loading system property file: " + sysProp, e);↵ | | 12 | log.warn("Could not load properties file: "↵
|
12 | ↵ | | 13 | +e.getLocalizedMessage());↵
|
13 | } finally {↵ | | 14 | } finally {↵
|
14 | JOrphanUtils.closeQuietly(fis);↵ | | 15 | JOrphanUtils.closeQuietly(fis);↵
|
15 | ↵ | | 16 | }↵
|
16 | } | | 17 | }
|