| Author |
How do i edit a properties file in a jar
|
Anil Verghese
Ranch Hand
Joined: Oct 11, 2006
Posts: 155
|
|
Hi,
Is there a way to edit properties file in an executable jar file.
Thanks
Anil
|
 |
Deepak Bala
Bartender
Joined: Feb 24, 2006
Posts: 6592
|
|
Why is the properties file inside the JAR ? It should be located outside the jar.
You can do this with winzip or winrar. Are you looking for a programmatic solution ?
|
SCJP 6 articles - SCJP 5/6 mock exams - SCJP Mocks - SCJP 5 Mock exam (Word document ) - SCJP 5 Mock exam in Java.Inquisition format
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
|
Not while you are executing code from that JAR; the file system (at least Windows) locks the file so you can't modify it anymore. That's why using resources is not the way to go when you need to write to it. Use a file in the folder returned by System.getProperty("user.home") instead.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
 |
|
|
subject: How do i edit a properties file in a jar
|
|
|