Can't find sun.jdbc.odbc package in Java version 8 I am trying to connect a database query to my class while I compile the package name sun.jdbc.odbc package but it is not found in Java version 8.
Oracle has mentioned related to this in the Tec documents 


  JDBC-ODBC Bridge The JDBC-ODBC Bridge allows applications written in
  the Java programming language to use the JDBC API with many existing
  ODBC drivers. The Bridge is itself a driver based on JDBC technology
  ("JDBC driver") that is defined in the class
  sun.jdbc.odbc.JdbcOdbcDriver. The Bridge defines the JDBC sub-protocol
  odbc.


And I think this is the reason why its not found in the Java version 8


  Status of the JDBC-ODBC Bridge The JDBC-ODBC Bridge should be
  considered a transitional solution; it will be removed in JDK 8. In
  addition, Oracle does not support the JDBC-ODBC Bridge. Oracle
  recommends that you use JDBC drivers provided by the vendor of your
  database instead of the JDBC-ODBC Bridge.


Source where the information was found TechNotes,Lance Andersen's Blog Removal of the JDBC-ODBC Bridge from Java SE 8 JDK

I suggest you try the following solutions 


Use a third-party database driver
Use a previous version of java