The US pushed Japan into a corner, and had a pretty good idea of what to expect.  FDR cut off their supply of scrap iron, which was vital for Japan's military/war effort. A pretty safe political stance.  Then he cut off oil shipments from the US to Japan, which left them with less than a year's worth.  That put them into a desperate situation just to survive.  So then they went after Java.