0

I'm trying to create a version of RakNet for Java. I've heard about how JNI can execute C++ code. So from what I understand I need to have two libraries. One is RakNet itself, the other is a bridge written with JNI that calls the appropriate method from RakNet. But due to the large size of RakNet, it would take all month to create the bridge from Java to RakNet.

Is there a way to do what I've explained more efficiently? I don't even know if I'm doing this correctly.

Idiot
  • 23
  • 5
  • You could possibly use SWIG to automate some of it, but looking at [this question/answer](http://stackoverflow.com/questions/8168517/generating-java-interface-with-swig) it may not be as straightforward as you might like... – wakjah Dec 14 '14 at 14:37
  • Sounds like a job for JavaCPP! Check out this wiki page and let me know where RakNet fails so I can provide an answer: https://github.com/bytedeco/javacpp-presets/wiki/Create-New-Presets – Samuel Audet Dec 18 '14 at 08:07

1 Answers1

0

You can look at JNA (Java Native Access). In JNA there is no need to write a bridge libarary.

Severin
  • 296
  • 2
  • 8
  • I had a look at JNA, unless I'm mistaken it only works for however I want it to work for C++ – Idiot Dec 17 '14 at 19:03