A little late with my answer, but I'd recommend writing a module for Drupal which plugs into its XML-RPC capabilities and does the work for you.
In other words, you would make an XML-RPC request from your Java application (http://ws.apache.org/xmlrpc/client.html) to a path on your Drupal site controlled by the module (say 'example.com/user/is-logged-in'). The Drupal module would 'control' that path, and receive all requests. From there it's a simple job for the Drupal module to make a query against the database to find out whether the session is associated with a logged in user (if associated user is 0, then the user is not logged in - otherwise the user is logged in). The Drupal module would then simply return true or false (if that's desirable, or a more detailed array of user details).
I'll soon be working on a similar case, and will probably go down that path. In my case, I've got a Drupal site which offers file downloads. The downloads needs to be done via a Java servlet, but only people who are logged in should be allowed to download. Thus, the servlet will contact the Drupal site to check if a user with the session id provided in the cookie is logged in and then determine whether download should commence or not.
In other words:
Java --> XML-RPC request --> Drupal Site --> XML-RPC response --> Java.