Search code examples
javadllvb6exejna

Invoke DLL/Exe via Java JNA


Currently i have an existing VB6 project which contains an exe file and a vbp file, my task is to invoke vb functions via Java(JNA/JNI), i know we can call DLL from java using JNA, but this project doesn't contain DLL file. Can i call exe via java without opening UI, or is there a way to convert exe to dll, or i can find dll files somewhere?

I'm new to VB, Bare me if i am wrong, Thanks in Advance.


Solution

  • No. You can't call exe via java without opening UI (unless your program has a full command line mode). Yes, you can convert your vb6 project to a DLL. No, you can't do it auto-magically. Given that, without knowing VB it will almost certainly be easier to just rewrite the various functions in Java.