This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
This is my first post on coderanch. Please let me know if am doing wrong in posting.
Well coming to the question, I have a jar(bundled collection of jars into one) and this jar doesnt have a main method. I have to convert this jar to dll and write a C code using that dll. (Native language bindings). So, are there any good tools to convert jar to native dll? I was googling and came across ikvmc but this converts jar to .Net dll. What is the difference between a normal dll and .Net dll? Can i use ikvmc to do my work? Or are there any other tools which converts jar to native dll? I see many tools that can covert jar to exe but not jar to dll. Please help me.Thanks..
Thanks for your reply. I will change my display name asap. I never used JNI am kind of new to it, i cannot do any changes to the jar. For using JNI, does the java code needs to have Native methods? Or just by adding the JNI code to C program i can call the jar without modifying(adding the native methods) the jar?
JNI has two sides:
1) in Java there are native methods. The implementation of these methods is done in a different language, mostly C. This is the most often used form of JNI.
2) code in a different language (again, mostly C) creates its own internal JVM and uses this to create objects, call methods, etc. You don't need to change any Java code, just make sure it can be found.