It really doesnt make a difference either way. I would generally say before for two reasons-
1. The fish will already be stressed when you add them and planting after they are in will only add to that. Also plants will make them feel more comfortable. Some like to hide under leaves etc.
2. Plants will take in
ammonia so if your cycle has any fluctations after adding the fish the plants might be able to stop a mini cycle.
As far as Java ferns go the best way is to tie it onto a rock. If you do plant it just be sure not to plant it very deep or it will kill it and foul your water.