I am using IntelliJ IDEA compiler for Java programming on my MacBook Pro 2015 Retina (Yosemite). When I run some Java program in my activity monitor appears Java process and takes 100+% of CPU. The fans start to run loud since it's starting to heat up. Sometimes there are 5 and more same Java processes and couple of them are using 100%. Those processes are turned off when I quit IntelliJ or when I quit them manually.
Can somebody tell me why is this happening, or how to fix this if it is possible to fix?