Question: I've created my application and tested it under windows, which writes/reads to/from a access DB file. 

But in the real world it will be ran in the linux environment, and I have a big issue now, it appears that there are no drivers for linux to access ms acess db, here is how I make the connection now :

```
private static Connection getConnection() {
        if (connection == null) {
            try {
                Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                String conStr = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=" + configuration.getAccessDbFile();
                connection = DriverManager.getConnection(conStr);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        return connection;
    }

```

Has anyone encountered something similar to this, does anybody have a suggestion what could I do ?

This is the exception I get on the linux :

```
java.lang.NullPointerException
        at sun.jdbc.odbc.JdbcOdbcDriver.initialize(JdbcOdbcDriver.java:436)
        at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:153)
        at java.sql.DriverManager.getConnection(DriverManager.java:582)
        at java.sql.DriverManager.getConnection(DriverManager.java:207)

```

Answer: 
Use <http://jackcess.sourceforge.net/>

You can read / write a Acceess database from Linux or Windows using Java.
If you are stuck with Access, but your interactions with the database file are pretty "simple" (e.g. you aren't doing complex SQL queries), you could use something like [Jackcess](http://jackcess.sourceforge.net/). It is a pure-java library which allows you to manipulate an Access database, but it does *not* provide a jdbc interface, so you have to write code using the Jackcess api.

(disclaimer, i am a jackcess developer)