This might be helpful for your visit in Java, and Indonesia in general:
Javanese and most of Indonesian shake hands when meeting or introducing themselves. Use right hand to hand shake, and usually they will put their hand on to the chest after shaking hand. Indonesian moslem women shake hands with men, but few sects they dont shake hands with men. So be careful, do not offer you hand unless the woman offer hers first.
Please use right hand to give, to point, to accept anything to or from Indonesian. Left hand is considered to be impolite. When you are involving in a conversation, or asking information, do not put your hands on your hip, as it is rude in Indonesian culture. Pointing with index finger is considered as impolite as well. Indonesian pointing with their hand.
When meeting or having eye contact with Indonesian, smile and nod or bow a bit. Indonesian is very friendly and visitors are expected to be friendly as well. When you enter village, address them with Selamat Pagi (Good Morning), Selamat Siang (Good Afternoon) or Selamat Malam (Good Evening). If you are willing to take picture of the locals, ask them first. “Boleh?” and usually they will say yes. If passing people working, saying “Permisi” is appreciated.
The majority of Indonesian is moslem, and they are very decent in dressing. So visitors better respect this and dress conservatively. Especially if you enter village, it is suggested to avoid wearing mini dress, or hot pants.
When entering tourist attraction or bus terminal, usually there will be many people offering their becak, taxi, food and the like. Visitors can say “Tidak” to them and if you know local language will be better. In Central Java and East Java, you can say “Mboten”, a NO in refined Javanese word.
Few Indonesian take off shoes or sandals in their house. And sit decently, and do not show soles of your feet to anyone. When entering mosque, people should take off their shoes and sandals, and wearing long sleeves covering their arms and for women they wear veil covering their hair.
Homosexuality is considered as something not common in Indonesia. In big cities like Jakarta, Denpasar or Surabaya maybe homosexuality is not that a problem, but in village or smaller cities, not showing affection in public, even for couple. Locals will not show how impolite those people for them, but you will get a strange look.