Your Java-client will make requests to the server, and the server will act like a web service, right?
If so, include all/any $_SESSION variables you might need with the XML/json/whatever response that the server sends back to the clients, something along the lines of:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<reply>
<request>
<method>getUsers</method>
<param name="page">1</param>
<param name="apiKey">API_KEY</param>
<param name="sessId">SESSION_ID</param>
</request>
<response>
<status>
<code>0</code>
<message>OK</message>
</status>
<users>
<!-- Request reply here -->
</users>
<session>
<variable1>$_SESSION['var1']</variable1>
<!-- Additional session variables you might need on the client here[...] -->
</session>
</response>
</reply>
The thing is, session variables are something the server uses to keep track of which client is accessing it now, and relate data to that particular client. If you need this information on the client, perhaps you could refactor the application to create this data on the client and pass it to the server in case the server needs that data?