Fabiotk Fabiotk - 1 year ago 97
Apache Configuration Question

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

I'm using Archlinux with both Thrift 0.9.3 and Apache installed. In my Netbeans project, when I

import org.apache.thrift.*;
I got "package org.apache.thrift does not exist". This answer didn't solved the problem because I got not
folder neither the other answer. Until the moment I couldn't find an answer on the internet. Thanks in advance.

Answer Source

You need the libthrift JAR file in order to use java code generated by the Thrift compiler.

If your project is set up to be able to use Maven repositories, you can add this artifact to your project:


Alternatively you could just download the JAR file from Maven central and add it to your project:


Also important to note is that the version of the JAR you use should match the version of the Thrift compiler that you use for code generation; so if you upgrade the Thrift compiler used for your project, you should upgrade the version of the JAR file as well.