| Todd Lipcon | 4abfb28 | 2010-09-28 00:01:31 +0000 | [diff] [blame] | 1 | Steps for Java tutorial | 
|  | 2 | ================================================== | 
|  | 3 |  | 
|  | 4 | 1) Make sure thrift is compiled, both the compiler and the Java library. You should | 
|  | 5 | be able to verify the following: | 
|  | 6 |  | 
| Jake Farrell | 9623fc5 | 2011-07-25 13:22:14 +0000 | [diff] [blame] | 7 | thrift/tutorial/java$ file ../../lib/java/build/libthrift-${version}-${release}.jar | 
| Todd Lipcon | 4abfb28 | 2010-09-28 00:01:31 +0000 | [diff] [blame] | 8 | ../../lib/java/libthrift.jar: Zip archive data, at least v1.0 to extract | 
|  | 9 |  | 
|  | 10 | thrift/tutorial/java$ file ../../compiler/cpp/thrift | 
|  | 11 | ../../compiler/cpp/thrift: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, not stripped | 
|  | 12 |  | 
|  | 13 | thrift/tutorial/java$ ls ../../lib/java/build/ivy/lib/ | 
|  | 14 | commons-lang-2.5.jar  junit-4.4.jar  servlet-api-2.5.jar  slf4j-api-1.5.8.jar  slf4j-simple-1.5.8.jar | 
|  | 15 |  | 
|  | 16 |  | 
|  | 17 | 2) Generate code for java: | 
|  | 18 |  | 
|  | 19 | thrift/tutorial/java$ cd .. | 
|  | 20 | thrift/tutorial$ thrift -r -gen java tutorial.thrift | 
|  | 21 |  | 
|  | 22 | 3) Compile example | 
|  | 23 |  | 
|  | 24 | thrift/tutorial/java$ ant | 
|  | 25 |  | 
|  | 26 | 4) Run example: | 
|  | 27 |  | 
|  | 28 | thrift/tutorial/java$ ./JavaServer & | 
|  | 29 | thrift/tutorial/java$ ./JavaClient |