Java ferns need at least six hours of light each day. However, your Java fern shouldn’t get more than 12 hours of light each day.
Too much light will help algae grow, to the point that it might take over the tank. If this happens, the algae will take the nutrients that your Java fern needs.
In order to give your Java fern the right amount of light, invest in a light timer for your tank.
Also, Java fern only needs low to moderate lighting intensity. Intense light might burn its leaves and result in brown or transparent spots all over the fern.
As a general rule, Java fern only requires 1.5-2 watts of light for each gallon of water. Choose soft fluorescent bulbs or smaller incandescent ones to reduce the overall brightness.