Read through ~ /Thrift-0.8.0/tutorial/Java/readme, you need to installAnt,This is a Java compilation and Deployment Tool, similar to make in C
SudoApt-GetInstallAnt
Warning: 'includeantruntime' was not set, defaulting to build. sysclasspath = last; set to false for Repeatable builds. The online solution says you need to modify build. XMLJavac NodeAdd attributeIncludeantruntime= "On"
< Target Name = "Compile" Depends = "Init" > < Javac Srcdir = "$ {Gen }" Destdir = "$ {Build }" Classpathref = "Libs. classpath" Includeantruntime = "On" /> < Javac Srcdir = "$ {SRC }" Destdir = "$ {Build }" Classpathref = "Build. classpath" Includeantruntime = "On" /> </ Target >
Then execute the ant command,Error MessageThere is no thrift-0.8.0/lib/Java/build/directory, so there is a thrift-0.8.0/lib/Java/directory, so CD came in and found there is a ReadMe file, it says you need to execute the ant command in this directory.
Cd ~ /Thrift-0.8.0/Lib/Java/Ant
During command execution, a jar file is downloaded from an external website. After a while, the Thrift-0.8.0/lib/Java/build/directory is generated, generate a heap of library files in the directory and return ~ /Thrift-0.8.0/tutorial/Java/run the ant command again to generate a build directory.
Cd ~ /Thrift- 0.8 . 0 /tutorial/ javaant. / assumerver # Start the Java Server to listen to port 9090 CD ~ /Thrift- 0.8 . 0 /tutorial/ py. /pythonclient. PY # Open another shell window and use the python client to communicate with the Java server