During the British occupation of Java, rumors of plans by the Javanese court to stage a rebellion caused uneasiness among the colonial authorities.
In 1942 the Japanese Empire invaded Dutch East Indies and ruled Java until they were defeated in 1945.