OMERO Java Language Bindings
Using the Ice Java language mapping from http://zeroc.com, OMERO provides access to your data within an OmeroBlitz server from Java code.
Using the OmeroJava jar
The omero_client.jjar is a combination of all necessary Java OMERO class as well as the Ice classes needed to write a complete Java client for OmeroBlitz.
The library is placed under OMERO_HOME/dist/lib/client by the build, or is alternatively available from Hudson at: http://hudson.openmicroscopy.org.uk/job/OMERO/lastSuccessfulBuild/
To use OmeroJava, setup you'll need to setup your CLASSPATH:
CLASSPATH=path/omero_client.jar javac mycode
Extended classpath
To access all the functionality available in omero_client.jar or to use the importer, you'll of course need more jar files. To see all the current requirements, take a look at the hudson workspace, or alternatively examine the dependencies in the ivy.xml files (e.g. source:trunk/components/tools/OmeroImporter/ivy.xml)
A trivial example
omero.client c = new omero.client();
try {
omero.api.ServiceFactoryPrx s = c.createSession();
// IAdmin is responsible for all user/group creation, password changing, etc.
omero.api.IAdminPrx admin = s.getAdminService();
// Who you are logged in as.
System.out.println(admin.getEventContext().userName);
// These two services are used for database access
omero.api.IQueryPrx query = s.getQueryService();
omero.api.IUpdatePrx update = s.getUpdateService();
} finally {
c.closeSession();
}
Further information
For the details behind writing, configuring, and executing a client, please see OmeroClients.
See also: http://zeroc.com, OmeroBlitz, OmeroGrid, OmeroTools, OmeroApi