Setting up Java in freezed application #2510
Unanswered
CanYing0913
asked this question in
Q&A
Replies: 1 comment
-
Update: Suppose my mamba env is under |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I saw the discussion @ #2473 , but I want to know more regarding how to resolve on that issue. Here is my problem description:
I am using a specific library
pyimagej
, which usesJpype
library to load a JVM. Traditionally (i.e. without freezing the application), environment variableJAVA_HOME
is automatically pointed to where the python library folder is by conda/mamba:anaconda/env/env_name/lib
. However, after I freeze the application, it is not the case.The first possible solution I saw in the documentation is that I can manually set the environment variable in my cx-freeze setup.py script;
The second possible solution is discussed in #2473 , which is I can include the java into the application and point
JAVA_HOME
to it directly.I want to ask more regarding the second approach: in my use case, what exactly I shall include to make JVM to work? I understand I can use code to set it:
But I am not pretty sure which location I should use and if I need to take some files as the required files. If you can provide any pointers on this issue that will be great, thanks!
Small test code to show how to use imagej:
Beta Was this translation helpful? Give feedback.
All reactions