Sketch Crashes Right After Start (Windows 11)

Guys, I have an issue here.

Whenever I start any kind of code, it will crash immediately and put this message:
Could not run the sketch (Target VM failed to initialize).
For more information, read Help → Troubleshooting.

I tried to downgrade my NVIDIA driver and also using only iGPU, but they didn’t work.

I had solved this issue before by using an older version of Processing, but recently it started crashing again. By the way, when I export to an exe, it can run normally without crashing.

Has any of you encountered the same issue and found a solution?

I will be so grateful if you can see this topic and give me a response.

My Coding Environment:

Hardware Configuration

  • CPU: 13th Gen Intel(R) Core™ i7-13700HX @ 2.10 GHz

  • CPU Cores: 16 Cores, 24 Logical Processors

  • GPU: NVIDIA GeForce RTX 4060 Laptop GPU

  • GPU Core Clock: 615 MHz

  • GPU Memory Clock: 810 MHz

Software Environment

  • Java Version: 1.8.0_513-b04

  • Processing Version: 4.5.7 (I eventually changed it back to the newest version)