natural / java2python

Simple but effective library to translate Java source code to Python.
GNU Lesser General Public License v2.1
564 stars 243 forks source link

java2python #36

Open suresh40 opened 9 years ago

suresh40 commented 9 years ago

after execution of "python setup.py install" , i tried to execute j2py -- version

I am getting j2py is not recognised as internal or external command

bcarroll commented 8 years ago

Make sure the python scripts directory is in your PATH environment variable. If you are on Windows, you might need to add .py to the j2py script for the OS to know it is a Python script. .. or to be safe, make a copy of the j2py script.

Here is my setup on Windows 7: set PATH=%PATH%;C:\Python27\Scripts

copy c:\Python27\Scripts\j2py c:\Python27\Scripts\j2py.py

tusharsinghalrocks commented 7 years ago

even after doing this still getting error

image

samarth-29 commented 6 years ago

i am also getting the same error even after I copied j2py.py

lion9 commented 6 years ago

File "C:\java2python\bin\j2py.py", line 113 except (IOError, ), exc:

what may be the error?

maifeeulasad commented 5 years ago

Maybe the problem is , we have installed python and libraries at different PATH So, In the command prompt type "where python" first : so It will tell you , where your python is . Now instead of C:\Python27\Scripts , you can just write python_path_without_exe and followed by Scripts See these for better understanding : so1 so2

This worked for me. ধন্যবাদ ।

phs-sakshi commented 4 years ago

even after this I am getting the same error. j2py is not recognized as an internal or external command. Can you please help me out?

maifeeulasad commented 4 years ago

@B417037 we need more details, is python declared in path? How many version are you using at once ? etc.

MinaTahaei commented 3 years ago

@B417037 we need more details, is python declared in path? How many versions are you using at once? etc.

I get the same error too. python is in my path, I only have 1 version but I still get this error

phs-sakshi commented 3 years ago

@B417037 we need more details, is python declared in path? How many version are you using at once ? etc.

Yes, python is declared in the path. I am only using 1 version of python (python 2 as it does not work for python 3).

me0wstic commented 3 years ago

i'm getting the same error as well. python is declared in my path.

C:\Python27\Scripts>j2py --version 'j2py' is not recognized as an internal or external command, operable program or batch file.

raul-parada commented 3 years ago

Did you solve this?

maifeeulasad commented 3 years ago

I don't have a Windows machine right now else I would make a video.

But you guys should follow this : https://www.computerhope.com/issues/ch000549.htm

In Windows you have to set the path variable. Then it'll work.