I apologize if I misunderstood your question, but if you mean you want to kill all of the java moss, putting a black plastic over the water won't do it. Java moss can survive and still grow in almost pitch black.
I don't know what chemical will kill the moss though. Hope someone will chime in. :P