HappyClient happy=new HappyClient(System.out); boolean isHappy; int missing=0; try { isHappy = happy.verifyClientIsHappy(false); for(int i=0;i<args.length;i++) { missing+=happy.probeClass( "argument", args[i],
/** * get the location of the parser * @return path or null for trouble in tracking it down */ private String getParserLocation() { SAXParser saxParser = getSAXParser(); if (saxParser == null) { return null; } String location = getLocation(saxParser.getClass()); return location; }
/** * public happiness test. Exits with -1 if the client is unhappy. * @param args a list of extra classes to look for * */ public static void main(String args[]) { boolean isHappy = isClientHappy(args); System.exit(isHappy?0:-1); }
int needed = 0,wanted = 0; out.println(); title("happyClientTitle"); title("happyClientNeeded"); needed = needClass("javax.xml.soap.SOAPMessage", "saaj.jar", "SAAJ", needed += needClass("javax.xml.rpc.Service", "jaxrpc.jar", "JAX-RPC", needed += needClass("org.apache.commons.discovery.Resource", "commons-discovery.jar", "Jakarta-Commons Discovery", needed += needClass("org.apache.commons.logging.Log", "commons-logging.jar", "Jakarta-Commons Logging", needed += needClass("org.apache" + ".log" +"4j" +".Layout", "log4"+"j-1.2.4.jar", "Log4"+"j", needed += needClass("com.ibm.wsdl.factory.WSDLFactoryImpl", "wsdl4j.jar", "WSDL4Java",
Class clazz = classExists(classname); if (clazz == null) { String text; return 1; } else { String location = getLocation(clazz); String text; if (location == null) {
/** * a class we need if a class is missing * @param classname class to look for * @param jarFile where this class comes from * @param errorText extra error text * @param homePage where to d/l the library * @throws java.io.IOException when needed * @return the number of missing libraries (0 or 1) */ int needClass( String classname, String jarFile, String description, String errorText, String homePage) throws IOException { return probeClass( Messages.getMessage("happyClientError"), classname, jarFile, description, errorText, homePage); }
/** * what parser are we using. * @return the classname of the parser */ private String getParserName() { SAXParser saxParser = getSAXParser(); if (saxParser == null) { return Messages.getMessage("happyClientNoParser"); } // check to what is in the classname String saxParserName = saxParser.getClass().getName(); return saxParserName; }
int needed = 0,wanted = 0; out.println(); title("happyClientTitle"); title("happyClientNeeded"); needed = needClass("javax.xml.soap.SOAPMessage", "saaj.jar", "SAAJ", needed += needClass("javax.xml.rpc.Service", "jaxrpc.jar", "JAX-RPC", needed += needClass("org.apache.commons.discovery.Resource", "commons-discovery.jar", "Jakarta-Commons Discovery", needed += needClass("org.apache.commons.logging.Log", "commons-logging.jar", "Jakarta-Commons Logging", needed += needClass("org.apache" + ".log" +"4j" +".Layout", "log4"+"j-1.2.4.jar", "Log4"+"j", needed += needClass("com.ibm.wsdl.factory.WSDLFactoryImpl", "wsdl4j.jar", "WSDL4Java",
Class clazz = classExists(classname); if (clazz == null) { String text; return 1; } else { String location = getLocation(clazz); String text; if (location == null) {
/** * print warning message if a class is missing * @param classname class to look for * @param jarFile where this class comes from * @param errorText extra error text * @param homePage where to d/l the library * @throws java.io.IOException when needed * @return the number of missing libraries (0 or 1) */ int wantClass( String classname, String jarFile, String description, String errorText, String homePage) throws IOException { return probeClass( Messages.getMessage("happyClientWarning"), classname, jarFile, description, errorText, homePage); }
/** * what parser are we using. * @return the classname of the parser */ private String getParserName() { SAXParser saxParser = getSAXParser(); if (saxParser == null) { return Messages.getMessage("happyClientNoParser"); } // check to what is in the classname String saxParserName = saxParser.getClass().getName(); return saxParserName; }
int needed = 0,wanted = 0; out.println(); title("happyClientTitle"); title("happyClientNeeded"); needed = needClass("javax.xml.soap.SOAPMessage", "saaj.jar", "SAAJ", needed += needClass("javax.xml.rpc.Service", "jaxrpc.jar", "JAX-RPC", needed += needClass("org.apache.commons.discovery.Resource", "commons-discovery.jar", "Jakarta-Commons Discovery", needed += needClass("org.apache.commons.logging.Log", "commons-logging.jar", "Jakarta-Commons Logging", needed += needClass("org.apache" + ".log" +"4j" +".Layout", "log4"+"j-1.2.4.jar", "Log4"+"j", needed += needClass("com.ibm.wsdl.factory.WSDLFactoryImpl", "wsdl4j.jar", "WSDL4Java",
HappyClient happy=new HappyClient(System.out); boolean isHappy; int missing=0; try { isHappy = happy.verifyClientIsHappy(false); for(int i=0;i<args.length;i++) { missing+=happy.probeClass( "argument", args[i],
/** * get the location of the parser * @return path or null for trouble in tracking it down */ private String getParserLocation() { SAXParser saxParser = getSAXParser(); if (saxParser == null) { return null; } String location = getLocation(saxParser.getClass()); return location; }
Class clazz = classExists(classname); if (clazz == null) { String text; return 1; } else { String location = getLocation(clazz); String text; if (location == null) {
/** * print warning message if a class is missing * @param classname class to look for * @param jarFile where this class comes from * @param errorText extra error text * @param homePage where to d/l the library * @throws java.io.IOException when needed * @return the number of missing libraries (0 or 1) */ int wantClass( String classname, String jarFile, String description, String errorText, String homePage) throws IOException { return probeClass( Messages.getMessage("happyClientWarning"), classname, jarFile, description, errorText, homePage); }
/** * what parser are we using. * @return the classname of the parser */ private String getParserName() { SAXParser saxParser = getSAXParser(); if (saxParser == null) { return Messages.getMessage("happyClientNoParser"); } // check to what is in the classname String saxParserName = saxParser.getClass().getName(); return saxParserName; }
/** * public happiness test. Exits with -1 if the client is unhappy. * @param args a list of extra classes to look for * */ public static void main(String args[]) { boolean isHappy = isClientHappy(args); System.exit(isHappy?0:-1); }
HappyClient happy=new HappyClient(System.out); boolean isHappy; int missing=0; try { isHappy = happy.verifyClientIsHappy(false); for(int i=0;i<args.length;i++) { missing+=happy.probeClass( "argument", args[i],
/** * get the location of the parser * @return path or null for trouble in tracking it down */ private String getParserLocation() { SAXParser saxParser = getSAXParser(); if (saxParser == null) { return null; } String location = getLocation(saxParser.getClass()); return location; }