String jarName = ""; try { Class c = Class.forName("JSPservletPkg.JSPservlet"); Class[] parameterTypes = new Class[] {HttpServletRequest.class}; Method m = c.getMethod("getJAR",parameterTypes); Object[] arguments = new Object[] {request}; jarName = (String)m.invoke(null, arguments); } catch(Exception e) {}