maven - Gluon Reflection 列出外部 jnativehook 文件 GlobalScreen(我有问题)
问题描述
我还在学习胶子它是如何工作的我是一名学生。现在的问题是它没有在 client:build 之后运行,然后才能完美运行。
所以这就是问题所在。我在反射中添加了 GlobalScreen 类,但它是一种方法或我不明白的东西给我一个问题,所以如何解决它请指导我。
[Sun Jan 31 22:19:45 PKT 2021][INFO] ==================== RUN TASK ====================
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] Hello There
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] GG1
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] GG2
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] Jan 31, 2021 10:19:46 PM org.jnativehook.DefaultLibraryLocator getLibraries
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] SEVERE: Unable to extract the native library /org/jnativehook/lib/windows/x86_64/JNativeHook.dll!
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB]
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] Exception in Application start method
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] Exception in thread "main" java.lang.RuntimeException: Exception in Application start method
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:900)
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] at java.lang.Thread.run(Thread.java:834)
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:519)
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] at com.oracle.svm.core.windows.WindowsJavaThreads.osThreadStartRoutine(WindowsJavaThreads.java:138)
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] Caused by: java.lang.UnsatisfiedLinkError: org.jnativehook.GlobalScreen.getAutoRepeatRate()Ljava/lang/Integer; [symbol: Java_org_jnativehook_GlobalScreen_getAutoRepeatRate or Java_org_jnativehook_GlobalScreen_getAutoRepeatRate__]
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] at com.oracle.svm.jni.access.JNINativeLinkage.getOrFindEntryPoint(JNINativeLinkage.java:153)
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] at com.oracle.svm.jni.JNIGeneratedMethodSupport.nativeCallAddress(JNIGeneratedMethodSupport.java:57)
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] at org.jnativehook.GlobalScreen.getAutoRepeatRate(Unknown Source)
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] at org.jnativehook.GlobalScreen.<clinit>(Unknown Source)
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] at com.oracle.svm.core.classinitialization.ClassInitializationInfo.invokeClassInitializer(ClassInitializationInfo.java:351)
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] at com.oracle.svm.core.classinitialization.ClassInitializationInfo.initialize(ClassInitializationInfo.java:271)
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] at sample.Main.start(Main.java:34)
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:846)
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:455)
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] at java.security.AccessController.doPrivileged(AccessController.java:102)
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_VA_LIST:Ljava_lang_Runnable_2_0002erun_00028_00029V(JNIJavaCallWrappers.java:0)
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] at com.sun.glass.ui.win.WinApplication._runLoop(WinApplication.java)
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] ... 3 more
_______ ___ __ __ _______ __ _
| || | | | | || || | | |
| ___|| | | | | || _ || |_| |
| | __ | | | |_| || | | || |
| || || |___ | || |_| || _ |
| |_| || || || || | | |
|_______||_______||_______||_______||_| |__|
Access to the latest docs, tips and tricks and more info on
how to get support? Register your usage of Gluon Substrate now at
https://gluonhq.com/activate
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.452 s
[INFO] Finished at: 2021-01-31T22:19:49+05:00
[INFO] ------------------------------------------------------------------------
这是我的 pom 文件
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>GameCheats</groupId>
<artifactId>InvokerBotKey</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<name>InvokerBotKeys</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<mainClassName>sample.Launcher</mainClassName>
</properties>
<dependencies>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>15.0.1</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>15.0.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.1stleg/jnativehook -->
<dependency>
<groupId>com.1stleg</groupId>
<artifactId>jnativehook</artifactId>
<version>2.1.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<release>11</release>
</configuration>
</plugin>
<plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>0.0.5</version>
<configuration>
<mainClass>${mainClassName}</mainClass>
</configuration>
</plugin>
<plugin>
<groupId>com.gluonhq</groupId>
<artifactId>client-maven-plugin</artifactId>
<version>0.1.35</version>
<configuration>
<target>${client.target}</target>
<mainClass>${mainClassName}</mainClass>
<reflectionList>
<list>sample.Controller</list>
<list>sample.Main</list>
<list>sample.HotKeys</list>
<list>sample.Invoker</list>
<list>sample.GlobalKeyListener</list>
<list>javafx.application.Application</list>
<list>javafx.scene.Parent</list>
<list>javafx.scene.Scene</list>
<list>javafx.scene.robot.Robot</list>
<list>javafx.stage.Stage</list>
<list>javafx.fxml.FXMLLoader</list>
<list>javafx.scene.input.KeyCode</list>
<list>java.util.concurrent.TimeUnit</list>
<list>javafx.event.ActionEvent</list>
<list>javafx.fxml.FXML</list>
<list>javafx.scene.control.TextField</list>
<list>javafx.scene.control.ToggleButton</list>
<list>javafx.application.Platform</list>
<list>org.jnativehook.GlobalScreen</list>
<list>org.jnativehook.NativeHookException</list>
<list>org.jnativehook.keyboard.NativeKeyEvent</list>
<list>org.jnativehook.keyboard.NativeKeyListener</list>
<list>org.jnativehook.DefaultLibraryLocator</list>
</reflectionList>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>desktop</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<client.target>host</client.target>
</properties>
</profile>
</profiles>
<pluginRepositories>
<pluginRepository>
<id>gluon-releases</id>
<url>
http://nexus.gluonhq.com/nexus/content/repositories/releases
</url>
</pluginRepository>
</pluginRepositories>
</project>
解决方案
推荐阅读
- c# - 以第二种形式获取键输入不起作用
- dialogflow-es - 在访问 dialogflow webhook url 中提供的实现 URL 时,我在谷歌智能家居中遇到后端故障错误
- python - 我如何解析每个域的字符串?
- android - 关于 Click 实现在 Kotlin 中不起作用
- python - How to find out if a playlist has a playlist image cover in Spotipy?
- android - 颤动中的 AWS AppSync 中的 Ssocket 异常
- typescript - 更改 i18n.local 并存储在 asyncStorage 中不会更改应用程序博览会的语言
- c# - ASP.NET Core MVC:查看模型 IList 到 ICollection
- android - 如何在android中获取和设置从一个活动到另一个活动的字符串?
- java - 需要帮助动画图像遵循 JavaFX 中的循环路径