Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

a2k

[java] JNI

This topic is 6416 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

any of you guys use Java Native Interface before? i need to code a buncha classes in C++, but the gui is in Swing, so i need to use JNI. is it doable for the java to manipulate the C++ classes? (all i''ve seen is c++ methods manipulating java members, but i need it the other way around) a2k

Share this post


Link to post
Share on other sites
Advertisement
You cannot effect C++ methods directly, but have to do so indirectly.

You will have to make a method in Java declared native and then in C++ implement this method. The method in C++ should then call the C++ class member.

All this is pretty detailed explained in the report I wrote. There is a recent posting in this forum about it.

Jacob Marner

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!