As far as I know salt is always bad for plants. I made my mistake before to treat my fish without realizing I have planted tanks and 50% of my plants died including the java moss. We always think the first and safest solution to treat sick fish is salt.
I don't have any direct experience with java moss and dosing salt, but its listed on several websites as a recommendation for brackish aquariums. So I'd be inclined to say it'll be okay.