You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "John H. Embretsen (JIRA)" <de...@db.apache.org> on 2005/10/12 23:51:07 UTC

[jira] Created: (DERBY-620) BUILDING.txt section 3.2(1): Instructions for finding user home directory are not reliable

BUILDING.txt section 3.2(1): Instructions for finding user home directory are not reliable
------------------------------------------------------------------------------------------

         Key: DERBY-620
         URL: http://issues.apache.org/jira/browse/DERBY-620
     Project: Derby
        Type: Bug
  Components: Documentation  
    Versions: 10.2.0.0, 10.1.2.0    
 Environment: Windows/Unix/Linux, JDKs 1.3-1.5
    Reporter: John H. Embretsen
    Priority: Minor


BUILDING.txt, section 3.2 states:

------------------------------------------------------------------------------------

3.2   Create property file

You will need to create a property file to specify
your environment and some of your options. Do the following
to specify your environment and options:

(1) Find out user home directory on your system. You can find  
    user home directory by doing echo on variable %HOME% 
    on windows and $home or $HOME on unix.

------------------------------------------------------------------------------------

In some cases, %HOME% (on WIndows) or $HOME  ($home) (on Unix) does not correspond to the directory where ant looks for "ant.properties". 

I recently tried to build Derby on Windows XP, and accidentally put ant.properties in the wrong directory, causing ant to say that java.lang could not be found. On Windows XP and 2000 (and most likely all older Windows platforms as well) "out-of-the-box", there is no environment variable called %HOME%. Creating this environment variable manually does not make any difference.

On Unix systems, the $HOME environment variable does not necessarily always correspond to ant's (i.e. Java's) interpretation of  "user.home". For example, if a user changes this variable manually from "/home/username" to "/home/username/myHome", $HOME refers to the latter, but ant will continue to look for ant.properties in the "/home/username" directory.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (DERBY-620) BUILDING.txt section 3.2(1): Instructions for finding user home directory are not reliable

Posted by "John H. Embretsen (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-620?page=all ]

John H. Embretsen reassigned DERBY-620:
---------------------------------------

    Assign To: John H. Embretsen

> BUILDING.txt section 3.2(1): Instructions for finding user home directory are not reliable
> ------------------------------------------------------------------------------------------
>
>          Key: DERBY-620
>          URL: http://issues.apache.org/jira/browse/DERBY-620
>      Project: Derby
>         Type: Bug
>   Components: Documentation
>     Versions: 10.2.0.0, 10.1.2.0
>  Environment: Windows/Unix/Linux, JDKs 1.3-1.5
>     Reporter: John H. Embretsen
>     Assignee: John H. Embretsen
>     Priority: Minor

>
> BUILDING.txt, section 3.2 states:
> ------------------------------------------------------------------------------------
> 3.2   Create property file
> You will need to create a property file to specify
> your environment and some of your options. Do the following
> to specify your environment and options:
> (1) Find out user home directory on your system. You can find  
>     user home directory by doing echo on variable %HOME% 
>     on windows and $home or $HOME on unix.
> ------------------------------------------------------------------------------------
> In some cases, %HOME% (on WIndows) or $HOME  ($home) (on Unix) does not correspond to the directory where ant looks for "ant.properties". 
> I recently tried to build Derby on Windows XP, and accidentally put ant.properties in the wrong directory, causing ant to say that java.lang could not be found. On Windows XP and 2000 (and most likely all older Windows platforms as well) "out-of-the-box", there is no environment variable called %HOME%. Creating this environment variable manually does not make any difference.
> On Unix systems, the $HOME environment variable does not necessarily always correspond to ant's (i.e. Java's) interpretation of  "user.home". For example, if a user changes this variable manually from "/home/username" to "/home/username/myHome", $HOME refers to the latter, but ant will continue to look for ant.properties in the "/home/username" directory.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-620) BUILDING.txt section 3.2(1): Instructions for finding user home directory are not reliable

Posted by "John H. Embretsen (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-620?page=all ]

John H. Embretsen updated DERBY-620:
------------------------------------

    Fix Version: 10.2.0.0

> BUILDING.txt section 3.2(1): Instructions for finding user home directory are not reliable
> ------------------------------------------------------------------------------------------
>
>          Key: DERBY-620
>          URL: http://issues.apache.org/jira/browse/DERBY-620
>      Project: Derby
>         Type: Bug
>   Components: Documentation
>     Versions: 10.2.0.0, 10.1.2.0
>  Environment: Windows/Unix/Linux, JDKs 1.3-1.5
>     Reporter: John H. Embretsen
>     Assignee: John H. Embretsen
>     Priority: Minor
>      Fix For: 10.2.0.0
>  Attachments: DERBY-620.diff
>
> BUILDING.txt, section 3.2 states:
> ------------------------------------------------------------------------------------
> 3.2   Create property file
> You will need to create a property file to specify
> your environment and some of your options. Do the following
> to specify your environment and options:
> (1) Find out user home directory on your system. You can find  
>     user home directory by doing echo on variable %HOME% 
>     on windows and $home or $HOME on unix.
> ------------------------------------------------------------------------------------
> In some cases, %HOME% (on WIndows) or $HOME  ($home) (on Unix) does not correspond to the directory where ant looks for "ant.properties". 
> I recently tried to build Derby on Windows XP, and accidentally put ant.properties in the wrong directory, causing ant to say that java.lang could not be found. On Windows XP and 2000 (and most likely all older Windows platforms as well) "out-of-the-box", there is no environment variable called %HOME%. Creating this environment variable manually does not make any difference.
> On Unix systems, the $HOME environment variable does not necessarily always correspond to ant's (i.e. Java's) interpretation of  "user.home". For example, if a user changes this variable manually from "/home/username" to "/home/username/myHome", $HOME refers to the latter, but ant will continue to look for ant.properties in the "/home/username" directory.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (DERBY-620) BUILDING.txt section 3.2(1): Instructions for finding user home directory are not reliable

Posted by "John H. Embretsen (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-620?page=all ]
     
John H. Embretsen closed DERBY-620:
-----------------------------------


> BUILDING.txt section 3.2(1): Instructions for finding user home directory are not reliable
> ------------------------------------------------------------------------------------------
>
>          Key: DERBY-620
>          URL: http://issues.apache.org/jira/browse/DERBY-620
>      Project: Derby
>         Type: Bug
>   Components: Documentation
>     Versions: 10.2.0.0, 10.1.2.0
>  Environment: Windows/Unix/Linux, JDKs 1.3-1.5
>     Reporter: John H. Embretsen
>     Assignee: John H. Embretsen
>     Priority: Minor
>      Fix For: 10.2.0.0, 10.1.2.0, 10.1.1.2
>  Attachments: DERBY-620.diff
>
> BUILDING.txt, section 3.2 states:
> ------------------------------------------------------------------------------------
> 3.2   Create property file
> You will need to create a property file to specify
> your environment and some of your options. Do the following
> to specify your environment and options:
> (1) Find out user home directory on your system. You can find  
>     user home directory by doing echo on variable %HOME% 
>     on windows and $home or $HOME on unix.
> ------------------------------------------------------------------------------------
> In some cases, %HOME% (on WIndows) or $HOME  ($home) (on Unix) does not correspond to the directory where ant looks for "ant.properties". 
> I recently tried to build Derby on Windows XP, and accidentally put ant.properties in the wrong directory, causing ant to say that java.lang could not be found. On Windows XP and 2000 (and most likely all older Windows platforms as well) "out-of-the-box", there is no environment variable called %HOME%. Creating this environment variable manually does not make any difference.
> On Unix systems, the $HOME environment variable does not necessarily always correspond to ant's (i.e. Java's) interpretation of  "user.home". For example, if a user changes this variable manually from "/home/username" to "/home/username/myHome", $HOME refers to the latter, but ant will continue to look for ant.properties in the "/home/username" directory.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-620) BUILDING.txt section 3.2(1): Instructions for finding user home directory are not reliable

Posted by "John H. Embretsen (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-620?page=comments#action_12331931 ] 

John H. Embretsen commented on DERBY-620:
-----------------------------------------

Ant looks for the "ant.properties" file in the directory specified by Java's "user.home" system property. Since this does not necessarily corespond with %HOME% or $HOME, BUILDING.txt should be corrected.

On Windows 2000 and XP, the "user.home" directory in most cases corresponds to the environment variable %USERPROFILE%, which is a concatenation of the variables %HOMEDRIVE% and %HOMEPATH%, e.g. "C:\Documents and Settings\User".
See http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds_shelloverview.mspx.

On Unix/Linux systems, the "user.home" directory in most cases correspond to the $HOME environment variable (e.g. "/home/username"), but this is not always true, as described above.

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4787931 is a bug report that describes some issues and workarounds related to the way a variety of  JVMs determines "user.home". On Windows, Java actually tries to determine the user home directory by looking in the registry for the location of the user's desktop folder, and uses that folder's parent folder as "user.home". On Unix/Linux systems, Java determines the user's home directory by looking at the user's entry in the password file, e.g. /etc/passwd.

I suggest changing BUILDING.txt, section 3.2 (1) to something like this:

----------------------------------------------------------------------------------------

(1) Determine the directory on your system that corresponds to
    the "user.home" system property of the jvm referred to by
    JAVA_HOME. This directory will be referred to as the 
    ${user.home} directory in the rest of this document. 
    In order to correctly determine the value of ${user.home}, 
    do either of the following:

	a) Run ant diagnostics and look for "user.home" in the
           list of System properties:
		
	   ant -diagnostics

	b) Write and run a small java program that prints the
           value of the "user.home" system property, e.g. by
           including the following line in the program:

           System.out.println(System.getProperty("user.home"));
           
    On most Unix systems, ${user.home} is equivalent to the
    value of the environment variable $HOME or $home.
    On newer Windows systems, ${user.home} is often equivalent
    to the environment variable %USERPROFILE%.

----------------------------------------------------------------------------------------

Does anyone have any comments to this suggestion?


> BUILDING.txt section 3.2(1): Instructions for finding user home directory are not reliable
> ------------------------------------------------------------------------------------------
>
>          Key: DERBY-620
>          URL: http://issues.apache.org/jira/browse/DERBY-620
>      Project: Derby
>         Type: Bug
>   Components: Documentation
>     Versions: 10.2.0.0, 10.1.2.0
>  Environment: Windows/Unix/Linux, JDKs 1.3-1.5
>     Reporter: John H. Embretsen
>     Priority: Minor

>
> BUILDING.txt, section 3.2 states:
> ------------------------------------------------------------------------------------
> 3.2   Create property file
> You will need to create a property file to specify
> your environment and some of your options. Do the following
> to specify your environment and options:
> (1) Find out user home directory on your system. You can find  
>     user home directory by doing echo on variable %HOME% 
>     on windows and $home or $HOME on unix.
> ------------------------------------------------------------------------------------
> In some cases, %HOME% (on WIndows) or $HOME  ($home) (on Unix) does not correspond to the directory where ant looks for "ant.properties". 
> I recently tried to build Derby on Windows XP, and accidentally put ant.properties in the wrong directory, causing ant to say that java.lang could not be found. On Windows XP and 2000 (and most likely all older Windows platforms as well) "out-of-the-box", there is no environment variable called %HOME%. Creating this environment variable manually does not make any difference.
> On Unix systems, the $HOME environment variable does not necessarily always correspond to ant's (i.e. Java's) interpretation of  "user.home". For example, if a user changes this variable manually from "/home/username" to "/home/username/myHome", $HOME refers to the latter, but ant will continue to look for ant.properties in the "/home/username" directory.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-620) BUILDING.txt section 3.2(1): Instructions for finding user home directory are not reliable

Posted by "John H. Embretsen (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-620?page=all ]

John H. Embretsen updated DERBY-620:
------------------------------------

    Attachment: DERBY-620.diff

I've attached a patch for this issue. The wording in the patch is roughly the same as presented in my previous comment. The patch is ready for review and (if accepted) commit.

> BUILDING.txt section 3.2(1): Instructions for finding user home directory are not reliable
> ------------------------------------------------------------------------------------------
>
>          Key: DERBY-620
>          URL: http://issues.apache.org/jira/browse/DERBY-620
>      Project: Derby
>         Type: Bug
>   Components: Documentation
>     Versions: 10.2.0.0, 10.1.2.0
>  Environment: Windows/Unix/Linux, JDKs 1.3-1.5
>     Reporter: John H. Embretsen
>     Assignee: John H. Embretsen
>     Priority: Minor
>  Attachments: DERBY-620.diff
>
> BUILDING.txt, section 3.2 states:
> ------------------------------------------------------------------------------------
> 3.2   Create property file
> You will need to create a property file to specify
> your environment and some of your options. Do the following
> to specify your environment and options:
> (1) Find out user home directory on your system. You can find  
>     user home directory by doing echo on variable %HOME% 
>     on windows and $home or $HOME on unix.
> ------------------------------------------------------------------------------------
> In some cases, %HOME% (on WIndows) or $HOME  ($home) (on Unix) does not correspond to the directory where ant looks for "ant.properties". 
> I recently tried to build Derby on Windows XP, and accidentally put ant.properties in the wrong directory, causing ant to say that java.lang could not be found. On Windows XP and 2000 (and most likely all older Windows platforms as well) "out-of-the-box", there is no environment variable called %HOME%. Creating this environment variable manually does not make any difference.
> On Unix systems, the $HOME environment variable does not necessarily always correspond to ant's (i.e. Java's) interpretation of  "user.home". For example, if a user changes this variable manually from "/home/username" to "/home/username/myHome", $HOME refers to the latter, but ant will continue to look for ant.properties in the "/home/username" directory.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-620) BUILDING.txt section 3.2(1): Instructions for finding user home directory are not reliable

Posted by "John H. Embretsen (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-620?page=all ]

John H. Embretsen updated DERBY-620:
------------------------------------

    Fix Version: 10.1.2.0

Kathey Marsden wrote on derby-dev earlier today:
>  -  Are there any other fixes that should be included in the 10.1.2 ?

In my opinion, this fix may be included in the 10.1.2 release as well as the trunk, if a committer has time to review and commit it in time.

> BUILDING.txt section 3.2(1): Instructions for finding user home directory are not reliable
> ------------------------------------------------------------------------------------------
>
>          Key: DERBY-620
>          URL: http://issues.apache.org/jira/browse/DERBY-620
>      Project: Derby
>         Type: Bug
>   Components: Documentation
>     Versions: 10.2.0.0, 10.1.2.0
>  Environment: Windows/Unix/Linux, JDKs 1.3-1.5
>     Reporter: John H. Embretsen
>     Assignee: John H. Embretsen
>     Priority: Minor
>      Fix For: 10.2.0.0, 10.1.2.0
>  Attachments: DERBY-620.diff
>
> BUILDING.txt, section 3.2 states:
> ------------------------------------------------------------------------------------
> 3.2   Create property file
> You will need to create a property file to specify
> your environment and some of your options. Do the following
> to specify your environment and options:
> (1) Find out user home directory on your system. You can find  
>     user home directory by doing echo on variable %HOME% 
>     on windows and $home or $HOME on unix.
> ------------------------------------------------------------------------------------
> In some cases, %HOME% (on WIndows) or $HOME  ($home) (on Unix) does not correspond to the directory where ant looks for "ant.properties". 
> I recently tried to build Derby on Windows XP, and accidentally put ant.properties in the wrong directory, causing ant to say that java.lang could not be found. On Windows XP and 2000 (and most likely all older Windows platforms as well) "out-of-the-box", there is no environment variable called %HOME%. Creating this environment variable manually does not make any difference.
> On Unix systems, the $HOME environment variable does not necessarily always correspond to ant's (i.e. Java's) interpretation of  "user.home". For example, if a user changes this variable manually from "/home/username" to "/home/username/myHome", $HOME refers to the latter, but ant will continue to look for ant.properties in the "/home/username" directory.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (DERBY-620) BUILDING.txt section 3.2(1): Instructions for finding user home directory are not reliable

Posted by "Andrew McIntyre (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-620?page=all ]
     
Andrew McIntyre resolved DERBY-620:
-----------------------------------

    Fix Version: 10.1.1.2
     Resolution: Fixed

Committed to trunk with revision 327242 and 10.1 with revision 327248.

> BUILDING.txt section 3.2(1): Instructions for finding user home directory are not reliable
> ------------------------------------------------------------------------------------------
>
>          Key: DERBY-620
>          URL: http://issues.apache.org/jira/browse/DERBY-620
>      Project: Derby
>         Type: Bug
>   Components: Documentation
>     Versions: 10.2.0.0, 10.1.2.0
>  Environment: Windows/Unix/Linux, JDKs 1.3-1.5
>     Reporter: John H. Embretsen
>     Assignee: John H. Embretsen
>     Priority: Minor
>      Fix For: 10.2.0.0, 10.1.2.0, 10.1.1.2
>  Attachments: DERBY-620.diff
>
> BUILDING.txt, section 3.2 states:
> ------------------------------------------------------------------------------------
> 3.2   Create property file
> You will need to create a property file to specify
> your environment and some of your options. Do the following
> to specify your environment and options:
> (1) Find out user home directory on your system. You can find  
>     user home directory by doing echo on variable %HOME% 
>     on windows and $home or $HOME on unix.
> ------------------------------------------------------------------------------------
> In some cases, %HOME% (on WIndows) or $HOME  ($home) (on Unix) does not correspond to the directory where ant looks for "ant.properties". 
> I recently tried to build Derby on Windows XP, and accidentally put ant.properties in the wrong directory, causing ant to say that java.lang could not be found. On Windows XP and 2000 (and most likely all older Windows platforms as well) "out-of-the-box", there is no environment variable called %HOME%. Creating this environment variable manually does not make any difference.
> On Unix systems, the $HOME environment variable does not necessarily always correspond to ant's (i.e. Java's) interpretation of  "user.home". For example, if a user changes this variable manually from "/home/username" to "/home/username/myHome", $HOME refers to the latter, but ant will continue to look for ant.properties in the "/home/username" directory.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira