Results 1 to 1 of 1
- 07-17-2009, 08:53 PM #1Member
- Join Date
- Jul 2009
- Rep Power
UnsatisfiedLinkError using gr.DotNetFromJava.cpp.dll
My situation is as follows:
I have a library X.dll made in C# (by a third party) that exports a class X.
I need to instantiate that class and excecute its methods from java.
For that I'm trying DotNetFromJava.
The first step sopose me to excecute the following line:
java -cp .\dotnetfromjava.jar gr.dotnetfromjava.codegen.Net2JCodeGen fullPathToTheDLL
That throws the following exception:
Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\<directorio al proyecto>\gr.DotNetFromJava.cpp.dll: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.jav a:1751)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java :1676)
at gr.dotnetfromjava.base.NETManager.<clinit>(NETMana ger.java:50)
at gr.dotnetfromjava.codegen.Net2JCodeGen.main(Net2JC odeGen.java:33)
Then I got into the code and I found the exception ocurrs in the line:
It means it finds the dll but gets an error at opening it.
I searched in the foros for a solutin to this problem and i found the following explanation that seems to have solved the problem to the person who originated the thread of conversation.
http : // social.msdn.microsoft.com/forums/en-US/vcgeneral/thread/66bc8cab-c134-49a8-85e5-37ca9efbdeb4/
I have Visual C# Express 2008 installed but it's not exactly my situation since it wasn't me how made the dll that doesn't work (gr.DotNetFromJava.cpp.dll) on some one else machine (the client machine). My situation is that I'm the client machine and the dll doesn't work on my machine. So I don't know if showld be following these instructions.
Any way, I searched the files msvcr80.dll, msvcp80.dll, msvcm80.dll in my machine and I found 3 diferent versions:
I tried to do what is told there with the 3 versions and none worked.
Could it be I'm trying the wrong version of msvcr80.dll, msvcp80.dll, msvcm80.dll ?
Any ideas how to proceed ?
Thanks a lot
- By cristo_haris in forum EclipseReplies: 0Last Post: 04-23-2009, 08:17 AM
- By sunil.mact in forum Advanced JavaReplies: 4Last Post: 03-03-2009, 05:36 PM
- By Nauman in forum JDBCReplies: 0Last Post: 08-12-2007, 03:23 PM
- By Albert in forum AWT / SwingReplies: 2Last Post: 07-01-2007, 04:58 AM
- By JavaBean in forum Java SoftwareReplies: 0Last Post: 06-21-2007, 11:51 PM