Java tutorial
//package com.java2s; import java.io.InputStream; public class Main { /** * * @param filePath * @return */ public static InputStream getXMLFile(String filePath) { return ClassLoader.getSystemResourceAsStream(filePath); } }