Author: sebb Date: Fri Sep 21 06:05:23 2007 New Revision: 578090 URL: http://svn.apache.org/viewvc?rev=578090&view=rev Log: Look for user.properties and system.properties in JMeter bin directory if not found locally
Modified: jakarta/jmeter/branches/rel-2-2/src/core/org/apache/jmeter/JMeter.java jakarta/jmeter/branches/rel-2-2/xdocs/changes.xml jakarta/jmeter/branches/rel-2-2/xdocs/usermanual/get-started.xml jakarta/jmeter/trunk/src/core/org/apache/jmeter/JMeter.java jakarta/jmeter/trunk/xdocs/changes.xml jakarta/jmeter/trunk/xdocs/usermanual/get-started.xml Modified: jakarta/jmeter/branches/rel-2-2/src/core/org/apache/jmeter/JMeter.java URL: http://svn.apache.org/viewvc/jakarta/jmeter/branches/rel-2-2/src/core/org/apache/jmeter/JMeter.java?rev=578090&r1=578089&r2=578090&view=diff ============================================================================== --- jakarta/jmeter/branches/rel-2-2/src/core/org/apache/jmeter/JMeter.java (original) +++ jakarta/jmeter/branches/rel-2-2/src/core/org/apache/jmeter/JMeter.java Fri Sep 21 06:05:23 2007 @@ -485,9 +485,9 @@ if (userProp.length() > 0){ //$NON-NLS-1$ FileInputStream fis=null; try { - File file = new File(userProp); + File file = JMeterUtils.findFile(userProp); if (file.canRead()){ - log.info("Loading user properties from: "+userProp); + log.info("Loading user properties from: "+file.getCanonicalPath()); fis = new FileInputStream(file); Properties tmp = new Properties(); tmp.load(fis); @@ -506,9 +506,9 @@ if (sysProp.length() > 0){ FileInputStream fis=null; try { - File file = new File(sysProp); + File file = JMeterUtils.findFile(sysProp); if (file.canRead()){ - log.info("Loading system properties from: "+sysProp); + log.info("Loading system properties from: "+file.getCanonicalPath()); fis = new FileInputStream(file); System.getProperties().load(fis); } Modified: jakarta/jmeter/branches/rel-2-2/xdocs/changes.xml URL: http://svn.apache.org/viewvc/jakarta/jmeter/branches/rel-2-2/xdocs/changes.xml?rev=578090&r1=578089&r2=578090&view=diff ============================================================================== --- jakarta/jmeter/branches/rel-2-2/xdocs/changes.xml (original) +++ jakarta/jmeter/branches/rel-2-2/xdocs/changes.xml Fri Sep 21 06:05:23 2007 @@ -47,6 +47,7 @@ <li>Add NULL parameter option to JDBC sampler</li> <li>Add documentation links for Rhino and BeanShell to functions; clarify variables and properties</li> <li>Ensure uncaught exceptions are logged</li> +<li>Look for user.properties and system.properties in JMeter bin directory if not found locally</li> </ul> <h4>Fixes since 2.3RC3</h4> Modified: jakarta/jmeter/branches/rel-2-2/xdocs/usermanual/get-started.xml URL: http://svn.apache.org/viewvc/jakarta/jmeter/branches/rel-2-2/xdocs/usermanual/get-started.xml?rev=578090&r1=578089&r2=578090&view=diff ============================================================================== --- jakarta/jmeter/branches/rel-2-2/xdocs/usermanual/get-started.xml (original) +++ jakarta/jmeter/branches/rel-2-2/xdocs/usermanual/get-started.xml Fri Sep 21 06:05:23 2007 @@ -377,7 +377,8 @@ <note> Note: since 2.2, you can define additional JMeter properties in the file defined by the JMeter property <b>user.properties</b> which has the default value <b>user.properties</b>. - The file will be automatically loaded if it is found in the current directory. + The file will be automatically loaded if it is found in the current directory + or if it is found in the JMeter bin directory. Similarly, <b>system.properties</b> is used to update system properties. </note> <properties> Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/JMeter.java URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/JMeter.java?rev=578090&r1=578089&r2=578090&view=diff ============================================================================== --- jakarta/jmeter/trunk/src/core/org/apache/jmeter/JMeter.java (original) +++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/JMeter.java Fri Sep 21 06:05:23 2007 @@ -485,9 +485,9 @@ if (userProp.length() > 0){ //$NON-NLS-1$ FileInputStream fis=null; try { - File file = new File(userProp); + File file = JMeterUtils.findFile(userProp); if (file.canRead()){ - log.info("Loading user properties from: "+userProp); + log.info("Loading user properties from: "+file.getCanonicalPath()); fis = new FileInputStream(file); Properties tmp = new Properties(); tmp.load(fis); @@ -506,9 +506,9 @@ if (sysProp.length() > 0){ FileInputStream fis=null; try { - File file = new File(sysProp); + File file = JMeterUtils.findFile(sysProp); if (file.canRead()){ - log.info("Loading system properties from: "+sysProp); + log.info("Loading system properties from: "+file.getCanonicalPath()); fis = new FileInputStream(file); System.getProperties().load(fis); } Modified: jakarta/jmeter/trunk/xdocs/changes.xml URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/changes.xml?rev=578090&r1=578089&r2=578090&view=diff ============================================================================== --- jakarta/jmeter/trunk/xdocs/changes.xml (original) +++ jakarta/jmeter/trunk/xdocs/changes.xml Fri Sep 21 06:05:23 2007 @@ -65,6 +65,7 @@ <li>Add NULL parameter option to JDBC sampler</li> <li>Add documentation links for Rhino and BeanShell to functions; clarify variables and properties</li> <li>Ensure uncaught exceptions are logged</li> +<li>Look for user.properties and system.properties in JMeter bin directory if not found locally</li> </ul> <h4>Fixes since 2.3RC3</h4> Modified: jakarta/jmeter/trunk/xdocs/usermanual/get-started.xml URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/usermanual/get-started.xml?rev=578090&r1=578089&r2=578090&view=diff ============================================================================== --- jakarta/jmeter/trunk/xdocs/usermanual/get-started.xml (original) +++ jakarta/jmeter/trunk/xdocs/usermanual/get-started.xml Fri Sep 21 06:05:23 2007 @@ -377,7 +377,8 @@ <note> Note: since 2.2, you can define additional JMeter properties in the file defined by the JMeter property <b>user.properties</b> which has the default value <b>user.properties</b>. - The file will be automatically loaded if it is found in the current directory. + The file will be automatically loaded if it is found in the current directory + or if it is found in the JMeter bin directory. Similarly, <b>system.properties</b> is used to update system properties. </note> <properties> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]