Police tried to stop the demonstrations from spreading to the capital Jakarta by blocking factory workers who planned to take part.