在 Ubuntu 机器上哪里可以配置 Ant 1.8 的环境变量?
尝试使用 Ant 构建时,出现错误,指出 Ant 找不到编译器,并且 JAVA_HOME 设置为 /usr/lib/jvm/java-6-open-jdk/jre。回声检查显示 JAVA_HOME 设置为 /usr/local/lib/jdk1.6.0_22 (顺便说一句,Ant 应该认为它是这样的)。所以环境变量大体上是正确的,但Ant显然有自己的想法。是否有一个 .conf 文件可供我编辑,以便让这个烦人的构建工具变得有意义?
任何帮助表示赞赏。
When trying to build with Ant, I'm getting an error that Ant can't find a compiler, and that JAVA_HOME is set to /usr/lib/jvm/java-6-open-jdk/jre. An echo check reveals that JAVA_HOME is set to /usr/local/lib/jdk1.6.0_22 (where Ant OUGHT to think it is, btw). So the environment variables are generally right, but Ant apparently has its own ideas. Is there a .conf file I can edit to knock some sense into this annoying build tool?
Any help appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您通常将环境变量放入 shell 初始化文件中;例如
~/.bash-profile
或~/.bashrc
,但您也可以在系统范围的文件中设置...或在临时< /em> 包装脚本。You typically put environment variables into your shell initialization files; e.g.
~/.bash-profile
or~/.bashrc
, but you can also set then in system-wide files ... or in an ad hoc wrapper script.