For his challenge to colonialism Sukarno spent two years in a Dutch jail (1929–31) in Bandung and more than eight years in exile (1933–42) on Flores and Sumatra. When the Japanese invaded the Indies in March 1942, he welcomed them as personal and national liberators. During World War II the Japanese made Sukarno their chief adviser and propagandist and their recruiter for labourers, soldiers, and prostitutes.