[jira] [Commented] (PYLUCENE-62) Not finding jvm.dll on windows

2022-02-13 Thread Andi Vajda (Jira)


[ 
https://issues.apache.org/jira/browse/PYLUCENE-62?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17491669#comment-17491669
 ] 

Andi Vajda commented on PYLUCENE-62:


As is, --find-jvm-dll shouldn't solve the issue because it modifies PATH and 
doesn't use the new os.add_dll_directory() function. 
If, on the other hand, you modify windows.py's add_jvm_dll_directory_to_path() 
to call os.add_dll_directory() instead of messing with Path, does 
--find-jvm-dll then solve the problem ? 
I have no access to Windows so I can't test any fix myself.
Currently, windows.py's get_jvm_dll_directory() does not look on JAVA_HOME. I 
think that it's reasonable that it should do so, as well as looking in the 
Windows registry like it does already. Maybe it should look at JAVA_HOME first, 
then continue looking in the registry if nothing is found ? Your JAVA_HOME 
traversal code should be added to get_jvm_dll_directory() so that all this 
logic is in one place.

> Not finding jvm.dll on windows
> --
>
> Key: PYLUCENE-62
> URL: https://issues.apache.org/jira/browse/PYLUCENE-62
> Project: PyLucene
>  Issue Type: Bug
>Reporter: Petrus Hyvönen
>Priority: Major
> Attachments: add_dll_win.patch
>
>
> On recent versions of Python, the dll's seems to require to be added via the 
> os.add_dll_directory() function.
>  
> Apparently something changed in Python 3.8 regarding this, "Python 3.8 
> changed the DLL resolution order 
> [https://docs.python.org/3/whatsnew/3.8.html#bpo-36085-whatsnew];
> Thanks to:
> [https://github.com/conda-forge/python-feedstock/issues/552]
>  
> Proposed fix in a patch below. It can likely be rewritten in some more neat 
> way. :)



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (PYLUCENE-62) Not finding jvm.dll on windows

2022-02-13 Thread Jira


[ 
https://issues.apache.org/jira/browse/PYLUCENE-62?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17491608#comment-17491608
 ] 

Petrus Hyvönen commented on PYLUCENE-62:


Hi!

The current --find-jvm-dll does not solve the issue.

I need to look into what --find-jvm-dll would do if using same logic and not 
JAVA_HOME, I am running several environments (conda) and would like to be sure 
that it accesses the right jvm, JAVA_HOME would seem like a way to ensure that 
it does indeed use the specified jvm? But the location of jvm within JAVA_HOME 
seems to vary a bit.. :)

 

 

> Not finding jvm.dll on windows
> --
>
> Key: PYLUCENE-62
> URL: https://issues.apache.org/jira/browse/PYLUCENE-62
> Project: PyLucene
>  Issue Type: Bug
>Reporter: Petrus Hyvönen
>Priority: Major
> Attachments: add_dll_win.patch
>
>
> On recent versions of Python, the dll's seems to require to be added via the 
> os.add_dll_directory() function.
>  
> Apparently something changed in Python 3.8 regarding this, "Python 3.8 
> changed the DLL resolution order 
> [https://docs.python.org/3/whatsnew/3.8.html#bpo-36085-whatsnew];
> Thanks to:
> [https://github.com/conda-forge/python-feedstock/issues/552]
>  
> Proposed fix in a patch below. It can likely be rewritten in some more neat 
> way. :)



--
This message was sent by Atlassian Jira
(v8.20.1#820001)