• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JNI question... Rewriting j++ code issues

 
Adrian Marti
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,

Rewriting a small j++ application that uses a DLL and native call. I have the j++ source code but no source for the dll. I named my new class exactly the same and im using the same method call as the j++ code. I am not using a package as the j++ code doesnt use one either. Same method name, same class name etc. The only difference is my class extends JDialog while the j++ code extends mfc.forms (mS stuff). Anyways, when running the code i am getting an usatisfiredlinkerror. I know it is finding the right DLL, ( by using debugger) but it seems as though something is wrong when calling the method. I tried javah'ing my file and the j++ file to compare headers but it failed on the j++ file saying it could not locate mfc.forms... so does JNI take into account the class you are extending when u are creating a native method header? Is this my problem? i'm currently locating the ms packages to see if i can tell in the headers.


Thanks,

Adrian
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Microsoft never implemented JNI. Their JVM had its own native method mechanism. As a result, the same DLL can't be used with modern JVMs.
 
Adrian Marti
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wonderful! haha.

Thanks for the help, and saving me a headache.

Adrian
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic