gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-11-30 08:18:22 25 4
gpt4 key购买 nike

我正在尝试在我的笔记本电脑上构建JavaFX sceneBuilder,我已经从 OpenJFx 项目下载了源代码并成功构建了 SDK,但是在场景构建器构建过程中我遇到了以下错误,我有点困惑,因为我完全不懂gradle,我不明白我应该把所需的属性放在哪里,我应该修改哪个文件夹或哪个配置文件,以及为什么grade运行ant任务,我没有在我的机器上安装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 $

最佳答案

好的,

问题是 gradle 构建系统没有设置platforms.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

这对我有用,构建的结果位于“dist”文件夹中,并且要运行刚刚构建的场景构建器,我必须使用

/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

显然,要为您的安装自定义路径。

关于java - 无法从 openjfx 源代码和设置构建 SceneBuild,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29341266/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com