2

我正在尝试在 Mac OS X 10.6 上设置一些全局环境变量,以便为应用程序和 shell 会话设置它们。

到目前为止,我已经尝试了以下方法:

这些都不起作用!我发现最令人惊讶的是 /etc/launchd.conf 因为它似乎对所有尝试过它的人都有效。有什么合乎逻辑的理由为什么它不适合我吗?

4

1 回答 1

0

this is actually a similar problem to what I was having installing Derby. The way I solved it was by opening TextEdit. Select File > Open at this point press Shift + Command + . , this will allow you to view all the documents. Head to the user directory and search for a file called ".profile" . Open it and add the export VARIABLE= Value line for example:

export DERBY_HOME=/opt/local/share/java/derby/

Save the document and restart your terminal to see if the changes went into affect.

于 2013-02-28T10:50:57.033 回答