Reputation: 3345
I am new user with java and finally got my code to work and tried transporting it to a remote machine as a jar to run and started getting the following error:
com.microsoft.sqlserver.jdbc.SQLServerConnection <init> SEVERE: Java Runtime Environment
(JRE) version 1.8 is not supported by this driver. Use the sqljdbc4.jar class library,
which provides support for JDBC 4.0.java.lang.UnsupportedOperationException:
Java Runtime Environment (JRE) version 1.8 is not supported by this driver. Use
the sqljdbc4.jar class library, which provides support for JDBC 4.0.
at com.microsoft.sqlserver.jdbc.SQLServerConnection.<init>
(SQLServerConn
I updated the driver in the build path and still does not work. It runs fine on my desktop so not sure what the issue is. Please advise as to what is the best approach here.
EDIT:
The snapshot I posted above shows 1.8 but i have tried it on several 1.7 machine versions.
and also connection code
String dataConnectionUrl = "jdbc:sqlserver://192.xxx.x.xxx:1433;" +
"databaseName=clientsDB;user=me;password=notyou";
Upvotes: 2
Views: 19900
Reputation: 123474
Microsoft JDBC Driver 4.0 for SQL Server (sqljdbc4.jar), available via the download link on the page here, is indeed compatible with both JRE 7 and JRE 8. I just confirmed Java 8 compatibility on an Xubuntu 14.04 box with
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
Upvotes: 2