I would suggest you to rebuild the project and share where have you put the --enable-preview arg. Looks like you have misplaced it and IntelliJ assumes '--enable-preview' as a class that does not exist.