按照Alien Factory 的 afBedNap的说明使用 Fantom 的 afBedSheet 框架构建 Web 应用程序,我在第 3 步(运行应用程序)结束时收到此错误:
$ fan myAfBedNap
[09:37:54 03-Aug-14] [info] [afBedSheet] Starting BedSheet Proxy on port 8069
[09:37:54 03-Aug-14] [info] [web] WispService started on port 8069
[09:37:54 03-Aug-14] [info] [afBedSheet] Cached the timestamps of 57 pods
[09:37:54 03-Aug-14] [info] [afBedSheet] Launching BedSheet WebApp 'myAfBedNap' on port 8070
ERROR: cannot init Sys.homeDir
java.lang.RuntimeException: Invalid fan.home dir: "/Users/coder/apps/fantom-1.0.66"
at fan.sys.Sys.sysPropToDir(Sys.java:349)
at fan.sys.Sys.initHomeDir(Sys.java:304)
at fan.sys.Sys.<clinit>(Sys.java:41)
at fanx.tools.Fan.execute(Fan.java:28)
at fanx.tools.Fan.run(Fan.java:298)
at fanx.tools.Fan.main(Fan.java:336)
java.lang.ExceptionInInitializerError
at fanx.tools.Fan.execute(Fan.java:28)
at fanx.tools.Fan.run(Fan.java:298)
at fanx.tools.Fan.main(Fan.java:336)
Caused by: java.lang.RuntimeException: Cannot boot fan: java.lang.RuntimeException: Invalid fan.home dir: "/Users/coder/apps/fantom-1.0.66"
at fan.sys.Sys.initFail(Sys.java:606)
at fan.sys.Sys.initHomeDir(Sys.java:308)
at fan.sys.Sys.<clinit>(Sys.java:41)
... 3 more
该路径/Users/coder/apps/fantom-1.0.66
存在并且是我安装 Fantom 的位置。我跑了export FAN_HOME="/Users/coder/apps/fantom-1.0.66"
,但这没有任何区别。
如果我运行$FAN_HOME/bin/fan -version
这就是我得到的:
Fantom Launcher
Copyright (c) 2006-2013, Brian Frank and Andy Frank
Licensed under the Academic Free License version 3.0
Java Runtime:
java.version: 1.8.0_05
java.vm.name: Java HotSpot(TM) 64-Bit Server VM
java.vm.vendor: Oracle Corporation
java.vm.version: 25.5-b02
java.home: /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/jre
fan.platform: macosx-x86_64
fan.version: 1.0.66
fan.env: sys::BootEnv
fan.home: /Users/coder/apps/fantom-1.0.66
我在Fantom 论坛中找不到解决方案。请问有什么想法吗?