Quando executo minha aplicação teste o prompt me retorna:
D:\Arquivos de programas\Java\jdk1.5.0\bin\java.exe -classpath “D:\Arquivos de programas\Java\JayBird;D:\Arquivos de programas\Java\JayBird\firebirdjmx.jar;D:\Arquivos de programas\Java\JayBird\firebirdsql.jar;D:\Arquivos de programas\Java\JayBird\firebirdsql-full.jar;D:\Arquivos de programas\Java\JayBird\firebirdsql-pool.jar;C:\Projetos\Java\teste\Console\classes” lersql.LerSQL
Exception in thread “main” java.lang.UnsatisfiedLinkError: no jaybird in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
at java.lang.Runtime.loadLibrary0(Runtime.java:822)
at java.lang.System.loadLibrary(System.java:992)
at org.firebirdsql.ngds.GDS_Impl.<init>(GDS_Impl.java:59)
at org.firebirdsql.gds.GDSFactory.createGDSForType(GDSFactory.java:61)
at org.firebirdsql.gds.GDSFactory.getGDSForType(GDSFactory.java:48)
at org.firebirdsql.jca.FBManagedConnectionFactory.<init>(FBManagedConnectionFactory.java:127)
at org.firebirdsql.jdbc.FBDriver.connect(FBDriver.java:121)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at lersql.LerSQL.<init>(LerSQL.java:44)
at lersql.LerSQL.main(LerSQL.java:143)
Finished executing
Parte do meu código é:
public class LerSQL {
public LerSQL() {
final String CSDriver = “jdbc:firebirdsql:native:”;
final String CSServer = “192.168.0.254”;
final String CSPort = “/3050”;
final String CSPathBD = “:/mnt/hda4/dbsuporte/suporte.fb”;
final String CSSuperUser = “sysdba”;
final String CSPasswd = “masterkey”;
/************************************************
* url de conexão pela ponte odbc para conectar *
************************************************/
// String url = “jdbc:odbc:Atendimento”;
/*********************************
* url de conexão jdbx pure java *
*********************************/
String url = (CSDriver + CSServer + CSPort + CSPathBD);
/******************************************
* instrução select para o banco de dados *
******************************************/
String SQuery = "select rzsocial, fantasia from tcliente order by rzsocial asc";
try {
/*********************************************************************************
* tenta localizar o driver JdbcOdbcDriver, passando o caminho de busca do mesmo *
*********************************************************************************/
// Class.forName(“sun.jdbc.odbc.JdbcOdbcDriver”);
Class.forName(“org.firebirdsql.jdbc.FBDriver”);