Hi saber hattay,
When I run the command : thrift -r --gen js tutorial.thrift
from this folder, the bash shell return command not found.
With *nix shells you have to put an explicit ./ in front:
./thrift -gen js whatever.thrift.
The shell does not look up the current folder when searching for
executables, so you have to tell that the program is located in the current
folder.
And from a command Dos, the shell return "could not opend input file
D:/..../tutorial.thrift".
Because any program looks for the file in the current working directory
(CWD), if no explicit path is given.
Example: If the file myfile.thrift file is located under C:\Foo and
thrift.exe is located under D:\Bar, you could do this:
c:
cd \foo
d:\bar\thrift -gen js myfile.thrift
alternatively
d:
cd \bar
thrift -gen js c:\foo\myfile.thrift
or the one-liner
d:\bar\thrift -gen js c:\foo\myfile.thrift
Helpful links:
- http://www.computerhope.com/issues/chusedos.htm
-
http://askubuntu.com/questions/320632/why-do-i-need-to-type-before-executing-a-program-in-the-current-directory
Have fun,
JensG