I've studied both, and I would learn Chinese first. Because written Chinese is almost a "subset" of Japanese, it's easier to learn Chinese first, because you don't have to "unlearn" any of it when studying Japanese
Essentially "all" of written Chinese has an equivalent in Japanese. Put another way, most of the written Chinese languages "maps" to a subset of Japanese. Essentially all Kanji characters are Chinese based.
The reverse is not true, because Japanese has significant "indigenous" (non-Chinese) based strains (katakana, hiragana) characters. This might confuse you if you studied this first, and then learned Chinese.
It's like saying that English has both a "latin" (French related) strain and a German strain. I'd learn French first, then French-based English words such as "chair" and later German-based equivalents such as "stool."