Hmmmm.
Java fern attached to rocks or wood? Java moss maybe?
Not many fish eat java fern(scats do)so he wouldn't really eat it.Tie it to a rock or wood. I would be more concerned about him pulling the plant up. My Oscar also used to rearrange the decoration, gravel, and anything he liked.