In case if the Japanese don't know how to develop a nuclear bombs, let just presume Japanese hired foreign scientist. Possibly even the same scientists that Hitler persecute them in our timeline.
- Also in case if Japan doesn't have enough uranium to develop, let say China has loads of undiscovered uranium underneath and the Japanese Imperial military will be the first people to discover.
Japan had at that time a number of high-profile nuclear physicists. What they did not have is the infrastructure and the resources that would allow them to go the entire way from lab scale experiments and theories to the industrial infrastructure required to even find out whether it was practically possible. Manhattan Project has made any subsequent nuclear weapons programme so much easier by simply showing which development pathways can lead to success and which are dead end; none of the other war participants hat the necessary spare resources during the wartime.
If on the other hand USA, or the British Empire, somehow initiated a Manhattan Project equivalent in peacetime, resulting in a first test in e.g. 1938, most likely Germany/Soviet Union/Japan would be able to follow within 4-5 years.