 <p>Something like the following should do what you want I think:</p> <pre><code>ResourceAccessor resourceAccessor = new FileSystemResourceAccessor(); Database db = DatabaseFactory.getInstance().findCorrectDatabaseImplementation(new JdbcConnection(yourJdbcConnection)); Liquibase liquibase = new Liquibase("data/filename", resourceAccessor, db); try (Writer writer = new OutputStreamWriter(System.out)) { liquibase.update((Contexts) null, writer); } </code></pre>