joeferner / node-java

Bridge API to connect with existing Java APIs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is there a way to find JAVA_HOME and set include libraries at runtime?

doozi316 opened this issue · comments

Hi,
Is there a way to find JAVA_HOME and set include libraries at runtime?

I understand that in Binding.gyp it finds the JAVA_HOME of the build environment and builds the jvm and Java's libraries.
And I found that the library built with it is used as #include in the c++ file.
I noticed that in postInstall.js the JAVA_HOME path of the build environment is created in jvm_dll_path.json .

Even if the user's environment does not have the same version of JAVA as the build environment, I want the program to run as long as there is a different version of JAVA.
In the case of jvm_dll_path.json, I was able to somehow obtain the JAVA_HOME of the user environment by referring to issue #378,
I don't know how to dynamically modify Java-related libraries built with node-gyp included in the nodejabridge_bindings.node binary module.

I don't know much about c++.
If you know a good way related to this, please reply.
Thank you