c# - jni4net - java.lang.UnsatisfiedLinkError: net.sf.jni4net.Bridge.initDotNet()I -


i've found library , loved much... can't start using it... don't know i'm doing wrong, can me?

i've read wiki , environment setup. , i'm trying simple hello world in java calling c#.

but i'm receiving error:

java.lang.unsatisfiedlinkerror: net.sf.jni4net.bridge.initdotnet()i

here's folder setup in eclipse: https://cloud.githubusercontent.com/assets/6147142/8265327/e2419670-16cd-11e5-85bd-dae9ea275186.png

here's main class:

package testjni4net;  import java.io.ioexception; import java.lang.string;  import net.sf.jni4net.bridge; import system.*; import system.object; import system.io.textwriter; import system.collections.idictionary; import system.collections.ienumerator;  public class teste1 {     public static void main(string[] args) throws ioexception {         // create bridge, default setup         // lookup jni4net.n.dll next jni4net.j.jar         bridge.setverbose(true);          bridge.init();          // here go!         console.writeline("hello .net world!\n");          // ok, simple hello boring, let's play system.environment         // hashtable realy         final idictionary variables = system.environment                 .getenvironmentvariables();          // let's enumerate keys         final ienumerator keys = variables.getkeys().getenumerator();         while (keys.movenext()) {             // there hash table not generic , returns system.object             // know should system.string, cast             final system.string key = (system.string) keys.getcurrent();             console.write(key);              // automatic conversion of jvm string system.string             console.write(" : ");              // use hashtable             object value = variables.getitem(key);              // , jvm tostring() redirected clr tostring() method             string valuetostring = value.tostring();             console.writeline(valuetostring);         }          // console output textwriter on stream         final textwriter writer = console.getout();         writer.flush();     } } 

and here's full stack trace:

can't initialize jni4net bridgenet.sf.jni4net.bridge.initdotnet()i exception in thread "main" net.sf.jni4net.inj.injexception: can't initialize jni4net bridge     @ net.sf.jni4net.clrloader.init(clrloader.java:45)     @ net.sf.jni4net.bridge.init(bridge.java:35)     @ net.sf.jni4net.bridge.init(bridge.java:31)     @ testjni4net.teste1.main(teste1.java:19) caused by: java.lang.unsatisfiedlinkerror: net.sf.jni4net.bridge.initdotnet()i     @ net.sf.jni4net.bridge.initdotnet(native method)     @ net.sf.jni4net.clrloader.init(clrloader.java:37)     ... 3 more 

i don't know why error happened me on jdk7. version jni4net 0.8.3 , fine! sorry that. can't update yet jdk8 because of vendor applications i'm using.


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -