private boolean isVendorSpecific(File f, String dbVendor, String className, String origDbVendor) { //File could be a jdbc jar file or a normal jar file boolean isVendorSpecific = false; if(origDbVendor != null) { if(origDbVendor.equalsIgnoreCase(DATABASE_VENDOR_EMBEDDED_DERBY)) { return className.toUpperCase(Locale.getDefault()).indexOf(DATABASE_VENDOR_EMBEDDED) != -1; } else if(origDbVendor.endsWith(DATABASE_VENDOR_30)) { return !(className.toUpperCase(Locale.getDefault()).endsWith(DATABASE_VENDOR_40)); } } String vendor = getVendorFromManifest(f); if (vendor == null) { //might have to do this part by going through the class names or some other method. //dbVendor might be used in this portion if (isVendorSpecific(dbVendor, className)) { isVendorSpecific = true; } } else { //Got from Manifest file. if (vendor.equalsIgnoreCase(dbVendor) || vendor.toUpperCase(Locale.getDefault()).indexOf( dbVendor.toUpperCase(Locale.getDefault())) != -1) { isVendorSpecific = true; } } return isVendorSpecific; }