made java examples standalone