The benchmark Nikkei 225 index gained 33.74 points, or 0.24 percent, to 14,012.20.
"The market closed higher following yesterday's rise on Wall Street, while a fall in oil prices prompted some buying," said Tsuyoshi Segawa, a strategist at Shinko Securities Co. Ltd.
The July crude contract on the New York Mercantile Exchange hit a record over $135 a barrel on Thursday before later falling back around $4. In electronic trading, the July crude oil contract on Nymex was around $131.80 a barrel midafternoon in Singapore.
But some stock investors were cautious as they expected the dip in oil prices to be temporary, Segawa said.
Among gainers, major drug maker Chugai Pharmaceutical Co. Ltd. rose 2.8 percent to 1,640 yen after Swiss pharmaceutical firm Roche Holding AG said it would boost its stake in the Japanese company to 59.9 percent from 50.1 percent.
Sony Corp. rose 0.2 percent to 5,040 yen. Hitachi Ltd. gained 1.5 percent to 719 yen.
The Topix index of all issues on the Tokyo Stock Exchange First Section lost 0.2 percent to 1,376.69.
In currency trading, the dollar was quoted at 104.06 yen midafternoon in Tokyo, down from 104.14 yen late Thursday in New York. The euro stood at $1.5738, compared with $1.5724 in New York.