我在 OS X 上,一直在使用 Oracle 的 Java 1.8。为了安装,我确实必须从 Apple 安装旧的 Java 6,但至少某些命令mfp
似乎也会失败,除非我将环境变量更改为指向 Java 6 安装。mfp
mfp build
JAVA_HOME
这是我看到的输出:
$ mfp build
[Error:
BUILD FAILED
/Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/generator-worklight-server/lib/build.xml:133: The following error occurred while executing this line:
/Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/generator-worklight-server/lib/build.xml:155: Class not found: javac1.8
Total time: 1 second]
Error: Sorry an error has occurred. Please check the stack above for details.
$ JAVA_HOME=/Library/Java/Home mfp build
All apps and adapters were successfully built.
$
我覆盖的最佳方式是JAVA_HOME
什么mfp
?我应该编辑/Applications/IBM/MobileFirst-CLI/mfp
吗?
(仅供参考,“找不到 javac1.8 类”错误是 Ant < 1.9 的一个已知问题,我假设它与 MobileFirst-CLI 捆绑在一起,因为我的系统上安装了 Java 1.8 的 Ant 1.9.4。)