This question has been asked and answered several times here. Please search this Forum for "netbeans" and come back here if you don't find a satisfactory answer.
In general, CPLEX is set up like any other 3rd party library. The CPLEX installation comes with a file called c_cpp.html that has instructions for setting up things in Visual Studio. For building from a different IDE you need the same include paths, the same linker paths and the same libraries. How to setup this stuff should be described in the manual of the respective IDE.
#CPLEXOptimizers#DecisionOptimization