Good day. I myself am not a JAVA-developer, but I had to delve into the work of JAVA with a SQL-server. I installed IntelliJ IDEA, created a project, everything is as it should. Here is the code:
package test; import com.mysql.fabric.jdbc.FabricMySQLDriver; import java.sql.*; public class Main { private static final String URL = "jdbc:mysql://localhost:3306/mydb_test"; private static final String USERNAME = "root"; private static final String PASSWORD = "root"; public static void main(String[] args){ try { Driver driver = new FabricMySQLDriver(); DriverManager.registerDriver(driver); } catch (SQLException e) { e.printStackTrace(); } try(Connection connection = DriverManager.getConnection(URL, USERNAME, PASSWORD); Statement statement = connection.createStatement() ) { System.out.println(connection.isClosed()); } catch (SQLException e) { e.printStackTrace(); } } } } I start to compile, an incomprehensible error pops up
Error: java: invalid flag -release
Help me figure out what's wrong.
