I've copied the Informix jar to the schemacrawler/lib
ifxjdbc.jar
ifxjdbcx.jar
ifxlang.jar
ifxlsupp.jar
ifxsqlj.jar
ifxtools.jar
I've change the jdbc connection in ApiExample.java to Informix jdbc connection string, and the username and password
The api.cmd looks like below (no changes done here)
@echo off
del /f /q *.class
javac -classpath ../../_schemacrawler/lib/*;. ApiExample.java
java -classpath ../../_schemacrawler/lib/*;. ApiExample
But when I run the api.cmd I got the following error
WARNING: Could not get a database driver for database connection URL jdbc:informix-sqli://someserver:1234/mydb:informixserver=test_shm
Exception in thread "main" java.lang.NullPointerException
at schemacrawler.schemacrawler.BaseDatabaseConnectionOptions.createConnectionProperties(BaseDatabaseConnectionOptions.java:292)
at schemacrawler.schemacrawler.BaseDatabaseConnectionOptions.getConnection(BaseDatabaseConnectionOptions.java:119)
at ApiExampleInformix.main(ApiExampleInformix.java:25)
Why can't ApiExample.class find the Informix jars?
Thanks in advance
I took a look at Load IBM Informix JDBC Driver, and found you need to do this first:
Class.forName("com.informix.jdbc.IfxDriver");
Sualeh Fatehi, SchemaCrawler