I am trying to run a .jar that was complied by intellij with preview features in java 14.
I am now trying to run the .jar on a server with java 14.
Error: LinkageError occurred while loading main class com.wickedstacks.agenda.AgendaRestApp
java.lang.UnsupportedClassVersionError: Preview features are not enabled for com/wickedstacks/agenda/AgendaRestApp (class file version 58.65535). Try running with '--enable-preview'
What is the correct way to enable preview features at runtime?
java -jar agenda/agenda-rest-1.0.1.jar
gives the above error
java -jar agenda/agenda-rest-1.0.1.jar --enable-preview
This would make sense but does nothing
java --enable-preview [app]
I dont understand this, how do i provide the app when the main class is in a .jar?