I built my PC myself for the first time and for a year it ran flawlessly, but out of nowhere anytime I try to launch any app that uses java, such as Minecraft, I get a Java Virtual Machine Launcher Error that says:
Error: Could not create the Java Virtual Machine.
Error: A Fatal exception has occurred. Program will exit.
I have spent countless hours trying to fix it and I am stumped. I've tried using the java uninstaller to uninstall everything and reinstall the JDK Development Kit 22.0.2, and that didn't work. I watched a super in-depth video to make sure I set up the jdk 22 properly and it still didn't change anything. I've gone into the environment variables and tried everything that the 8 different Java virtual machine fix tutorials I watched told me to do, and still nothing has worked.
I have a ryzen 7 3700x paired to an asus x570-plus motherboard with 32GB of ram, a RTX 3060 ti and I'm running Windows 11 Home.
I'm fairly inexperienced when it comes to the nitty gritty computer stuff like this, so if anyone has any tips to fix this it would be greatly appreciated.