A nation's territorial waters should be protected from others. The foreign fishing boats obviously broke laws and should be punished. I believe Jakarta did the punishment after giving warning repeatedly.
I don't think Japanese government could do the same if it happens in Japanese territorial waters. But I think every countries have to obey the laws, therefore Tokyo should apply Japanese law on that issue even if Chinese vessels break into Japanese territory and do the illegal things.