我想请您帮助通过建筑进口JNativeHook。 我的 Java项目的梯度。
该建筑。 梯度似乎正在修建,但图书馆在我的项目中发现。
plugins {
id application
}
group org.example
version 1.0-SNAPSHOT
sourceCompatibility = 11
repositories {
mavenCentral()
}
dependencies {
implementation com.github.kwhat:jnativehook:2.2.1
implementation group: com.alibaba , name: fastjson , version: 1.2.75
}
mainClassName = "lt.vu.cs.softwaredesign.Main"
jar {
manifest {
attributes Main-Class : lt.vu.cs.softwaredesign.Launcher
}
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
destinationDirectory = file("$rootDir/out")
// change the assignment number in filename of the jar
archiveFileName = "assignment1.jar"
}
I get "error: package org.jnativehook.keyboard does not exist import org.jnativehook.keyboard.NativeKeyListener;" ^
我在这种场合拥有一个单元-info.java,但似乎没有帮助。