Java fern, nobody eats it. In my pond with goldfish, I keep Anacharis, hornwort, and a couple types of Saggitaria and Valiseneria. Now, I'm not certain if the fish just cannot keep up with the growth of the plants, or they just nibble a little bit. Either way, those plants thrive out there. It may be a different story in an aquarium.
Also, I feed my goldfish in the pond duckweed from my aquariums at least 2-3 times a week from late spring to early fall, so maybe that's enough vegetation for them, can't say for sure. No question at all, my goldfish do love to eat duckweed, throw it in the pond, it's like a piranha feeding frenzy, vegan-style!