Wrapping C / C in Java++
I develop applications in C / C + + I prefer these two languages and like to be a C developer I want to know how to create a java program that contains all my C code
I mean, I want to include all my C code (already developed) in Java classes But ignorance how to do this
Please publish your response or method / step integration Java (use JNI, but I can't figure out how to use it on WWW)
FYI, I use the eclipse ide to develop
What packages should I include in the project workspace and what packages?
Solution
If you want to call C from Java, you need to use JNI – Java Native Interface
Note that you will lose some of the benefits of the garbage collector because it cannot handle C objects and your code will no longer be portable
Maybe you'll learn to write 100% Java and keep C, but this is just a suggestion