|
From: Niemann, H. <har...@si...> - 2022-02-15 10:49:06
|
Hi!
I need to specify which java is used for a coverage run.
I am using Jython 2.7.0 and coverage 3.4.3
I used to use "coverage.exe" but how could I tell it which java to start?
I succeded starting "jython.exe coverage-script.py" , but same problem: which java VM is used?
I can run Jython with an explicit JAVA executable and some simple example
%JAVA64% -jar "somepath\jython.jar" %JYTHON_DIR%\bin\hello.py
But when I combine these to
%JAVA64% -jar "C:\SIBAS32\JAVA_LIBS\jython\jython.jar" %JYTHON_DIR%\bin\coverage-script.py
I get
Traceback (most recent call last):
File "C:\DEVTOOLS\Jython\2.7.0\bin\coverage-script.py", line 5, in <module>
from pkg_resources import load_entry_point
ImportError: No module named pkg_resources
So I would need to convince coverage.exe or jython.exe to use the Java.exe I want, or teach java.exe -jar ... coverage-script.py where to look for the pkg_resources directory.
On
https://www.jython.org/jython-old-sites/archive/21/docs/interpreter.html
I found the sentence
"jython is a short script that invokes your local JVM, [..]"
which unfortunately does not tell me how the JVM is selected from the (four?) JVMs I have installed.
What would you recommend?
Regards
Hartmut
|