Java moss does exceptionally well if tied up with driftwood or a stone. Nylon fishing line or simple cotton thread can be used for this purpose. I generally use cotton threads as I find them easy to handle. Within few days they will be attached to the stone or the driftwood and then you can carefully remove the thread that you have used to tie it up. To avoid the risk of the Java moss getting separated from the wood or the stone, I would suggest not removing the threads even in next few months. Good quality cotton thread or nylon thread might not harm your tank inhabitants or change the water quality. In some countries, you will get aquarium friendly, bio-degradable threads exclusively for being used in fish tank and aquariums. I never got it in the pet shops here in India. I guess they would the ideal for this purpose. Use black threads, if you are using cotton thread so that would be less visible. Nylon threads will be anyway transparent, so you need not worry about the color.