1 Reply Latest reply: Dec 15, 2012 4:36 PM by jtahlborn RSS

    Using getResourceAsStream creates empty jar_cache*.tmp files

      I was using getResourceAsStream to retrieve property files from my Tomcat server but, if keep temporary files is enabled on the client, it leaves a jar_cache files in the user's temporary directory.
      I have tried both version 1.6 and 1.7.

      Here is the code.
      ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
      obj = contextClassLoader.getResourceAsStream("servletlocation.properties");
      Properties properties = new Properties();
      if(obj != null)
      obj = new BufferedInputStream(((InputStream) (obj)));
      properties.load(((InputStream) (obj)));
      loaded = true;
      catch(Exception exception)
      loaded = false;


      Perhaps I am going about this wrong?