How to set environment variables for Jython?

I set the JYTHON_HOME variables to the directory where I installed Jython and JYTHON_PATH in the bin folder, but when I try to start jython, I still get the following error:

 'jython' is not recognized as an internal or external command, operable program or batch file. 

Why am I getting this error? Java installation has no problems.

+4
source share
1 answer

You still need to add the path to the jython.bat executable to the PATH environment variable. Here, as an example, I provide my ini-jython.bat, which I use before executing my jython project (in this case, the Django on Jython project, you can safely ignore the Django stuff or adapt it to your needs):

 set JYTHON_HOME=c:\tools\jython2.5.2 set PATH=%JYTHON_HOME%\bin;%PATH% set CLASSPATH=dep1;dep1/lib/*;_lib/* set JYTHONPATH=.;..\django-debug-toolbar;..\django-common set DJANGO_SETTINGS_MODULE=site_projname.settings set PYTHONPATH=%JYTHONPATH% set manage=jython c:\tools\jython2.5.2\bin\django-admin.py set makemessages=django-admin makemessages --extension html,py set compilemessages=django-admin compilemessages 
+5
source

Source: https://habr.com/ru/post/1381442/


All Articles