注意:我刚发现项目属性窗格不会以这种方式正确加载。还有更多研究需要去了解如何启动...
这可能是 Juno(4.2)版本的 Eclipse(以及 3.x 前身)中的一个错误...... 这篇 stackoverflow 文章 暗示了两件事
让 Eclipse 知道您的 shell 环境变量的一种方法是从 bash shell / 命令行启动 Eclipse(它将从 shell 继承环境)。
另一种方法似乎意味着在 Kepler(4.3)之前的 Eclipse 中存在错误:如果您升级到 Kepler(4.3),问题将对 OP 不再存在。
这对于在 OS X 上使其工作也很有用,this article,最后,how to launch an app from command line
以下是使用QuickSilver作为启动器的OS X逐步说明。我在我的~/Applications/文件夹中创建了一个.sh文件,现在我从QuickSilver运行它(我认为使用Spotlight也可以实现相同的基本过程)。
- 我创建了eclipse.sh,并使用以下命令调用.app“文件”。对于我来说,这是ADT Bundle的一部分,但只需将下面的路径替换为.app文件的路径(即您从应用程序文件夹或Eclipse安装所在位置运行的图标)
BEGIN EDIT
My originally-posted line
/Users/mike/DevInstalls/adt-bundle-mac-x86_64-20140702/eclipse/Eclipse.app/Contents/MacOS/eclipse
works until I try to open the properties panels in Project Properties. The panels won't open, so I tried the following change to fix it
/Users/mike/DevInstalls/adt-bundle-mac-x86_64-20140702/eclipse/Eclipse.app/Contents/MacOS/eclipse &
but this won't work when launched from Quicksilver.
Either way, launching gracefully via QuickSilver has nothing to do with the OP, so I'm going to stop pulling my hair out over it. :-/
编辑结束
Then, back at the command line run "sudo chmod 755 ./eclipse.sh" to set the permission properly so it can be executed.
2.a. 接下来,我需要配置 QuickSilver 来查找这个 shell 命令。为此,我按下 QuickSilver 快捷键,点击右上角的三角形打开其首选项,选择 Catalog...,然后在左侧点击 Custom,在右侧点击加号添加一个条目,然后选择 File & Folder Scanner,再选择 shell 脚本所在的文件夹,然后点击右下角的小 "i" 按钮,在展开到右侧的窗口中,在 "Include Contents" 下点击 "Folder Contents"。
2.b. 或者,在 Quicksilver 首选项中,您可以启用 "Catalog" 下的 "Bash Command History"。我选择不使用这种方法,以免我的 QuickSilver 历史记录被命令历史记录噪音淹没。
declare -p ANDROID_NDK
命令,看bash是否会响应declare -x ANDROID_NDK=...
(其中-x
表示已导出)。 - musiphil