-
Notifications
You must be signed in to change notification settings - Fork 36
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
jvm and thread safety #72
Comments
The All you need to do, is to create a let jvm: Jvm = Jvm::attach_thread()?; You will have a working If you want to do Jvm caching, the only thing you could do is to cache it in a thread_local. That being said, results of |
I get this output when I call:
|
Please make sure the |
I set JAVA_HOME to C:\Program Files\Java\jre-1.8 and that got rid of the first warning. However, I am still getting the error related to System information: Windows 11 |
Either use Java version > 8 or do what is documented here. |
Sorry about that, I should've noticed that in the documentation. One final question since the README includes information about shipping/deploying a j4rs application. Is it possible to bundle my create in such a way that the end user of the application wouldn't even need the JRE installed (would be included with j4rs |
Theoretically, you could ship the whole JRE along with a IMO, maybe a better approach would be to use snap, flatpack, or appimage, so that you have the JRE in the app in a more "official" way. |
Perfect, thank you so much! I will mark this as closed. |
I am working on a rust application with a REST API. Some of the REST endpoints need to make java function calls. I am using the Rust GUI framework Tauri. My managed state for the REST API endpoints is:
And the error I am getting is:
Is there a way to handle this? I am essentially using this crate to create the JVM and then create a databases connection object (by called Java methods) and finally sharing this connection between REST endpoints.
The text was updated successfully, but these errors were encountered: