1897 - the economic, naval, and military balance is 10-1 in the US favor
Worth noting is that (again, according to Bairoch via Kennedy) the US industrial potential in 1900 was 127.8 (relative to UK in 1900 as 100); Japan's was 13.
So, 10-1. Think about that, for a moment.
In an 1897 naval war in the Pacific that focuses on Hawaii, the naval balance in terms of modern (post 1880) ships is pretty much all in the US favor. Here's the breakdown in capital ships, for example:
US: 5 + 1 (Iowa commissioned in 1897)
3 Indiana, Massachusetts, Oregon (Oregon commissioned in 1896; worth noting is the fact she was built in San Francisco)
1 Maine
1 Texas
Japan: 1 + 2 (Fuji and Yashima commissioned in 1897, but being UK-built, neutraility issues come into place; they will probably be commissioned into the RN)
1 Chin' En (ex-Chinese Chen Yuan; unclear when she re-commissioned in the IJN)
The ratios in cruisers (armored and protected), coast defense ships, torpedo craft, etc. are similar; as are the two merchant marines.
Warship tonnages (from Kennedy) were 240,000 vs. 41,000 in 1890, 333,000 to 187,000 in 1900. Japan had far more regular troops than the US (84,000 vs 39,000 in 1890, for example), but given Japan's strategic situation, that's not really surprising. The US was able to mobilize a significant force (250,000 men, including the regulars and the volunteers, both federal and state) in 1898, so that's not really insurmountable. According to the 1895-96 state AG's report, the California Militia alone numbered some 4,700 men, plus another 500 student cadets at Cal, and included a naval militia battalion, complete with the monitor Camanche as a training ship for harbor defense duties.
Realistically, the US could put what we would consider an infantry brigade into Oahu in the space of a month, with as many more troops as anyone would desire to follow, as the Guam and Phillipines expeditions in 1898 make clear; Oregon's passage in 1898 shows the Cape Horn route was eminently practical for ships transiting from the Atlantic to the Pacific and vice versa.
All in all, the Japanese have no chance in a war with the US in 1897.
Of course, they didn't have a chance in 1941, and it didn't stop them then, either...
The interesting question is what does an "early" defeat of the Japanese (in the Nineteenth Century, no less) auger for the Pacific balance of power in the Twentieth Century?
A revanchist Japan that goes all in on the Asian mainland? A democratic Japan that joins the West all in by 1900, rather than 1950?
Interesting possibilities there.
Best,