Comments (9)
Its compiled for a later version of Java than you have available. IIRC I moved the target byte code version to 1.7 because Java 1.6 is end of life. Unless there is a good reason to keep Java 6, you should upgrade to at least version 1.7. If you can't for whatever reason, just recompile the class files in the library for Java 6 and repackage the jar. If you need help doing that let me know.
from jnativehook.
Will I be able to compile it for 1.5 as well? I don't want to rely on users being up to date and want to be backward-compatible as far as possible. :)
from jnativehook.
@kwhat Hey, thanks for making this library. I have to use Java 6 because version 7 on Mac is 64-bit only and I need to write a plugin for a 32-bit application.
Could you help me with the recompilation and the repackaging?
I've downloaded the OSX java 6 version, added it to the installed JREs section in Eclipse, imported JNativeHook to Eclipse, set it's Java System Library to the 1.6, set the compliance to 1.6. I then exported a jar, unzipped it and added the native binaries and manifest from the original jar you provided and rezipped it...still get the same version error. What else do I need to do?
Thanks
from jnativehook.
If there is still demand for 1.5, 1.6 I will build the next RC for 1.5 target. To recompile to class files yourself, extract the jar and place the content of the org/jnativehook/lib folder in the projects root so that you have ./lib and ./src in the same location. Then you should be able to run ant -Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5 compile-java jar
and get a new jar built for 1.5 will all of the native binaries packaged back in.
from jnativehook.
We need to have the jdk 1.5 installed to compile it for 1.5, don't we?
I get the following error when running your command:
build.xml:168: Could not load definitions from resource org/jnitasks/antlib.xml. It could not be found.
Total time: 0 seconds
Also, do you have a release date for RC3?
from jnativehook.
You do not need a 1.5 JDK, however 1.8 may cause some issues. (I haven't tested building with 1.8) Javac will probably warn about the bootclasspath when trying to compile for 1.5, you can fix that by adding -Dant.build.javac.args="-bootclasspath /path/to/jre/lib/rt.jar"
where /path/to/jre/lib/rt.jar points to the lib/rt.jar file of the jre you are using. It may be located under the jdk folder you installed to.
As far as the RC3 release date, I just need to do some testing with fabricating native events and make sure that code is complete and review a pull request. Hopefully this weekend.
from jnativehook.
I still cannot compile, as the mentioned antlib.xml is missing in the sources..
Great! If we cannot get it to compile on my setup, I might just wait for your new RC :)
from jnativehook.
Put the jnitasks.jar in the jar folder as par the instructions ;)
from jnativehook.
Had no time until today to test it. But it works fine now, thank you very much! :)
from jnativehook.
Related Issues (20)
- All keyboard input is all capitols. HOT 1
- SIGSEGV when registering hook in JavaFX application HOT 2
- java.awt.robot.keyPress(keyCode); cannot be used
- Minecraft Sensitivity bug. HOT 5
- Explain keypad number conversions in jni_ConvertToJavaLocation(...)
- GetKeyCode() Always Returns 0 HOT 5
- GlobalKeyListener not working in windows executable file
- URI is not hierarchical
- Could you please build a new release?
- ConsoleOutput.md error?
- When packaging modular projects with jpackage, module names can't start with "app."
- Why is the NativeHookThread deliberately NOT a daemon thread? HOT 1
- Unable to extract the native library /com/github/kwhat/jnativehook/lib/windows/x86_64/JNativeHook.dll! HOT 2
- A fatal error has been detected by the Java Runtime Environment: HOT 1
- Keyboard hook notwork HOT 2
- GlobalScreen class does not implement AutoCloseable, preventing usage in try-with-resources
- GlobalScreen.postNativeEvent Not Working When Windows Screensaver Is Active
- typo in doc/Keyboard.md
- java.lang.UnsatisfiedLinkError: Unable to extract the native library
- Distinguish between virtual input and human input HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jnativehook.