Forum » Programiranje » Linux ter JDBC driver
Linux ter JDBC driver
boss-tech ::
Sem bolj nov na linux os in bi rad vzpostavil povezavo z mysql bazo... uporabljam javo, mysql sem že inštaliral, sedaj rabim samo še ta jdbc, vendar ne vem kako naj ga inštaliram oz nastavim:
Connection con = null;
try {
Class.forName("com.mysql.jdbc.Driver").newInstance();
con = DriverManager.getConnection("jdbc:mysql:///test",
"root", "secret");
if(!con.isClosed())
System.out.println("Successfully connected to " +
"MySQL server using TCP/IP...");
} catch(Exception e) {
System.err.println("Exception: " + e.getMessage());
} finally {
try {
if(con != null)
con.close();
} catch(SQLException e) {}
}
Dobim pa:
Exception: com.mysql.jdbc.Driver not found in gnu.gcj.runtime.SystemClassLoader...
KaRkY ::
Mislim da ti manka jdbc driver za mysql. Najdeš ga na tem linku
When you look long into an abyss, the abyss looks into you
Vredno ogleda ...
Tema | Ogledi | Zadnje sporočilo | |
---|---|---|---|
Tema | Ogledi | Zadnje sporočilo | |
» | Android+mySql težavaOddelek: Programiranje | 1196 (948) | abcd123 |
» | Netbeans + AccessOddelek: Programiranje | 723 (652) | Napoleon II |
» | Java - uvoz XML in izvoz v MySQL pomočOddelek: Programiranje | 2909 (2246) | igor0203 |
» | [JAVA] mysql-connector-java in povezava z MysqlOddelek: Programiranje | 2046 (1928) | Sergio |
» | java in zapis v podatkovno bazoOddelek: Programiranje | 2035 (1903) | jogurtTM |