Possible Duplicate:
How can a Java program use files inside the .jar for read and write?
I am working on a Java project in which I want to write to a file which is inside a jar. I know how to read it.
 URL url = getClass().getClassLoader().getResource("libs/page.properties");
 InputStream fin = url.openStream();
 if (fin != null)
 {
    ObjectInputStream objStream = new ObjectInputStream(fin);
    Object pageC = objStream.readObject();
    pageCount = Integer.parseInt(pageC.toString());
 }
Now how can I write a new value inside page.properties file?
 
    