Code Example:
Package Com.file.properties;import Java.io.fileinputstream;import Java.util.properties;public class ReadProperties { Properties prop;public readproperties (String path) {prop = new Properties (); Try{fileinputstream fs = new FileInputStream ( Path);p rop.load (FS);} catch (Exception e) {}}public string GetProperty (string key) {return Prop.getproperty (key);} public static void Main (string[] args) {//readproperties readproperties = new ReadProperties ("d:\\soapuistudy\\ Application.properties ");//system.out.println (Readproperties.getproperty (" name "));/}}
Put jar to the tool's Lib folder, Eg:soapui, use it by Groovy like this:
Package Com.file.propertiesdef Path = "D:\\soapuistudy\\application.properties" readproperties p = new ReadProperties ( Path) Log.info p.getproperty ("name")
[Java] Making a Jar file with Eclispe