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

"Failed to launch JVM" error due to lack of write permissions when installing to C:\Program Files #469

Open
s97712 opened this issue Sep 6, 2024 · 4 comments

Comments

@s97712
Copy link

s97712 commented Sep 6, 2024

I used a packaging tool to install the application into C:\Program Files. However, the library tries to release a DLL file into the program directory during runtime. Since there are no write permissions, the DLL fails to be released, and the program throws a "Failed to launch JVM" error. Is there a way to install to C:\Program Files and allow the program to run properly?

@s97712
Copy link
Author

s97712 commented Sep 6, 2024

Is there a way to package the DLL along with the program during the build process, instead of releasing it at runtime? I'm using Gradle to package my application, but I know nothing about Gradle. It's really complicated and hard to understand. I've tried to figure it out, but I'm getting nowhere.

@kwhat
Copy link
Owner

kwhat commented Sep 6, 2024

See: #467 (comment)

@s97712
Copy link
Author

s97712 commented Sep 6, 2024

Maybe extracting to the AppData directory or another directory instead of the app's installation directory could solve a lot of troubles.

@kwhat
Copy link
Owner

kwhat commented Sep 7, 2024

It should be as easy as extracting the target shared library and shipping it along side of the app. You just need to set the java.library.path to the location of the extracted / installed library and name the file appropriately.

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