0

How do I resolve the classpath red error for line 10 import org.basex.core.BaseXException; from Eclipse:

red_errors

which was imported imported as:

import

after creating on the console:

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$ 

generated gradle build file, I only added the basex compile group:

/*
 * 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()
}

The gradle plugin is installed, and, for what it's worth, gradle successfully runs the project from the console:

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$ 
Thufir
  • 8,216
  • 28
  • 125
  • 273

1 Answers1

0

I support the Treasury Department, and I'm currently helping support some user experience research to better understand who's using our current websites, and how we might improve their experience with a new data site initiative. Your post here was sent to me as you're someone mentioning one of our sites. I was wondering if you had a few minutes to discuss how you found it, what task you're trying to accomplish, and hear about your experience using the site (particularly if there are things we can do better!) Let me know if you have a few min to chat!

jmbecker
  • 11
  • 1
  • err, sure, but this is more of q/a website where I was asking a Java question -- and this isn't an answer to the question. Try https://chat.stackoverflow.com/ probably. – Thufir Oct 28 '19 at 19:39