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 7830185
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T11:06:51+00:00 2026-06-02T11:06:51+00:00

I actually can’t believe I’m saying this but since porting my programs to OSX

  • 0

I actually can’t believe I’m saying this but since porting my programs to OSX and getting used to permissions, I’ve realized that what I planned to do on Windows will not work how I want it to. Currently, on windows, my program stores it’s setting’s in the registry (HKLM) and some user editable resources in a folder next to the program file. For various reasons, I have now decided that the configuration/settings will be stored in a file and the user will be able to in which folder the other resources are kept.

So the question I have now is where to store the configuration file. Obviously it will be updated, but I don’t want to program to have to require administrator permissions to run. I would like to offer an option so that all users can use the program (like most programs do), which will of course require Admin, so this leads be onto the second query: where should I store the configuration file (and the folder in which other resources are kept) and how can I detect whether the program has been installed for all users or just one!

Thanks in advance

PS If you didn’t guess, the program is written in Java so I would like to know how to programatically get the location you suggest as well please.

  • 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-06-02T11:06:52+00:00Added an answer on June 2, 2026 at 11:06 am

    Its normal practice in *nix compatible programs to store information in folders starting with name . in the home directory of the users like,

    .bash_history
    .bashrc
    

    You could use the same on OSX in my opinion and create a directory say,

    .myapp
    

    You can store any number of files with any format under that directory.

    To get the location of the folder, you can do

    String homeDir = System.getProperty("user.home");
    File myAppDir = new File(homeDir, ".myapp");
    

    That is roughly the code that can get you your custom config directory for your app.

    Please not that dot files / folders are somewhat similar to hidden folders in windows. Your File Manager will not generally show these files / folders by default.

    To identify if the program is installed for all the users or not, you could create the configuration at some administrator (root) controlled location like /etc (not sure about Mac) The user configuration can always override the default config. There could be a better way to handle this though.

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

Sidebar

Related Questions

I can't believe this - someone actually created two accounts on my social networking
You can actually just skip this first part cause it gets confusing, but I'll
I've recently come across this website. Now, is there any way I can actually
How can I implement this: I have 3 types (actually Interface): A , B
not sure if this can actually be done - OK probably can be done
You can actually see this effect on the SimplyScroll demo page : use Safari,
Actually I can save it in swf and in avi formats. Is there any
Is there any subprogram similar to DBMS_METADATA.GET_DDL that can actually export the table data
Last year, Scott Guthrie stated You can actually override the raw SQL that LINQ
I want to show up only words with minimum 4 Characters, actually I can

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.