Java version of CBForest