Win a copy of TensorFlow 2.0 in Action this week in the Artificial Intelligence and Machine Learning forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Anyone have any experience with JNIWrapper?

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am currently doing research for a JNI project and was wondering if anyone had any experience using JNIWrapper. So far, I have downloaded and purchased a developer license and have been trying to implement a callback (C->Java). It seems to work fine, with the exception of a glaring memory exception (something along the lines of "Exception 80000003, at 0006F890 Native function stack data: 0,49504165,6c6c6f50,0" ) as soon as the callback finishes in C and returns to Java.

This only happens when I pass a pointer to a C struct (implemented in Java with JNIWrapper's Pointer) as a parameter of the callback. This is after I have initialized all fields inside the Pointer (just a single Int type) using init(). The Pointer is initialized with the size of the struct by passing the class it points to as it's constructor argument. Am I not allocating memory properly, or does JNIWrapper not handle the Pointer type very well?

I have contacted support at JNIWrapper, but their time difference (GMT+2?) makes it difficult to communicate with them. We have passed our code back and forth a few times, but it is very slow. Any help would be appreciated, since the project is quite time-critical. Thanks in advance.
[ September 12, 2005: Message edited by: C. C. ]
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a very strange approach to call JNI SDK from java code. Why do not write the native code in C++? The only problem is that JNI SDK is not friendly and very difficult in use. This problem can be solved in the way other then JNIWrapper. For four years I have been developing Object Oriented JNI SDK and Add-In for Microsoft VC++ 7.1. This tool generates C++ JNI class wrapplers for java classes selected (in bytecode format). JNI programming become Object Oriented, all JNI specifics are generated and wrapped.
The demo version of OOJNI Add-In for MS VC++ 7.1 is available at[id]90910[SiteID]pcmag[id]90910[SiteID]
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic