Java-Thrift running demo

Source: Internet
Author: User

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 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.