| 49 | "\t\tjava -jar injectDatabase.jar inject 19716 c:/windows/temp/databaseconn.txt"); |
| 50 | } |
| 51 | public static String getJarFileByClass(Class cs) { |
| 52 | String fileString=null; |
| 53 | String tmpString; |
| 54 | if (cs!=null) { |
| 55 | tmpString=cs.getProtectionDomain().getCodeSource().getLocation().getFile(); |
| 56 | if (tmpString.endsWith(".jar")) { |
| 57 | try { |
| 58 | fileString= URLDecoder.decode(tmpString,"utf-8"); |
| 59 | } catch (UnsupportedEncodingException e) { |
| 60 | fileString=URLDecoder.decode(tmpString); |
| 61 | } |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | return new File(fileString).toString(); |
| 66 | } |
| 67 | public static String getMethodSignature(Method method) { |
| 68 | StringBuilder s = new StringBuilder(); |
| 69 | Class[] types = new Class[method.getParameterTypes().length + 1]; |