let's suppose that I have created and added a new entry to the Windows explorer right-click menu (context menu) by adding a registry entry that points to a .exe written in C++ that just reads and returns the filename of the clicked file.
Is it possible to get this filename to an already running Java app?
I thought of using JNI but is it possible to call a method of an already running Java app from a native C++ program?
Does anybody have another idea how to solve this? Is it possible to have a pure Java solution?
Many thanks.
Edit: Is it possible to call an existing method of an already running JVM? Then I could create a C++ program that listen for right-clicks and register that .exe with a registry entry for the contextmenu. Inside the C++ program, I could call a dll that injects into an already running JVM. The dll could call a Java method and commits the clicked filepath to Java. Would that be a possibility?