Java ignores the system-wide deployment.properties file

XMLWordPrintable

    • Type: Bug
    • Resolution: Not an Issue
    • Priority: P4
    • None
    • Affects Version/s: 6
    • Component/s: deploy
    • x86
    • windows_xp

      FULL PRODUCT VERSION :
      Microsoft Windows XP [Version 5.1.2600]
      (C) Copyright 1985-2001 Microsoft Corp.

      C:\Documents and Settings\markw>ver

      Microsoft Windows XP [Version 5.1.2600]
      java -version
      java version "1.6.0_01"
      Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
      Java HotSpot(TM) Client VM (build 1.6.0_01-b06, mixed mode, sharing)

      C:\Documents and Settings\markw>

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP [Version 5.1.2600]

      A DESCRIPTION OF THE PROBLEM :
      I have placed a deployment.properties file in c:\windows\sun\java\deployment. According to Sun's own documentation this should override local deployment.properties files.

      However, despite my ensuring that the system-wide deployment.properties file is readable by all, Java ignores my settings (the main change of which is to move the user.cache folder from somewhere user specific to 'C:\Java Files')

      The change in the system-wide deployment.properties file is as below:

      deployment.user.cachedir=C\:\\Java Files

      When I then log in as a different user (who has not previously downloaded/installed the application you used to download and cache some jar files) and try to start my java app, it downloads the app to the cache dir specified in:

      C:\Documents and Settings\<username>\Application Data\Sun\Java\Deployment

      and ignores the deployment.properties in C:\WINDOWS\Sun\Java\Deployment

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Install the Sun JRE (if not already installed)
      2. Go to Control Panel->Java-?Temporary Files Settings and use the Control Panel to create a new 'Java Files' folder on the root of the C: drive and set it as the place to store Temporary Files.

      3. Using Windows Explorer, set the security on the 'C:\Java Files' folder to be 'Full Control' for everyone (eliminates the possibility that the issue is a file permission one)

      4. Go to C:\Documents and Settings\<username>\Application Data\Sun\Java\Deployment and copy the deployment.properties file to C:\WINDOWS\Sun\Java\Deployment

      5. Check the file permissions to ensure that all users can read/execute the file.

      6. Load any Java Web start app that downloads and caches JAR files locally

      7. Check that the files have downloaded to C:\Java Files (they should have)

      8. Now log out of Windows, and log back in using a different user account (that has not previously downloaded/installed the app you used in step 6)

      9. Repeat step 6.

      Instead of seeing that the required files are already present in C:\Java Files, Java will download and install a fresh copy of the files into C:\Documents and Settings\<username>\Application Data\Sun\Java\Deployment

      As such it has directly ignored the deployment.user.cachedir setting that I have set in the (supposedly) system-wide deployment.properties file.





      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      When logging in with a different user, I was expecting the system-wide deployment.properties file to be read, and for Java to try and cache files in C:\Java Files. Finding those files already there, it would not have needed to download them.


      ACTUAL -
      Java ignored the system-wide deployment.properties file and cached a second copy of the same files in C:\Documents and Settings\<username>\Application Data\Sun\Java\Deployment



      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      I have not yet found a workaround for this issue. This will cause a problem in the event of different users logging onto a machine and wanting to run the same app, as a separate copy must be distributed to each user.

            Assignee:
            Unassigned
            Reporter:
            Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: