Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java_home must be exactly same with the developer's? #602

Open
HarveyLee1228 opened this issue Jul 26, 2024 · 1 comment
Open

java_home must be exactly same with the developer's? #602

HarveyLee1228 opened this issue Jul 26, 2024 · 1 comment

Comments

@HarveyLee1228
Copy link

HarveyLee1228 commented Jul 26, 2024

Sorry for my bad English.
I run into a problem when I using this tookit. When my project is packed,I can run it perfectly on my own device. But when my partner install the app built on my device, he cannot run it correctly. I have read the source code, it seems like the java_home dir from my device is hard coded into the output lib. How can I make the java_home dynamic reading from the user's device?
20240726152415286

@neolord0
Copy link

neolord0 commented Feb 4, 2025

I had the same problem.
When compiling a C++ module, JAVA_HOME is set and it seems that it cannot be changed after that.
So before compiling, I copied Java to the installation location and set the JAVA_HOME environment variable
Since MacOS is installed in the application folder, I set it up as follows.

export JAVA_HOME=/Applications/builder_java.app/Contents/Resources/app.asar.unpacked/java_home

This is just a trick. If you know the normal way, please write below.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants