无法从openjfx源代码和设置构建SceneBuild

时间:2015-03-30 08:10:19

标签: java ant javafx

我试图在我的笔记本电脑上构建JavaFX sceneBuilder我已经从OpenJFx项目下载了源代码并成功构建了SDK但是在场景构建器构建过程中我得到了以下错误,我&# 39;有点困惑,因为我完全掌握了gradle,我不明白我应该把所需的属性放在哪里,在哪个文件夹或哪个配置文件中我应该修改,以及为什么等级运行ant任务,我没有在我的机器上安装蚂蚁(它不在先决条件中 openjfx wiki)。

非常感谢

Galileo openjfx $ gradle sceneBuilderAppJar
:buildSrc:generateGrammarSource UP-TO-DATE
:buildSrc:compileJava UP-TO-DATE
:buildSrc:compileGroovy UP-TO-DATE
:buildSrc:processResources UP-TO-DATE
:buildSrc:classes UP-TO-DATE
:buildSrc:jar UP-TO-DATE
:buildSrc:assemble UP-TO-DATE
:buildSrc:compileTestJava UP-TO-DATE
:buildSrc:compileTestGroovy UP-TO-DATE
:buildSrc:processTestResources UP-TO-DATE
:buildSrc:testClasses UP-TO-DATE
:buildSrc:test UP-TO-DATE
:buildSrc:check UP-TO-DATE
:buildSrc:build UP-TO-DATE
MACOSX_MIN_VERSION = 10.7
MACOSX_SDK_PATH = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk
OS_NAME: mac os x
OS_ARCH: x86_64
JAVA_HOME: /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home
JDK_HOME: /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home
java.runtime.version: 1.8.0_40-b27
java version: 1.8.0_40
java build number: 27
jdk.runtime.version: 1.8.0_40-b27
jdk version: 1.8.0_40
jdk build number: 27
minimum java build number: 132
CONF: Debug
NUM_COMPILE_THREADS: 1
COMPILE_TARGETS: mac
COMPILE_FLAGS_FILES: buildSrc/mac.gradle
HUDSON_JOB_NAME: not_hudson
HUDSON_BUILD_NUMBER: 0000
PROMOTED_BUILD_NUMBER: 00
PRODUCT_NAME: OpenJFX
RAW_VERSION: 8.0.60
RELEASE_NAME: 8u60
RELEASE_MILESTONE: ea
UPDATE_STUB_CACHE: false
The CompileOptions.useAnt property has been deprecated and is scheduled to be removed in Gradle 2.0. There is no replacement for this property.
:apps:scenebuilderAppJar FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':apps:scenebuilderAppJar'.
> The following error occurred while executing this line:
  /Users/fabiofrumento/openjfx/apps/scenebuilder/build.xml:19: The following error occurred while executing this line:
  /Users/fabiofrumento/openjfx/apps/scenebuilder/SceneBuilderKit/nbproject/build-impl.xml:86: The J2SE Platform is not correctly set up.
   Your active platform is: JDK_1.8, but the corresponding property "platforms.JDK_1.8.home" is not found in the project's properties files.
   Either open the project in the IDE and setup the Platform with the same name or add it manually.
   For example like this:
       ant -Duser.properties.file=<path_to_property_file> jar (where you put the property "platforms.JDK_1.8.home" in a .properties file)
    or ant -Dplatforms.JDK_1.8.home=<path_to_JDK_home> jar (where no properties file is used)

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 7.228 secs
Galileo openjfx $

1 个答案:

答案 0 :(得分:1)

好的,

问题在于gradle构建系统没有设置平台.JDK_1.8.home我已经解决了这个问题:

1) Installed latest ant from apache official site

2) Gone into the apps/scenebuilder folder

3) Run ant -Dplatforms.JDK_1.8.home=/Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/ jar

这对我有用,构建的结果是在&#34; dist&#34;文件夹和运行刚刚构建的场景构建器我必须使用

/Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home//bin/java -cp /Users/fabiofrumento/openjfx/apps/scenebuilder/SceneBuilderKit/dist/SceneBuilderKit.jar:/Users/fabiofrumento/openjfx/apps/scenebuilder/SceneBuilderApp/dist/SceneBuilderApp.jar com.oracle.javafx.scenebuilder.app.SceneBuilderApp

显然,这些路径是为您安装而定制的。