When I read Blavius's answer, I was greatly astonished there are so many same characters with different stroke order between ones in Japan and China.
Just before that, I was preparing an answer where I wrote there was no substantial difference between the two.
I'll show my preparatory answer later on for mere reference.
I searched for the Chinese characters with the different stroke order from that of equivalent Japanese kanjis on the Internet. What I searched are the Chinese characters written as top 180 frequently used ones, and I found some characters with different stroke order as follows.
To my regret for some of them of Japanese kanjis I couldn't find the actual stroke videos.
Not for all, but in most cases in Japanese, the vertical stroke is written before the last two horizontal strokes. In Chinese, it's written as if the middle part were 土 as is written in Blavius's answer.
Japanese 生, Chinese 生
Japanese 睡, Chinese 睡
Japanese 住, Chinese 住
Japanese 里, Chinese 里
Chinese 出
Japanese 国, Chinese 国
Chinese 星
For mere reference:
Here is an article about the stroke order of a Chinese character (or Chinese derivative character including Japanese kanji).
In this article there is a description as: Minor variations exist between countries, but the basic principles remain the same, namely that writing characters should be economical, with the fewest hand movements to write the most strokes possible.
I agree this explanation about the stroke order, and I would add another explanation to it as: basically any Japanese kanji might have the same stroke order as that of Chinese character, because the stroke order has been maintained for many years by the art of calligraphy between the countries.
We write kanjis not only to convey or record information but also to express beauty of them as art materials. We practice their writing for a long time by using instruction copies and/or by instructors in order to be skillful in writing them beautifully.
In this process, you can't change the stroke order for each kanji even if you learn it in Japan or in China with some exceptions.
And very importantly, as for the variations of the stroke order of each kanji, it depends on mainly what kind of script you mastered in the learning process, aside from the misunderstanding of the stroke order.
As for the kinds of script, there are mainly three: regular script, semi-cursive script and cursive script.
Regular script is most common in modern writings and publications, and when you talk about the stroke order including this question and answer we put this regular script as a base.
Cursive script is faster to write than other styles, but difficult to read for those unfamiliar with it. It functions primarily as a kind of shorthand script or calligraphic style. People who can read standard or printed forms of Chinese characters and Japanese kanjis may not be able to comprehend this script. In this script they often use a dynamic method by omitting some strokes and/or changing the stroke order of regular script to be convenient for faster writing.
Semi-cursive script is a cursive style of Chinese characters and Japanese kanjis. Because it is not as abbreviated as cursive, most people who can read regular script can read semi-cursive. It is highly useful and also artistic. And, when a person writes in semi-cursive script, he/she sometimes writes with a different script order from regular script which is affected by the stroke order of cursive script. The more skillful in handwriting he/she may be the more often the confusions of stroke order may occur.