How can I save a file to the class path
classpath, file-io, java
Solution
In the general case you cannot. Resources loaded from a classloader can be anything: files in directories, files embedded in jar files or even downloaded over the network.
Problem
How can I save / load a file that is located where my classes are? I don't the physical path to that location before and I want dynamically to find that file. I want to load an XML file and write and read to it and I am not sure how to address it.