I’ve integrated a Commodore 64 emulator to IntelliJ IDEA and other JetBrains IDE’s such as Android Studio or PyCharm using the Applet Runner plug-in.
It can also load .prg files.
To run it, download the free Applet Runner plugin from JetBrains marketplace and execute the applet located at https://www.japplis.com/applet-runner/c64/c64-emulator.html.