首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >将javafx.util.Pair作为一个依赖项包含在gradle中

将javafx.util.Pair作为一个依赖项包含在gradle中
EN

Stack Overflow用户
提问于 2018-02-23 00:24:47
回答 1查看 3.4K关注 0票数 3

我有一个使用oracle开发的springboot应用程序,它使用javafx.util.pair类。当jar构建在具有OpenJDK的系统上运行时,它将找不到这个类。我如何用我的jar打包这个依赖项?我在用gradle。这是我的build.gradle文件

代码语言:javascript
运行
复制
buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.10.RELEASE")
    }
}

description = "CF Service Broker using Java / Spring"

apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'

jar {
    baseName = 'cf-tile'
}

repositories {
    mavenCentral()
}

sourceCompatibility = 1.8
targetCompatibility = 1.8


dependencies {
    compile("org.springframework.boot:spring-boot-starter-web")
    compile("org.springframework.boot:spring-boot-starter-actuator")
    compile("org.springframework.boot:spring-boot-devtools")
    testCompile('org.springframework.boot:spring-boot-starter-test')
    testCompile('com.jayway.jsonpath:json-path')
    testCompile group: 'junit', name: 'junit', version: '4.12'
}
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-02-23 11:31:26

我不相信您可以通过gradle导入javafx,但是对于不包含在OpenJDK版本中的平台,可以使用openjfx。

例如,可以使用以下方法将其安装在ubuntu中:

代码语言:javascript
运行
复制
sudo apt-get install openjfx
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48939345

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档