I want to write an dll in C/C++ and call java methods contained in an jar file. I found many threads on SO with the opposite (using a dll from a jar), but not much for my case. So I'm wondering if this is even possible/reasonable at all. I thought just an matching jvm would be required on the machine that loads the dll - but it seems I have to embed a whole jvm in my dll. That would be overkill in my scenario.
My reason to do this is the following: I have an 3rd party application that is capable of loading dlls with a certain interface and I have also a license algorithm as jar file (which will check if a valid license is installed on this machine - no source code for this jar is existing at my end). So I want to compile an dll that will only work if the license mechanism from the jar file returns success. Do I really have to embed a whole jvm in my dll then? Which problems could occur? Any ideas/suggestions on this topic?
Thanks,