Prime Minister Shinzo Abe said Thursday his visit to the controversial Yasukuni war shrine was a pledge that Japan would not go to war again.