Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to write to a text file contained in a jar file?

Status
Not open for further replies.

beatrice

Programmer
Mar 15, 2002
1
CA
Hi,

I'm trying to write to a resource that will be included in my future jar file (that's just an app, no applet).

I can read it fine with the following code, if I put my file in the same directory as Main.class.
InputStream in = Main.class.getResourceAsStream("file.txt");

Is there anything equivalent that would give me an output stream??

Thanks a lot in advance, I've been on it a while now...

Beatrice

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top