Is there a Java library to access the native Windows API?

You could try these two, I have seen success with both.

http://jawinproject.sourceforge.net

The Java/Win32 integration project
(Jawin) is a free, open source
architecture for interoperation
between Java and components exposed
through Microsoft’s Component Object
Model (COM) or through Win32 Dynamic
Link Libraries (DLLs).

https://github.com/twall/jna/

JNA provides Java programs easy access
to native shared libraries (DLLs on
Windows) without writing anything but
Java codeā€”no JNI or native code is
required. This functionality is
comparable to Windows’ Platform/Invoke
and Python’s ctypes. Access is dynamic
at runtime without code generation.

JNA allows you to call directly into
native functions using natural Java
method invocation. The Java call looks
just like it does in native code. Most
calls require no special handling or
configuration; no boilerplate or
generated code is required.

Also read up here:

http://en.wikipedia.org/wiki/Java_Native_Interface

The Java Native Interface (JNI) is a
programming framework that allows Java
code running in a Java Virtual Machine
(JVM) to call and to be called1 by
native applications (programs specific
to a hardware and operating system
platform) and libraries written in
other languages, such as C, C++ and
assembly.

http://en.wikipedia.org/wiki/Java_Native_Access

Java Native Access provides Java
programs easy access to native shared
libraries without using the Java
Native Interface. JNA’s design aims to
provide native access in a natural way
with a minimum of effort. No
boilerplate or generated glue code is
required.

Leave a Comment