gpt4 book ai didi

eclipse - 如何使用Gradle使用Eclipse导入软件包?

转载 作者:行者123 更新时间:2023-12-03 05:32:52 26 4
gpt4 key购买 nike

如何从Eclipse解决第10行
import org.basex.core.BaseXException;
的类路径红色错误:

red_errors

进口的进口为:

import

在控制台上创建后:

thufir@dur:~/eclipse-workspace/gradleProject$ 
thufir@dur:~/eclipse-workspace/gradleProject$ gradle init --type java-application --test-framework testng
Starting a Gradle Daemon, 2 incompatible and 1 stopped Daemons could not be reused, use --status for details

Select build script DSL:
1: groovy
2: kotlin
Enter selection (default: groovy) [1..2] 1

Project name (default: gradleProject):
Source package (default: gradleProject):

BUILD SUCCESSFUL in 42s
2 actionable tasks: 2 executed
thufir@dur:~/eclipse-workspace/gradleProject$

生成gradle构建文件时,我仅添加了 basex编译组:
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java project to get you started.
* For more details take a look at the Java Quickstart chapter in the Gradle
* User Manual available at https://docs.gradle.org/5.4.1/userguide/tutorial_java_projects.html
*/

plugins {
// Apply the java plugin to add support for Java
id 'java'

// Apply the application plugin to add support for building an application
id 'application'
}

repositories {
// Use jcenter for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
}

dependencies {
// This dependency is found on compile classpath of this component and consumers.
implementation 'com.google.guava:guava:27.0.1-jre'

compile group: 'org.basex', name: 'basex', version: '9.2.4'

// Use TestNG framework, also requires calling test.useTestNG() below
testImplementation 'org.testng:testng:6.14.3'
}

// Define the main class for the application
mainClassName = 'gradleProject.App'

test {
// Use TestNG for unit tests
useTestNG()
}

gradle plugininstalled,并且就其值(value)而言,gradle从控制台成功运行了该项目:
thufir@dur:~/eclipse-workspace/gradleProject$ 
thufir@dur:~/eclipse-workspace/gradleProject$ gradle clean run

> Task :run
Oct. 11, 2019 3:30:31 P.M. gradleProject.App loadProperties
INFO: {databasePath=src/main/resources/treasury.xml, xmlFromUrl=https://www.treasurydirect.gov/xml/A_20080410_1.xml, databaseName=treasury}
Oct. 11, 2019 3:30:31 P.M. gradleProject.App loadProperties
INFO: Name Resources Size Input Path
--------------------------------------------------------------------------------------------------------
treasury 1 12024 /home/thufir/eclipse-workspace/gradleProject/src/main/resources/treasury.xml

1 database(s).

Oct. 11, 2019 3:30:32 P.M. gradleProject.App loadProperties
INFO: Name Resources Size Input Path
--------------------------------------------------------------------------------------------------------
treasury 1 12024 /home/thufir/eclipse-workspace/gradleProject/src/main/resources/treasury.xml

1 database(s).


BUILD SUCCESSFUL in 1s
4 actionable tasks: 4 executed
thufir@dur:~/eclipse-workspace/gradleProject$

最佳答案

我支持财政部,目前正在帮助支持一些用户体验研究,以更好地了解谁在使用我们当前的网站,以及我们如何通过新的数据站点计划来改善他们的体验。您在此处发布的帖子已发送给我,因为您是有人提到我们的网站之一。我想知道您是否有几分钟的时间来讨论如何找到它,正在尝试完成什么任务,以及听到有关您使用该网站的经验(特别是如果有一些事情我们可以做得更好!)有几分钟的聊天时间!

关于eclipse - 如何使用Gradle使用Eclipse导入软件包?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58349130/

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