这是我第一次使用 mac 操作系统(OS X 10.5.8)进行真正的开发。我从工作中得到了一台 macbookpro,我仍在设置正确的开发环境。我选择创建 /etc/launchd.conf它对于我的大多数库(JAVA_HOME、JRE_HOME)都运行良好
我现在需要添加 CATALINA_OPTS=-Duser.timezone=Asia/china 但 mac 中 launchd.conf 的语法似乎没有等号“=”。我看到的都是空格,所以我有点当我需要添加诸如属性文件或 tomcat 之类的内容时丢失了。
我不想破坏任何东西,并且我想确保我有正确的方法。
可能是吗?
CATALINA_OPTS -Duser.timezone=亚洲/中国
感谢您的阅读
This is my first real development with the mac os(OS X 10.5.8).I got a macbookpro from work and i'm still setting up the right development environment.I've opted for the creation of /etc/launchd.conf and it's working fine for most of my librairies (JAVA_HOME, JRE_HOME)
i now need to add CATALINA_OPTS=-Duser.timezone=Asia/china but the syntax in mac for launchd.conf doesn't appear to have equal signe "=".all i've seen are spaces ,so i'm a bit lost when i need to add things like properties file or the one for tomcat.
i don't want to break anything and i'll like to be sure that i have the correct way of doing it.
Could it be ?
CATALINA_OPTS -Duser.timezone=Asia/china
thanks for reading
发布评论
评论(1)
“=”符号特定于特定应用程序的语法。例如 bash 使用“key=value”,而 launchctl 使用类似于 csh 的语法,“setenv key value”。
launchd.conf (
$HOME/.launchd.conf
和/etc/launchd.conf
)是 < a href="http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man1/launchctl.1.html#//apple_ref/doc/man/1/launchctl" rel="nofollow noreferrer">launchctl 命令。因此,在
CATALINA_OPTS=-Duser.timezone=Asia/china
的情况下,键(通常称为环境变量、env var,或只是变量)是CATALINA_OPTS
,值是是-Duser.timezone=Asia/china
。我知道这一点有几个原因。
-D
表示 Java 的 VM。user.timezone
,值为Asia/china
。顺便说一句,我不确定
Asia/china
是一个有效的时区。至少不是根据 我找到的列表。但也许它会起作用,因为中国有一个单一的时区。The "=" sign is specific to a particular application's syntax. For example bash uses "key=value", whereas, launchctl uses a syntax similar to csh, "setenv key value".
launchd.conf (
$HOME/.launchd.conf
and/etc/launchd.conf
) is a script of launchctl commands.So in the case
CATALINA_OPTS=-Duser.timezone=Asia/china
, the key (often called the environment variable, env var, or just variable) isCATALINA_OPTS
and the value is-Duser.timezone=Asia/china
.I know this for a few reasons.
-D
denotes the definition of a system property for Java's VM.user.timezone
and the value isAsia/china
.An aside, I'm not sure
Asia/china
is a valid timezone. At least not according to the list i found. But maybe it'll work since China has a single timezone.