olap4j is a Java library to access a OLAP server with an unified API :
you may switch your OLAP server to another implementation with ease.
It can be compared to JDBC for SQL servers.
This project is supported by many libre software project in this area :
* Jasperreports
* Mondrian
* Pentaho