Cannot open Java things, even though I have java installed
I am on a laptop with an Apple M1 Chip if that's important. I'm on OS version Sonoma 14.2.1 as well, but updating my OS hasn't helped in the past.
This has been a problem that has plagued me for literal months. I haven't been able to run ANY Java apps except Minecraft since about September 2023, I think? However, I've installed Java multiple times since Java quit working. Please also note that I cannot code in Java, and these aren't my apps!
I have 2 applications/files I use sometimes that require Java. What they are isn't important here, I think, but since one of them is an actual application and the other is a .jar file I have to open through Terminal, they give me different answers.
For the application, whenever I try and open it, it pops this up:When I click "OK" it just closes.
For the .jar file, after opening a terminal to the folder it's in and trying to run it with
java -jar FileName.jar
It shows this:
Error: Could not find or load main class com.filename.main.Main
Caused by: java.lang.NoClassDefFoundError: javafx/application/Application
Filename isn't the actual name of the file but I don't think it's important here. I don't know what any of this means. I literally have Java installed on my system, but these apps can't locate the JRE. I don't know what happened. Please help
I should also note/restate that I haven't tried anything besides just reinstalling Java, because I do not know ANY java.
MacBook Air 13″