• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JNI question... Rewriting j++ code issues

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Wonderful! haha.

Thanks for the help, and saving me a headache.

Adrian
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic