You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by se...@apache.org on 2007/03/14 02:02:54 UTC
svn commit: r517963 -
/jakarta/jmeter/branches/rel-2-2/src/core/org/apache/jmeter/util/JMeterUtils.java
Author: sebb
Date: Tue Mar 13 18:02:53 2007
New Revision: 517963
URL: http://svn.apache.org/viewvc?view=rev&rev=517963
Log:
Add findFile method which also checks bin directory
Modified:
jakarta/jmeter/branches/rel-2-2/src/core/org/apache/jmeter/util/JMeterUtils.java
Modified: jakarta/jmeter/branches/rel-2-2/src/core/org/apache/jmeter/util/JMeterUtils.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/branches/rel-2-2/src/core/org/apache/jmeter/util/JMeterUtils.java?view=diff&rev=517963&r1=517962&r2=517963
==============================================================================
--- jakarta/jmeter/branches/rel-2-2/src/core/org/apache/jmeter/util/JMeterUtils.java (original)
+++ jakarta/jmeter/branches/rel-2-2/src/core/org/apache/jmeter/util/JMeterUtils.java Tue Mar 13 18:02:53 2007
@@ -958,30 +958,6 @@
private static String jmDir;
- // TODO remove
-// public static final String JMETER = "jmeter"; // $NON-NLS-1$
-//
-// public static final String ENGINE = "jmeter.engine"; // $NON-NLS-1$
-//
-// public static final String ELEMENTS = "jmeter.elements"; // $NON-NLS-1$
-//
-// public static final String GUI = "jmeter.gui"; // $NON-NLS-1$
-//
-// public static final String UTIL = "jmeter.util"; // $NON-NLS-1$
-//
-// public static final String CLASSFINDER = "jmeter.util.classfinder"; // $NON-NLS-1$
-//
-// public static final String TEST = "jmeter.test"; // $NON-NLS-1$
-//
-// public static final String HTTP = "jmeter.protocol.http"; // $NON-NLS-1$
-//
-// public static final String JDBC = "jmeter.protocol.jdbc"; // $NON-NLS-1$
-//
-// public static final String FTP = "jmeter.protocol.ftp"; // $NON-NLS-1$
-//
-// public static final String JAVA = "jmeter.protocol.java"; // $NON-NLS-1$
-//
-// public static final String PROPERTIES = "jmeter.elements.properties"; // $NON-NLS-1$
/**
* Gets the JMeter Version.
@@ -1031,5 +1007,19 @@
*/
public static boolean isExpertMode() {
return JMeterUtils.getPropDefault(EXPERT_MODE_PROPERTY, false);
+ }
+
+ /**
+ * Find a file in the current directory or in the JMeter bin directory.
+ *
+ * @param fileName
+ * @return File object
+ */
+ public static File findFile(String fileName){
+ File f =new File(fileName);
+ if (!f.exists()){
+ f=new File(getJMeterHome()+File.separator+"bin"+fileName); // $NON-NLS-1$
+ }
+ return f;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org