|
From: James M. <re...@bu...> - 2017-03-13 22:39:42
|
New submission from James Mudd:
Trying to execute the jython using the exe or python launch script on Windows fails if JAVA_HOME environment variable is set
Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.
C:\Users\user\Desktop\dist\bin>jython.exe
Jython 2.7.1rc1 (, Mar 13 2017, 08:51:49)
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.8.0_121
Type "help", "copyright", "credits" or "license" for more information.
>>>
KeyboardInterrupt -------- Works Ok
C:\Users\user\Desktop\dist\bin>set JAVA_HOME="C:\Program Files\Java\jdk1.8.0_121"
C:\Users\user\Desktop\dist\bin>jython.exe
Traceback (most recent call last):
File "jython.py", line 444, in <module>
if __name__ == "__main__":
File "jython.py", line 435, in main
print command
File "subprocess.py", line 168, in call
File "subprocess.py", line 390, in __init__
File "subprocess.py", line 640, in _execute_child
WindowsError: [Error 5] Access is denied
Failed to execute script jython --------- Fails
Running as admin doesn't help. I think the problem is when JAVA_HOME is set then cmd used to invoke java is the full path C:\Program Files\Java\jdk1.8.0_121\bin\java and python doesn't seem to have permission to launch this. However when JAVA_HOME is not set the cmd used is just java and it relies on java being on the path, it seems python can launch this?
Any ideas for a fix? Or others give it a try and see if it fails for you?
----------
components: Core
messages: 11223
milestone: Jython 2.7.1
nosy: jamesmudd
severity: normal
status: open
title: jython launcher fails on Windows if JAVA_HOME is set
type: behaviour
_______________________________________
Jython tracker <re...@bu...>
<http://bugs.jython.org/issue2569>
_______________________________________
|