Blog

JNBridgePro 3.2 has been released!

JNBridgePro 3.2 has just been released, and can be downloaded from our Web site.

The most important new feature of 3.2 is that it is now Certified for Windows Vista.  We’ve modified the product and the installer to work well with Vista’s User Access Control (UAC) mechanism.  All JNBridgePro assemblies are now signed with an Authenticode certificate for additional security.

All holders of a current JNBridgePro 3.1 license can install and use 3.2 without purchasing or installing a new license.

New JNBridgePro point release, 3.1.3, now available

We’ve just released a new point release of JNBridgePro, version 3.1.3.  You can get it by downloading a new copy of JNBridgePro 3.1 from http://www.jnbridge.com/, then uninstalling your old copy and installing the new one.  You should use the new JNBridgePro components in your applications.  To get the full advantage of all the fixes, we recommend you re-generate your proxies, although the old ones will work, too.

The main change in 3.1.3 is a fix to the installer that allows it to be compatible with Windows Vista when Vista’s User Access Control (UAC) is enabled.

From the release notes:

  • In Java-to-.NET projects, parameters to callbacks (delegates/events) can now be value proxies. Previously, they could only be reference proxies.
  • A number of changes have been made to make JNBridgePro, and particularly its installer, more compatible with Windows Vista. In particular, the installer now works with Windows Vista’s User Access Control (UAC) mechanism. Also, all the executables are now signed with an Authenticode certificate, in addition to having .NET strong names.
  • Fixed a problem that could cause an exception to be thrown when initializing multithreaded Java-to-.NET projects.
  • Fixed a problem in Java-to-.NET projects where a dynamically generated proxy object might not implement all the interfaces that the underlying .NET object implements.
  • Fixed a problem that could cause a .NET-to-Java application to lock up when certain timing conditions occur relating to callbacks.
  •  

New JNBridgePro point release, v3.1.2, now available

We’ve just released a new point release of JNBridgePro, version 3.1.2.  You can get it by downloading a new copy of JNBridgePro 3.1 from http://www.jnbridge.com/, then uninstalling your old copy and installing the new one.  You should use the new JNBridgePro components in your applications.  To get the full advantage of all the fixes, we recommend you re-generate your proxies, although the old ones will work, too.

 3.1.2 contains a several minor new features, and fixes for several issues.  It also includes several security-related changes required for Windows Vista certification.  If you’re not using Windows Vista, these changes won’t impact you at all.

Here’s the list of changes from the release notes:

  • Deployment license files can now be deployed in the application’s current working directory (generally, the folder in which the application’s .exe file resides).
  • It is no longer necessary to have run the registration tool under administrative or power user privileges before running a JNBridgePro-enabled application for the first time (or run the application itself under such privileges the first time) when using a deployment license file.
  • Added support in Java-to-.NET projects for accessing .NET-side methods and properties that are explicit interface implementations (that is, whose declaration includes the name of the interface whose method or property they are implementing). Previously, accessing such methods and properties could cause an exception to be thrown. Note that if the class has more than one member with the same name of the same name that are explicit interface implementations of different interfaces, only one will be proxied. The proxy generator will indicate which member has been proxied, and which members have not.
  • Added Callbacks.releaseCallback(), which can be used in .NET-to-Java projects to release the resources used by callbacks when the callbacks are no longer used. See the section “Callbacks” in the .NET-to-Java section of the Users’ Guidefor more information.
  • JNBridgePro executables now contain an embedded manifest resource containing User Account Control information, which is used by Windows Vista to enforce security policy.
  • JNBridgePro executables and dll files are now signed with the JNBridge Authenticode certificate.
  • Fixed a Windows Vista-related problem that caused the .NET DNS resolution API to break, and prevented the tcp/binary communications mechanism from working properly.
  • Fixed a problem that could cause the proxy generator to fail when loading a jar file that contains no classes.
  • Fixed a problem in Java-to-.NET proxy generation that could cause the proxy of .NET class that inherits from a generic class to have an incorrect superclass.

JNBridgePro and ClickOnce

There was an interesting support issue here the other day, asking how to use JNBridgePro-enabled application with ClickOnce.  Let’s say you have a nice WinForms app that contains a Java Swing component:

 

sample Swing component embedded in a WinForms app

Now, let’s say you want to publish the application to a Web site, so that users can employ ClickOnce to download, unpack, and run the application on demand.  You’ll need to add additional files to the project that aren’t actually referenced in the .NET code: in this case, the unmanaged files JNBJavaEntry.dll and jawt.dll (that need to be in the execution folder), plus the Java-side components jnbcore.jar and bcel-5.1-jnbridge.jar, and any Java files that need to be in the classpath that aren’t on the target machine.  (These Java files need to be jar files; the ClickOnce mechanism doesn’t seem to be able to reconstruct Java folder hierarchies.)  The project, with the added files, might look like this:

 

Project in Solution Explorer

For each of these additional files, you’ll need to make sure that the “Copy to Output Directory” property is set to “Copy Always”:

 

Properties

You also need to make sure that the configuration file uses relative paths that reference the current runtime folder:

 

Configuration file

Then, build the application and publish it.  You now have a self-contained application that can be downloaded from a Web server and launched using ClickOnce.  That’s all there is to it.

It’s still necessary to have a JNBridgePro license installed on the target machine if you want the application to run past the end of the 30-day evaluation period.  An upcoming version of JNBridgePro will have the ability to package a deployment license file with the downloaded application.  Let us know if that’s a feature of interest to you.

JNBridgePro 3.1 released!

We’re happy to announce we’ve released JNBridgePro v3.1, our new version!  The two big new features of 3.1 are:

  • The ability to embed .NET WinForms UI controls inside Java AWT, Swing, and SWT applications, and the ablity to embed Java AWT and Swing applications inside .NET WinForms apps.  Over the last few years, this has probably been the most requested new feature.  A few months ago, we posted some early bits that showed how embedding of GUI elements could be done (http://www.jnbridge.com/blog/?p=10 and http://www.jnbridge.com/blog/?p=9); we’ve incorporated these capabilities into the 3.1 release, solidified them, and added some additional features that weren’t mentioned in the blog, like the ability to use WinForms controls in SWT.
  • The ability to have Java code call .NET code running in multiple CLRs, possibly on multiple machines.  For a long time, we’ve offered the reverse ability in our EE version: to have .NET code call Java code in multiple Java sides.  Based on customer feedback, we decided it was a good time to balance things out by supporting one-to-many interop in the other direction.  And, best of all, this new capability is available in both the SE and EE versions.

Plus, we’ve added a lot of other enhancements and fixes to make JNBridgePro 3.1 our best JNBridgePro yet!

For more information, visit http://www.jnbridge.com/pnews.htm.