Java fern just has ugly roots, really. They always look brown and dead.
I thought some diagrams might help (really, I was just bored and wanted to draw something).
View attachment 1130111
You can bury them in the substrate, you just need to bury them like this:
View attachment 1130112
And NOT like this:
View attachment 1130113
Most people just prefer to tie them to rocks/driftwood because it makes it a bit easier to keep them anchored, but in my experience, they do grow a bit better when they have their roots in the substrate.