java - Apache and Thrift installed but Netbeans can't see import org.apache.thrift -


i'm using archlinux both thrift 0.9.3 , apache installed. in netbeans project, when import org.apache.thrift.*; got "package org.apache.thrift not exist". this answer didn't solved problem because got not /lib/java folder neither other answer. until moment couldn't find answer on internet. in advance.

you need libthrift jar file in order use java code generated thrift compiler.

if project set able use maven repositories, can add artifact project:

<dependency>     <groupid>org.apache.thrift</groupid>     <artifactid>libthrift</artifactid>     <version>0.9.3</version> </dependency> 

alternatively download jar file maven central , add project:

http://central.maven.org/maven2/org/apache/thrift/libthrift/0.9.3/libthrift-0.9.3.jar

also important note version of jar use should match version of thrift compiler use code generation; if upgrade thrift compiler used project, should upgrade version of jar file well.


Comments

Popular posts from this blog

sql server - Cannot query correctly (MSSQL - PHP - JSON) -

php - trouble displaying mysqli database results in correct order -

C++ Linked List -