Google the thread subject should return many tutorials as this is a basic application for OpenCV. The jOpenCV lib for B4J is encapsulated very well so conversion from the example to B4J line by line should be straight.
Basically:
convert image colorspace from RGB to HSV
mark every pixel in range of target color by upper/lower thresholds as 1 and all others 0
do erosion/dilation of image to fill the holes at area marked with 1, in case of noises (optional)
do connect component labelling (findcontours) to get the area and its center