Im not really seeing a lot wrong with your java fern. Maybe if you could get a closer, clearer photo of what you are concerned about.
Black spots can be the nodes where new plantlets come from, which is how java fern propogates.
Black patches are often caused by too much light. Maybe move the plant somewhere with a bit of shade. It can also be nutrient deficiency. Are you dosing any fertiliser?