Shashika
Shashika

Reputation: 1636

Where put server,client files in apache thrift

I'm new to the apache thrift. I've successfully installed apache thrift to the machine. Then I wrote a thrift file.

typedef i64 long
typedef i32 int
service ArithmeticService { 
            long add(1:int num1, 2:int num2),
}

Then I used thrift --gen java file_name.thrift to generate Service file. It was created under gen-java directory. Then I have no idea where(the directory) I put my server, client java files. I tried in various places but that files cannot resolved thrift in-build things like TExcepetion , etc. So how can I solve this problem ?

Upvotes: 1

Views: 275

Answers (1)

JensG
JensG

Reputation: 13411

You structure your project exactly as you would do with any other Java project. Just make sure the generated files and the Thrift library are included into your project. A very recommended place to start is the Apache Thrift Java tutorial, which also includes an ant file.

Upvotes: 0

Related Questions