The problem was not the URL by itself. The problem with ImageIcon is that it uses the machinery in java.awt.Toolkit to load the image. And Toolkit uses a "caching" strategy: for the same url/filename...