The headline Nikkei-225 index at the Tokyo Stock Exchange closed up 18.83 points at 9,816.09, the highest finish since May 11. The Topix index of all first-section issues gained 0.61 percent, or 5.11 points, to 849.22.
The market opened higher as exporters benefited from yen weakness against the euro after the Greek parliament approved an unpopular austerity plan that will unlock billions of dollars to help Athens pay its huge debts.
Many had feared that a sovereign default could spread to other economies and lead to another global financial crisis.
But traders in Tokyo remain cautious ahead of the Bank of Japan's quarterly "tankan" survey of corporate sentiment as well as Chinese and US manufacturing data, all on Friday.
"Investor focus is shifting toward macroeconomic data from the United States and China," said Yumi Nishimura, senior market analyst at Daiwa Securities.
"In the extent that Japanese stocks have risen so rapidly in the past two days, we can expect a sharp correction if US (manufacturing) numbers turn out worse than expected," she told Dow Jones Newswires.
The Nikkei index has this week gained 2.5 percent from Monday's close as risk appetite grew and Greece concerns ease.
The weaker yen lifted exporters, with Sony up 3.01 percent at 2,117 yen and Ricoh gaining 1.71 percent to 889 yen.
The euro bought 116.53 yen in Tokyo afternoon trade, slightly down from 116.61 yen in New York late Wednesday but still up from the lower 116-yen range a day earlier.
Utilities outperformed other sectors as Japanese media reported that the major of Genkai, in southern Japan, was ready to allow the resumption of
operations at a nuclear power plant in the town.
The move raised expectations that more reactors halted for regular checks after the March 11 quake and tsunami - which crippled a plant in Fukushima - will restart despite a wave of anti-nuclear sentiment.
Kyushu Electric Power, which operates the Genkai plant, shot up 4.17 percent to 1,447 yen while Tokyo Electric Power, the operator of the Fukushima plant at the centre of a nuclear emergency, was up 0.30 percent at 326 yen.
Banks also rose, with Mitsubishi UFJ Financial up 2.09 percent at 390 yen and Mizuho Financial up 0.76 percent at 132.
Copyright AFP (Agence France-Presse), 2011