thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jens Geyer" <>
Subject RE: "program not found" and "could not open input file" (was: THRIFT-2800)
Date Fri, 05 Dec 2014 19:17:10 GMT
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 

> 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:

    cd \foo
    d:\bar\thrift -gen js myfile.thrift


    cd \bar
    thrift -gen js c:\foo\myfile.thrift

or the one-liner

    d:\bar\thrift -gen js c:\foo\myfile.thrift

Helpful links:

Have fun,

View raw message