Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 226913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:33:18+00:00 2026-05-11T19:33:18+00:00

Is there a way to modify the property values in a Properties file that

  • 0

Is there a way to modify the property values in a Properties file that is stored in a Jar file as a Resource?

This is the scenario that I am trying to handle. I have a properties file stored as a resource in my Jar file. There are some system specific properties, for example, paths. I want to be able to change this for the system that I want the Jar file to run on.

The best solution would be to call a class/method that is internal to the Jar file that will modify the resource file that is contained in the Jar. Another solution would be to run a utility program on the Jar file that will modify the property file and re-Jar everything. This will be a one-time setup process that I run on the Jar file.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T19:33:18+00:00Added an answer on May 11, 2026 at 7:33 pm

    Use the preferences API to store changes: http://java.sun.com/j2se/1.5.0/docs/api/java/util/prefs/package-frame.html

    Edit after re-reading the question: are you in a situation where you want to send out the JAR to potentially many people and have it customized on install? If yes, then prefs is the way to go.

    If, instead, you’re looking to customize for a relatively small number of deployments, then it’s probably better to do the customization at build-time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there an easy way to modify this code so that the target URL
Is there a way to modify existing .NET assemblies without resorting to 3rd party
Is there any way to modify the bound value of one of the variables
Is there a way to modify/tell dired to copy files asynchronously? If you mark
Is there any way to check whether a file is locked without using a
Is there a way to find the name of the program that is running
I'm looking for a way to modify properties on a dynamic C# 4.0 object
Is there way in next piece of code to only get the first record?
is there way thats i can preselect an item when the page loads or
Is there a way to enforce constraint checking in MSSQL only when inserting new

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.