Error: java heap space

when i try to make coregsitration, it has an error: java heap space,
after querying I want to close snap, but all the close buttons don’t work.
because I’m using ubuntu for the first time, I want to ask everyone how to close the software in this case?

You can stop/kill the process using the System Monitor software.

Thanks for your answer.
I’ve chosen xkill to solve this problem.