The war of words escalated Thursday, when Japanese police said they were investigating whether Chinese hackers might be linked to an attack that disabled police and defense Web sites for a short time earlier this week.
Chinese Foreign Ministry spokesman Qin Gang denied any government connection.
"The hackers' behavior violates cyberspace ethics. The Chinese government consistently opposes this unethical behavior," the spokesman said.
Japanese officials sought to ease tensions Thursday, saying the two sides needed to hold discussions to resolve their differences over various issues, which also include a territorial dispute.
Tokyo was responding to a protest earlier Thursday by the Chinese government over possible Japanese plans to drill for gas in a part of the East China Sea that China also claims. Japan on Wednesday said it would start reviewing applications by Japanese companies that want to explore the area's natural gas fields.
The animosity of recent days has been triggered in large part by publication in Japan of two new textbooks. Critics in China and elsewhere say the books downplay atrocities committed by Japanese troops during Japan's occupation of China in the 1930s and '40s.
Violent protests broke out in several Chinese cities over the past week, and protesters called for boycotts of Japanese products. Three Japanese students were beaten in Shanghai.
Chinese officials this week several times repeated Beijing's long-standing suggestion that Japan be denied a permanent seat on the U.N. Security Council until it takes full responsibility for its wartime record.