a86
a86

Reputation: 119

Unable to get Jython working on Mac

Installed Jython from the installer.

Set the Path as follows /Users/user/jython2.7.0/bin.

When tried to run Jython, received the following error.

MacBook-Pro:~ user$ jython
Traceback (most recent call last):
  File "/Users/user/jython2.7.0/bin/jython", line 444, in <module>
    main(sys.argv)
  File "/Users/user/jython2.7.0/bin/jython", line 431, in main
    os.execvp(command[0], command[1:])
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 346, in execvp
_execvpe(file, args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 370, in _execvpe
   func(file, *argrest)
OSError: [Errno 2] No such file or directory

Tried uninstalling other packages installed through Homebrew. But nothing positive.

Jython runs with the command java -jar jython.jar from the installation directory.

Tried running on a clean Macbook, everything runs fine.

Upvotes: 2

Views: 635

Answers (1)

a86
a86

Reputation: 119

Resolved the problem by pointing JAVA_HOME to jdk1.8.0_131 rather than jdk9.0.4. Not sure why this solution works.

Upvotes: 1

Related Questions