Related questions
Java system Properties, http.proxyHost, two questions
I am developing a Java application that makes HTTP requests, and half of my development time is behind a proxy. So I have the following block in my code:
if (BEHIND_PROXY) {
java.util.Properties systemProperties = System.getProperties();
systemProperties.setProperty("…
Reading Properties file in Java
I have the following code trying to read a properties file:
Properties prop = new Properties();
ClassLoader loader = Thread.currentThread().getContextClassLoader();
InputStream stream = loader.getResourceAsStream("myProp.properties");
prop.load(stream);
I get an exception at the last line. Specifically:
Exception in …