Jump to content
  • Advertisement


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


[java] JNI

This topic is 6507 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
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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!