AJu
AJu

Reputation: 95

how to use Windows API(user32.dll) in java

Is there any way to use Windows API i.e user32.dll in java??

Upvotes: 0

Views: 8132

Answers (3)

Jcs
Jcs

Reputation: 13709

You may use:

  • JNA (as already written in previous replies)
  • Bridj. Bridj is a project younger than JNA and still have limitations but it also has some nice features: generics support, faster than JNA, annotation-based API...

Upvotes: 3

Erik
Erik

Reputation: 91260

Use JNA - Also see the Java Native Access page on wikipedia.

Upvotes: 4

celem
celem

Reputation: 404

Certainly is. Take a look at http://www.codeguru.com/java/tij/tij0193.shtml for a discussion of J/Direct which lets you interface with just about any api. The example there is in fact user32.dll

Edit: J/Direct is no longer maintained and is also Windows only, might well be better off with Erik's JNA suggestion above

Upvotes: 0

Related Questions