Coder Social home page Coder Social logo

Comments (9)

kwhat avatar kwhat commented on July 29, 2024

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.

c4tz avatar c4tz commented on July 29, 2024

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.

robclouth avatar robclouth commented on July 29, 2024

@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.

kwhat avatar kwhat commented on July 29, 2024

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.

c4tz avatar c4tz commented on July 29, 2024

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.

kwhat avatar kwhat commented on July 29, 2024

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.

c4tz avatar c4tz commented on July 29, 2024

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.

kwhat avatar kwhat commented on July 29, 2024

Put the jnitasks.jar in the jar folder as par the instructions ;)

from jnativehook.

c4tz avatar c4tz commented on July 29, 2024

Had no time until today to test it. But it works fine now, thank you very much! :)

from jnativehook.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.