Received: from SOUTH-STATION-ANNEX.MIT.EDU by po7.MIT.EDU (5.61/4.7) id AA09828; Fri, 8 Dec 95 18:01:42 EST
Received: from liquor.cabi.net by MIT.EDU with SMTP
	id AA28841; Fri, 8 Dec 95 18:00:35 EST
Received: (from listadm@localhost) by liquor.cabi.net (8.6.12/8.6.12) id RAA02485; Fri, 8 Dec 1995 17:58:38 -0500
Resent-Date: Fri, 8 Dec 1995 17:58:38 -0500
From: Thomas Boutell <boutell@boutell.com>
Message-Id: <199512082302.AB02929@boutell.com>
Subject: My Java Problems Explained (?)
To: java-linux@java.blackdown.org
Date: Fri, 8 Dec 1995 15:02:42 -0800 (PST)
X-Mailer: ELM [version 2.4 PL24]
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Length:        605
Resent-Message-Id: <"ZD7O_.0.Qc.5CCom"@liquor>
Resent-From: java-linux@java.blackdown.org
X-Mailing-List: <java-linux@java.blackdown.org> archive/latest/680
X-Loop: java-linux@java.blackdown.org
Precedence: list
Resent-Sender: java-linux-request@java.blackdown.org

It turns out that the getcwd() function call always returns
null for ELF binaries on my system, unless the current
working directory is root.

I don't know why. If anybody does, I'd sure like to
hear from you.

This explains why appletviewer wants to find things
in crazy directories, and points out a Java bug: java doesn't
check the return code of getcwd. It is presumably
ignoring the null return and looking at the undefined
garbage in the buffer argument to getcwd() to determine
the current directory.

I don't know for sure that this explains my javac problems,
but I strongly suspect it does.

-T

