This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 171154 - Userdir location changed from %APPDATA% to %USERPROFILE%
Summary: Userdir location changed from %APPDATA% to %USERPROFILE%
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Launchers&CLI (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P2 blocker with 1 vote (vote)
Assignee: t_h
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-31 10:46 UTC by andreagualano
Modified: 2009-09-01 06:02 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description andreagualano 2009-08-31 10:46:36 UTC
The new Windows launcher included in Platform 6.7 changed the default location of the user directory for a platform
application from %APPDATA% to %USERPROFILE%.

In versions up to 6.5.1, the variable ${HOME} in default_userdir was expanded to the content of the environment variable
%APPDATA% which is, supposedly, the place where applications should put their data.

In versions 6.7 and later, ${HOME} is expanded to the content of the environment variable %USERPROFILE% which points to
a different directory.

This change negatively affects users deploying platform-based applications on Windows and wishing to update their
platform to a later version.

Of course, this issue is only relevant when executing a platform application on a Windows system.

Also, the IDE is not affected since it already installed its userdir under %USERPROFILE%.

The ${HOME} expansion should be reverted to the old behavior; if this is deemed unfeasible, an option should be provided
to keep compatibility with the old behavior, for instance a ${APPDATA} variable.
Comment 1 andreagualano 2009-08-31 10:58:18 UTC
To reproduce the issue, I did the following in Netbeans IDE 6.5:

- create a new platform using the platform-6.5.1 and harness-6.5.1 zip files; use "Harness supplied with platform"; call
the platform "NetBeans Platform 6.5.1"
- create a new "NetBeans Platform Application" project, using the platform "NetBeans Platform 6.5.1"
- run "Build ZIP Distribution"
- execute the application on Windows
- expected result: the userdir is "C:\Documents and Settings\Username\Application Data\.app651"

- create a new platform using the platform-6.8m1 and harness-6.8m1 zip files; use "Harness supplied with platform"; call
the platform "NetBeans Platform 6.8m1"
- create a new "NetBeans Platform Application" project, using the platform "NetBeans Platform 6.8m1"
- run "Build ZIP Distribution"
- execute the application on Windows
- expected result: the userdir is "C:\Documents and Settings\Username\.app68m1"

The directory locations may change depending on OS version, localization and user preferences.

Platforms 6.7 and 6.7.1 have the same behavior of version 6.8 M1, but they are also affected by issue 168935.
Comment 2 t_h 2009-08-31 13:43:57 UTC
The change was not intentional. Fixed in core-main #b8bdbc36c8c5
Comment 3 Quality Engineering 2009-09-01 06:02:48 UTC
Integrated into 'main-golden', will be available in build *200909010201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/b8bdbc36c8c5
User: Tomas Holy <t_h@netbeans.org>
Log: #171154: Userdir location changed from $APPDATA to $USERPROFILE