python-ldap-test
python-ldap-test copied to clipboard
Error running on windows 10 - 'exec' is not recognized
Tried running the example in windows 10 and 7 and it threw the following error
INFO:ldap_test:Starting the JavaGateway on python_proxy_port 25334
'exec' is not recognized as an internal or external command,
operable program or batch file.
As a workaround, I had to edit run_jvm_server in ldap_test\server.py
def run_jvm_server(gateway_port=DEFAULT_GATEWAY_PORT):
if not os.path.isfile(JVM_SERVER_BIN):
raise Exception("%s is missing!" % (JVM_SERVER_BIN,))
jre_executable = find_executable("java")
if jre_executable is None:
raise Exception("'java' executable not found in system path!")
try:
cmd='java -jar "{}" --port {}'.format(JVM_SERVER_BIN, gateway_port)
return subprocess.Popen(cmd, shell=True)
except OSError as e:
log.error("Failed to run JVM server because: %s" % (e,))
raise
I hit the same problem, thanks for the workaround !