Results 1 to 5 of 5
  1. #1
    RichersooN is offline Senior Member
    Join Date
    Jan 2011
    Location
    Rizal Province, Philippiines
    Posts
    167
    Rep Power
    0

    Default How to edit my property file inside the jar

    Please i have the code that can read textfile inside the jar using getResourceAsStream,
    Now i can't find any ways how can I write this property file which is inside the jar.
    Please help me
    Last edited by RichersooN; 02-19-2013 at 11:35 AM.

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,224
    Rep Power
    20

    Default Re: How to edit my property file inside the jar

    You can't write to a resource in a jar file.
    They're read only.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  3. #3
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    4,021
    Rep Power
    6

    Default Re: How to edit my property file inside the jar

    I have not written any code to manipulate Jar files but a jar file is initially created by some application. That would imply that someone could basically open a jar file, read and modify the contents and create a new jar file in its place. Does the Java JAR API offer such a capability?

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,224
    Rep Power
    20

    Default Re: How to edit my property file inside the jar

    Yes, you could recreate a jar file, but that would not be the jar file you were currently executing.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  5. #5
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    4,021
    Rep Power
    6

    Default Re: How to edit my property file inside the jar

    Ah, I didn't understand what he was asking for.

    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

Similar Threads

  1. Why i cant edit my jsp file?
    By gyijhbk in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 06-29-2012, 10:27 AM
  2. Dynamic loading property File from JAR file
    By basfot in forum New To Java
    Replies: 6
    Last Post: 02-27-2012, 05:24 PM
  3. Replies: 2
    Last Post: 02-22-2012, 11:09 AM
  4. Property File
    By Peter in forum JDBC
    Replies: 2
    Last Post: 07-04-2007, 04:48 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •