Where to place application setting?

Hello,
my J2SE application runs in background in linux shell and from time to time I need to reload application setting.
Until now I've used java setting files to save these values, but this is inappropriate because it can not be changed during application runtime. Applications must be turned off and on to load the new settings.
Another solution is to use properties files, but I do not know how (and if it's an appropriate solution) to save these files outside compiled JAR. These files can be edited and application can reloads them.
Next solution is to save setting into database but there is a problem with saving data for database connection itself (database setting must be outside database, so there must be two kinds of setting :/)
What is the best place to place these kinds of settings? What do you use?

Dear Gimbal2,
unfortunately you are wrong. See Bug http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4787931 which is also valid for Java 6 and 7. It's the TOP 8 of unresolved Java bugs. The user.home is calculated from registry key's "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Desktop" value.
One possible solution that many Java applications employ is to put the file in the user home directory. You can get it in the code with System.getProperty("user.home"). This has a few advantages:
- its cross-platform, at least across all major ones (win, mac, lin)It is not Windows compatible.
- you can be sure that this directory existsHighly likely. (But copied Windows user profiles may contain invalid data, which is a malconfiguaration then).
- you can be sure that the logged in user can read and write thereNo you cannot - on Windows. If the Desktiop directory is shared between users it is usually not writable. If the parent directory is not writable too, you can be sure you cannot write there!
- it is user specific, so different users don't have to share the same settingsUsually yes. On Windows in a shared Desktop scenario it points to the same directory for many users. If this directory is writable, everybody uses the same directory!
So do not always use user.home, consider using environment variable USERPROFILE on Windows.
I am afraid that due to the relucatancy of Sun --> Oracle this bug will persist for more decades and cause quirky application and security problems.

Similar Messages

  • Where to place application classes to override shared calsses?

    I use web application which requires to override some of shared classes. Where should I place these classes? It is necessary to override these classes in this application only. Placing it in WEB_INF/classes subdirectory inside web application folder has no effect. The only way I have found - to place these classes inside APPS subdirecory. But in this way all deployed applications will use these new classes. Can anyone help me?
    Thanks in advance,
    Vadim Lotarev

    Put these classes in WEB-INF/classes and enable dynamic reloading. To do that-
    open krededit-> SOFTWARE-> iplanet-> Application Server->6.0->CCS0->SYSTEM_JAVA->Versioning and set it to 0. Bydefault it is 1, disabled. And restart the iAS to pickup this change.
    Or, redeploy the application.
    Hope this would help.
    Should you have any question further, get back.
    Thanks,
    Rakesh.

  • I have a complaint about my mac book pro being slippery. Why do these expensive computers that we as consumers purchase if you set them on a couch slip off no matter where you place them on the couch?

         Hi, my Mac Book Pro 15 inch lap top if i set it on the couch no matter where I place it slips off and luckily so far I have caught it before it falls onto the floor and gets ruined, of which I am super afraid of, due to what I initially paid for it as the consumer. Also, the couch is not made of slippery material at all. Also, when using it on my lap while watching tv, and multi tasking while doing my college homework, it even slides off of my lap at times. Why is it called a lap top then when it's not working as one? Are we to wear rubber pants that grip your products? Also, Why do you place on your Apple website that in one area a satin cover is available in the teal color, and then in another area it's discontinued? I believe it would be simpler if Apple would just remove the product all together from the purchasing website once any product becomes discontinued. Also, I was sitting here at home waiting for a reply about the satin cover in teal no longer being available period or that it has shipped, but yet I ended up calling Apple altogether myself and finding this all out that the only available color is the black. It would've been nice to have recieved an e-mail or a phone call on why it wasn't going to be shipped, or shipping instead of having to do customer services job and doing the leg work myself. Also, why is it that no one also even tells a consumer about the classes that were offered to a new consumer for 14 days after purchase of paying the $99.00s to learn about their macs of any kind? If I had known about such a program, I surely would've signed right up for it. Now I am being told that I can only take one clas at a time or something?!? I seriously wish I was told about this as a consumer of the Mac Book Pro 15 inch, because I would've purchased that offer right away, and now I am stuck and can no longer do it. Also I have had my computer since October of last year. So, I am in college as becoming a graphic designer within a degree of an Associates of Science and am now still struggling to learn the computer, and the programs I pruchased as well at the time of purchase, along with an Epson printer, the magic mouse, and the one year warranty. As for this all, I do believe that Apple needs to make a better bottom to the Mac Book Pro's within a much better quality for the price we pay as consumers, and all other lap tops and/or Notebooks in making them slide proof. The tiny rubber spots on the bottom of the lap tops or any Apple computer similar to mine just needs a better quality improvement to us consumers I spent good money on this purchase, I think now I deserve a rubberised protective cover for free for the slipperyness, and also since I was never told about the program for the classes of which a consumer  was to pay $99.00s for, I think as a good paying quality consumer for Apple's products, I now deserve these classes for free as well.
    Sincerely,
    Kim

    Hi shldr2thewheel,
         it has been a while since we have last spoke, I would like to let you know, I am still working on getting used to the switch from windows to a Mac/Apple system. I do have a new question for you, I did purchase In Design CS5.5 through journeyed.com through Cuyahoga Community College of which I attend as a student, is there a way to purchase an online book through iTunes to learn that as well? Also, you know me, the struggling student, I would also, when and if the book can be purchased through the iTunes, would need to know if you do know of a much easier book for struggling students like myself and at a reasonable price as well for the In Design CS5.5 program. Our campus bookstore had closed early, and, so did the colleges library and our local library here where I do live, so, I cannot go to either place to purchase a book or to take out a book, plus cash funds are low at this moment as well but, I do have money left on the iTunes account to use, if it can be used. So, can it be used, the iTunes money, towards finding a low priced online book? I am in great need of assistance as I have a project due for my one course for this Tuesday, September 4, 2012.
    Sincerely in need of help once again,
    Kim

  • Where to place the third party jars on WLS 7.0SP2

    Our application use the thirdparty JDBC driver, for example, the JDBC driver for
    mySQL. I donot want my customer to modify startWeblogic.cmd or some file else
    to make the jar file available for the applicaiton.
    my question is if some directory exists under weblogic700/server where I can place
    the jar file(that is, like the installed extension of JDK or JRE).
    I try to place the jar file on server/ext, it does not work.
    Guofeng

    "Guofeng Zhang" <[email protected]> wrote in message
    news:[email protected]...
    >
    Our application use the thirdparty JDBC driver, for example, the JDBCdriver for
    mySQL. I donot want my customer to modify startWeblogic.cmd or some fileelse
    to make the jar file available for the applicaiton.
    my question is if some directory exists under weblogic700/server where Ican place
    the jar file(that is, like the installed extension of JDK or JRE).
    I try to place the jar file on server/ext, it does not work.
    GuofengDisclaimer: I am a newcomer to the world of BEA WLS,
    so try this at your own risk.
    For the 3rd party classes to be found, they have to be included somewhere
    in the CLASSPATH. The best place (IMO) for customisation of the CLASSPATH
    is in the extEnv.sh. You will not find it in a standard installation of
    WLS, but if you look in $WL_HOME/server/bin/startWLS.sh you will see this:
    PATH=".${PATHSEP}${WL_HOME}/server/bin${PATHSEP}${JAVA_HOME}/jre/bin${PATHSE
    P}${JAVA_HOME}/bin${PATHSEP}${PATH}"
    # Import extended environment
    if [ -f extEnv.sh ]; then
    . extEnv.sh
    fi
    Note the inclusion of "." at the start of PATH. This is magic that enables
    the ". extEnv.sh" command to locate the "extEnv.sh" script.
    In "extEnv.sh" you can use the EXT_PRE_CLASSPATH, EXT_POST_CLASSPATH,
    EXT_PRE_PATH, EXT_POST_PATH and LD_LIBRARY_PATH to add additional classes
    and directories to the server environment.
    For additional information, refer to the WebLogic Server Administration
    Guide (http://e-docs.bea.com/wls/docs70/adminguide/startstop.html).
    Similar, if you look in $WL_HOME/server/bin/setWLSEnv.sh you will see this:
    PATH="${WL_HOME}/server/bin${PATHSEP}${JAVA_HOME}/jre/bin${PATHSEP}${JAVA_HO
    ME}/bin${PATHSEP}${PATH}"
    export PATH
    # Import extended environment
    if [ -f extEnv.sh ]; then
    . extEnv.sh
    fi
    Note the missing "." in the PATH. This effectively means that even if
    the "extEnv.sh" script exists in the current directory, then ". extEnv.sh"
    command will only look along the PATH for the "extEnv.sh" script! To me,
    that looks like an error (probably caused by a DOS-programmer used to
    the default behavior in DOS to always look in the current directory
    regardless of the setting PATH), so as part of my localised installation
    procedure, I replace the offending part of setWLSEnv.sh with:
    # Import extended environment
    if [ -f extEnv.sh ]; then
    . ./extEnv.sh
    fi
    which forces the "." command to read the "extEnv.sh" file in the current
    directory, regardless of the setting of the PATH variable. I have
    notified BEA of this, but their responses is that it is per design!
    Regards,
    Jan Bruun Andersen

  • Where is the Application Sharing defaulttrace.trc file located?

    Hi,
    In a help document it says this:
    a.      Set the Application Sharing Server trace file (defaultTrace.trc) to severity info and try to start a new session.
    but where is the Application Sharing file located? or it means the J2EE defaultTrace file?
    Thanx in Advanced!
    Kind Regards,
    Gerardo J

    Hi Gerardo,
    Collaboration uses the logging mechanisms of the J2EE Engine. Therefore it is the defaultTrace.trc  under .../usr/sap/<SID>/Jxx/j2ee/cluster/serverX/log/ .
    Kind regards
    Klaus

  • How to create a Backup of a BPC Application Set?

    Hello,
    I have been browsing the forum for a short while now but didn't find the answer that I needed, I work for a BPC Consutlancy and would like to know how an Application Set can be BACKED UP in the NetWeaver using the Data Warehousing Workbench in NetWeaver BI 7.0
    I have searched the online SAP Help and that does not seem to cover this area, although there was a recall to Server Manager but I don't think you can do BackUp's using the Server Manager.
    I came  across a post last night that mentioned a third party tool by RIG that is used for Migration but there is also a tool available to create Backups of AppSets.
    I have a requirement to set up a BACKUP and TRANSPORT STRATEGY, and would like to know that aside from using SAP TRANSPORTS does the facility exist directly using SAP NW Data Warehousing Workbench to BACKUP an Application set?
    I would appreciate the advice.
    Thanks
    Saqib.

    Hi,
    The way I do a backup of an AppSet is as follows:
    1) Log on to the server
    2) Open the Server Manager (program)
    3) Via AppSet (see top of the window of SAP Server Manager) > click on: Backup AppSet
    4) Indicate which AppSet you want to backup + the location of the backup file you want it in
    5) Wait for the backup to take place
    Cheers!

  • Where to place ORDER BY clause when a query includes UNION

    I have a query that has UNION in it. could you please tell me where to place the ORDER BY clause. Because it's throwing an error if i place the ORDER BY clause at the end

    Because you are using the UNION set operator, you need to either specifically list your columns or use positional notation.
    Without a set operator we can order by the column name without specifically listing it:
    SQL> select * from dual
      2  order by dummy;
    D
    X
    1 row selected.This doesn't work once you introduce a set operator:
    SQL> ed
    Wrote file afiedt.buf
      1  select * from dual union all
      2  select * from dual union all
      3  select * from dual
      4* order by dummy
    SQL> /
    order by dummy
    ERROR at line 4:
    ORA-00904: "DUMMY": invalid identifierSo you need to either use positional notation:
    SQL> ed
    Wrote file afiedt.buf
      1  select * from dual union all
      2  select * from dual union all
      3  select * from dual
      4* order by 1
    SQL> /
    D
    X
    X
    X
    3 rows selected.Or, specifically list or alias the columns you are projecting:
    SQL> ed
    Wrote file afiedt.buf
      1  select dummy from dual union all
      2  select dummy from dual union all
      3  select dummy from dual
      4* order by dummy
    SQL> /
    D
    X
    X
    X
    3 rows selected.
    SQL> ed
    Wrote file afiedt.buf
      1  select dummy as d from dual union all
      2  select dummy as d from dual union all
      3  select dummy as d from dual
      4* order by d
    SQL> /
    D
    X
    X
    X
    3 rows selected.cheers,
    Anthony

  • Error create new Application Set based on ApShell (BPC 5.1)

    On BPC 5.1, I'm trying to create a new Application Set based on Apshell, called "UFG".
    At the step where the OLAP database is created, I receive an error message stating the following.
    Error message:The ApShell Role role referenced by the CubePermission permission does not exist in the UFG database.
    Any help would be greatly appreciated.

    Hi Joost,
    yes it's a fresh 5.1 installation. I'm trying the steps you suggested, however I get the following errors:
    If I try to assign the installation user to the AdminTeam I receive the following error:
    Cast from string "SAP" to type 'integer' not valid.
    If I attempt to assign the installation user directly to the SysAdmin Task Profile and to the AdminMbrAccPrf Member Access Profile, the error message is:
    Error converting data type nvarchar to numeric.

  • In safari. I click on recently bookmarked (macbook air) and get the message There is no application set to open (see rest of error in body)

    There is no application set to open the URL place:folder=BOOKMARKS_MENU&folder=UNFILED_BOOKMARKS&folder=TOOLBAR&sort=12&exc ludeQueries=1&excludeItemIfParentHasAnnotation=livemark%2FfeedURI&maxResults=10& queryType=1.

    Safari doesn't have a "Recently bookmarked" menu, so you must have modified it with an extension or some other third-party software. Refer to the developer of that software for support.

  • MANAGING APPLICATION SET  PROBLEM

    Iam  Trying to manage application set  where  iam using  BPC EXCEL INTERFACE  and  there  iam trying to choose   application set and  application.  at this point  i can see  other applications except  ex:  sales  application  which was created is  not  visible to choose. 
    i have  tried refresh  client side,  and  modified and  updated  application and application  set. 
    still same  problem 
    Please  direct me. 
    Thanks  in advance

    Hi Guru,
    You should give Read & Write access for your Member Access Profile
    Go to ur Member access profile -> Modify -> BPC Access -> Give a Read & Write Access
    Thanks & Regards,
    Ramanathan

  • Where did places go ?

    Frankly I don't like the new Finder window in Lions. Where did places go ? Instead I have Favorites - Shared and Devices. I used Places a lot in the last version of OS and I truly miss it especially since I did not upgrade all my computers. This is very confusing at times. Any chance a 3rd party could give me back my old finder set-up ?

    Laurent Imbault wrote:
    Where did places go ? Instead I have Favorites - Shared and Devices.
    Finder
    "Places has been replaced by Favorites, and Search For is gone entirely."
    See: What's new in Lion: the Finder and files

  • There is no application set to open the URL

    Hello All,
    After updating to Yosemite 10.10.3 I am getting the below message when accessing sites like Youtube and any video site. The message is annoying and don't really know where its coming from. I tried changing safari agent to a previous version but it is still the same.
    please help.
    There is no application set to open the URL msvtdh://https%3A//www.youtube.com/?gl=GB&msauto.
    Search the App Store for an application that can open this document, or choose an existing application on your computer.

        Safari > Preferences > Extensions
        Turn those off and relaunch Safari.
        Turn those on one by one and test.

  • The "always allow" button is grayed out in settings regarding cookies, and I can not find where to change the setting.  (Restrictions are not on.)

    The "always allow" button is grayed out in settings regarding cookies, and I can not find where to change the setting.  (Restrictions are not on.)  Do you know where I go to change the setting to allow me to "always allow" cookies?

    Hi lisaarnett111,
    If you are having issues turning on Always Allow for cookies in Safari on your iPad, you may want to check to make sure that you don't have Private Browsing enabled, as noted in the following article:
    Turn Private Browsing on or off on your iPhone, iPad, or iPod touch - Apple Support
    Regards,
    - Brenden

  • I have a pop up which I can't get rid of which states: "There is no application set to open the URL ximadpzl://save_ximad_token----/"

    I can't get rid of a message which keeps popping up which says:
    There is no application set to open the URL ximadpzl://save_ximad_token/(etc)
    I have no idea to what they are referring and I can find no application which satisfy this requirement. How do I get rid of this message? It won't go away. I have tried turning off the computer, closing Safari, etc.

    All of these suggestions (delete caches, restart, terminal commands, etc) do nothing to actually LOCATE the problem. They are just standard purging processes, and they have all failed to achieve resolution.  And it is NOT Little Snitch either (tried turning that off and nothing changed).  All these forums on this matter have been speculative and useless.
    Ladies and Gents... I have found and isolated the ACTUAL PROBLEM.  It is a Safari Extension that is doing it... specifically "VideoCatcher 5.3.8" which for me was installed with MovieSherlock.  The extension adds the ability to download YouTube movies directly from Safari (by showing a small download button next to any embedded movie). When I remove that extension, all the annoying pop-ups go away.
    MovieSherlock is not the only utility that does this however. There are several YouTube downloaders out there that ALL install an extension that detects YouTube videos on the page. I bet my hat that many (if not all) of you who are experiencing this pop-up issue... have installed one of those downloader utilities.
    So, the solution is simple: disable that extension. If you need to download a YouTube video from a page, either temporarily enable that extension again as needed, or leave the Safari integration disabled and launch the actual utility itself and enter the URL into it for your download.
    I would expect that MovieSherlock and the other YouTube downloading utilities will need to update their extensions (soon?) to deal with Yosemite's new browser script management.
    PROBLEM SOLVED.

  • Where is the language setting in pages 5.0?

    please can someone tell me where is the language setting in page 5.0. this is for the purpose of spell check, for example, change british english to american english, the word "personalized" is red-underlined because the current setting is in british english, how can i fix this? thanks.

    hmm this seems like to resolve the problem only temporarily.
    when i shut down pages and reopens, it jumps back to the british spelling. how can i make this fixed to the american spelling?

Maybe you are looking for