Here you can find the source of isBizServicesLocatorXmlLoaded(File f, ClassLoader classLoader)
public static boolean isBizServicesLocatorXmlLoaded(File f, ClassLoader classLoader)
//package com.java2s; /*//from w w w . j a v a2s . c o m * Copyright 2011-2016 ZXC.com All right reserved. This software is the confidential and proprietary information of * ZXC.com ("Confidential Information"). You shall not disclose such Confidential Information and shall use it only in * accordance with the terms of the license agreement you entered into with ZXC.com. */ import java.io.File; import java.io.FilenameFilter; import java.net.URL; import java.util.ArrayList; import java.util.List; public class Main { public static boolean isBizServicesLocatorXmlLoaded(File f, ClassLoader classLoader) { if ((f == null) || (!f.exists())) { return false; } File biz = new File(f.getAbsolutePath() + "/biz"); if (!biz.exists()) { System.err.println("Path not exists:" + biz); } final List<String> filenames = new ArrayList<String>(); biz.listFiles(new FilenameFilter() { public boolean accept(File dir, String name) { if (name.endsWith("_services_locator.xml")) { filenames.add(name); } return false; } }); if (filenames.size() == 0) { return false; } URL url = classLoader.getResource("biz/" + filenames.get(0)); return (url != null); } }