J/Invoke - easy Java native interoperability

J/Invoke enables Java developers to easily invoke native methods (such as the Win32 API or C-based Windows DLLs and Unix dynamic libraries) with pure Java code.

Unlike error-prone JNI programming that is hard to use and deploy, J/Invoke lets you access native libraries by simply declaring native methods, and calling them from pure Java.

Java programmers can save time, avoid errors and increase productivity by using J/Invoke to

  • Call native libraries from pure Java, without using JNI
  • Use OS features and APIs (like the Win32 API), not available through Java
  • Integrate Java applications with native libraries (Windows DLLs, Mac OS X, Linux and Solaris dynamic libraries)
  • Provide Java API for native DLLs or other non-Java libraries

Do all this and more with pure, simple Java - no need to mess with C/C++ programming with error-prone and hard to use JNI, deploying intermediate DLLs, and dealing with parameter conversions between Java and native types.

J/Invoke 2010 released

J/Invoke 2010 has been released!

This release includes support for 64 bit Windows and Windows 7. It also includes bug fixes and enhancements such as the ability to return structures from callback functions. J/Invoke is being used in a lot of innovative ways by our users who keep pushing it in unique ways on newer platforms. We're happy to add support for the 64 bit Windows platform - many users have been asking for it and we are happy to oblige:)

If you have purchased J/Invoke within the past year, this is a free upgrade! Your existing license keys will continue to work.

J/Invoke 2009 released!

We are happy to announce the release of J/Invoke 2009.

This release has a number of significant updates added over the course of several months - refer to the Release notes for details.

If you have purchased J/Invoke within the past year, this is a free upgrade! Your existing license keys will continue to work.

J/Invoke in the blogosphere

J/Invoke is getting recognized in the blogosphere as a really cool and easy way to invoke Win32 API or C Dlls from Java.

Rajesh at JavaByExample did an exhaustive search and review of Java libraries that enabled Win32 access, and found J/Invoke to be the easiest to use:

USB Foot Pedal input in Java

How interesting is a Java-native interoperability project if it doesn’t involve reverse engineering and some low level hardware access? Well, that’s what I’ll do in this blog post. I will get input for my Java program from a USB Foot Pedal.

The Hardware


The device I’m going to access is the Infinity IN-USB-1 Foot Pedal.

New "Windows Programming Using Java" Website

Andrew Davison and Gayathri Singh have created a new website for Windows programming in Java.

The Windows Programming Using Java website (http://fivedots.coe.psu.ac.th/~ad/winJava/) is for programmers who want to extend Java's capabilities on Windows XP and/or Vista, but aren't sure where to start. One of the drawbacks of Java's portability is that many Java programmers have a rather sketchy knowledge of Windows-specific programming.

J/Invoke 2.2 released

J/Invoke 2.2 has been released today!

This release enables C++ method invocation by adding support for the THISCALL Calling Convention. Also new at this release, are JVM 5.0 compliant demos and runtime.

J/Invoke 2.1 is out!

J/Invoke 2.1 is out of the bag!

This release adds several enhancements to the J/Invoke API that make it easy to work with the Win32 API. There are new methods declarations in com.jinvoke.win32.Advapi32 that make it easier to use the Windows Registry from Java, and there are enhacements in com.jinvoke.win32.Gdi32 that make it easier to use Icons and Bitmaps and convert them to Java Icons.

J/Invoke 2.0 released!

We are happy to announce the release of J/Invoke 2.0.

This release has a number of enhancements - refer to the Release Notes for details. There are improvements and bug fixes in the core runtime. A number of new functions signatures, constants and structures for Shell32 and other important Win32 APIs have been added. J/Invoke demos have also been added as samples and the folder structure has been made intutive and easy to use.

J/Invoke 1.8 released

J/Invoke 1.8 has been released. This update has support for JNLPAppletLauncher and contains bug fixes for CDECL callbacks. With these changes, it is now much easier to use J/Invoke with applets and also possible to call many C libraries that use CDECL callbacks (such as the VMware VIX library). Release notes are available here.


Warning: Access denied for user: 'dbo211916462@%' to database 'db211916462' query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '<em>Access denied for user: &amp;#039;dbo211916462@%&amp;#039; to database &amp;#039;db211916462&amp;#039;\nquery: INSERT INTO accesslog (title, path, url, hostname, uid, sid, timer, timestamp) values(&amp;#039;&amp;#039;, &amp;#039;node&amp;#039;, &amp;#039;&amp;#039;, &amp;#039;207.241.237.214&amp;#039;, 0, &amp;#039;7529d7a952791af584e07aedaac39e72&amp;#039;, 2676, 1311773900)</em> in <em>/homepages/34/d211454162/htdocs/JInvokeDrupal/includes/database.mysql.inc</em> on line <em>172</em>.', 2, '', 'http://www.jinvoke.com/', '', '207.241.237.214', 1311773900) in /homepages/34/d211454162/htdocs/JInvokeDrupal/includes/database.mysql.inc on line 172

Warning: Access denied for user: 'dbo211916462@%' to database 'db211916462' query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '<em>Access denied for user: &amp;#039;dbo211916462@%&amp;#039; to database &amp;#039;db211916462&amp;#039;\nquery: INSERT INTO sessions (sid, uid, cache, hostname, session, timestamp) VALUES (&amp;#039;7529d7a952791af584e07aedaac39e72&amp;#039;, 0, 0, &amp;#039;207.241.237.214&amp;#039;, &amp;#039;messages|a:1:{s:5:\\&amp;quot;error\\&amp;quot;;a:1:{i:0;s:425:\\&amp;quot;user warning: Access denied for user: &amp;amp;#039;dbo211916462@%&amp;amp;#039; to database &amp;amp;#039;db211916462&amp;amp;#039;\\nquery: INSERT INTO accesslog (title, path, url, hostname, uid, sid, timer, timestamp) values(&amp;amp;#039;&amp;amp;#039;, &amp;amp;#039;node&amp;amp;#039;, &amp;amp;#039;&amp;amp;#039;, &amp in /homepages/34/d211454162/htdocs/JInvokeDrupal/includes/database.mysql.inc on line 172