My system is a Windows 10
I'm using java jdk 19 with no build tools
I'm trying to run a .jar file generated from my code using vscode "export jar" option, but double clicking the resulting file doesn't do anything.
Trying to run the file from the terminal returns this error
Error: LinkageError occurred while loading main class Aula3 java.lang.UnsupportedClassVersionError: Preview features are not enabled for Aula3 (class file version 63.65535). Try running with '--enable-preview'
I've looked all over the internet but no one seems to have an answer, I did find another post here about the same error, but the solution only says
SO basically I had to create a .bat file with java --enable-preview -jar .jar
this resolved my issue.
I don't know exactly what this means or how should I even begin to try it, and having made my account today I don't have enough reputation to ask him with a comment, so I was hoping someone else could shed a light on this for me.
Any help is appreciated as I've been trying to fix this for days now.
Also I've checked my path variables, they're set propperly, and tried updating java, both the jdk and jre (which left me with versions 19 and 1.8 respectively)