Rescuers searched a damaged factory in western Java as authorities investigated the cause of the blaze.