的编译指令scalafx http://code.google.com/p/scalafx/说要做:
export JAVAFX_HOME=/Path/To/javafx-sdk2.1.0-beta
sbt clean compile package make-pom package-src
然而,随着 JavaFX 的新包装成为 Java JDK 本身的一部分(即 OS X 的 7u7),似乎不再有这样的“javafx-sdkx.x.x”文件夹。 Oracle 文档说 JavaFX JDK 与主 Java JDK 放在一起(在同一文件夹中)。
So I do:
$ export JAVAFX_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk
$ sbt clean
[warn] Using project/plugins/ (/Users/asko/Sources/scalafx/project/plugins) for plugin configuration is deprecated.
[warn] Put .sbt plugin definitions directly in project/,
[warn] .scala plugin definitions in project/project/,
[warn] and remove the project/plugins/ directory.
[info] Loading project definition from /Users/asko/Sources/scalafx/project/plugins/project
[info] Loading project definition from /Users/asko/Sources/scalafx/project/plugins
[error] java.lang.NullPointerException
[error] Use 'last' for the full log.
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?
我是否做错了什么,或者 scalafx 尚未与最新的 Java 版本(7u7、JavaFX 2.2)兼容。我能做些什么?
http://code.google.com/p/scalafx/ http://code.google.com/p/scalafx/
Addendum
..最后(遵循下面伊戈尔的解决方案)sbt run
轻松启动彩色圆圈演示(好吧,如果有支持的 GPU)。甲骨文claims http://docs.oracle.com/javafx/2/system_requirements_2-2/jfxpub-system_requirements_2-2.htm that “JavaFX 支持任何 Mac OS X 系统(Lion 或更高版本)上的图形硬件加速”但我倾向于认为我使用的 NVidia 驱动的 Mac Mini 可以进行软件渲染。
不,即使是使用 javafx 速度很快的 MacBook Air(酷睿 i7)在演示中也表现得很缓慢。也许这是演示。