Sunday, February 20, 2011

jni4net 0.8.3 - release

Changes

  • added support for IBM JRE
  • added drools sample
  • added BridgeSetup.IgnoreJavaHome
  • improved error logging during initialization

Blocked DLLs for CLR 4.0

If you download the distribution package on jni4net and unzip it via Windows Explorer, it will set the DLL security zone as untrusted. That will prevent CLR 4.0 from loading the DLL and you will receive exception while initializing jni4net from Java side.
The message states:
Can't init BridgeExport:An attempt was made to load an assembly from a network l
ocation which would have caused the assembly to be sandboxed in previous version
s of the .NET Framework. This release of the .NET Framework does not enable CAS
policy by default, so this load may be dangerous. If this load is not intended t
o sandbox the assembly, please enable the loadFromRemoteSources switch. See http
://go.microsoft.com/fwlink/?LinkId=155569 for more information.

You can solve it by unblocking the DLLs.
Right-click on the files, open file properties and click unblock button.