this might be a duplicate of another question, but here are the comments that I posted for that one....
You could try the Amazon free tier, which gives you a free mini server instance for a year;
http://aws.amazon.com/free/
To get a basic java server select an ubuntu image from the public images and install it on the instance, and then login to the console and run apt-get install tomcat6 java
to install a java web application container.
There are some more details in this question/answer about using AWS free tier;
https://stackoverflow.com/questions/4216066/how-to-use-amazon-web-service-free-tier
Also Hpcloud.com are offering a beta of their cloud hosting services, which you can sign up for here; http://hpcloud.com/
Which might give you a free instance for a couple of months. (I have been running an instance for about 4 months which is handy for trying out new installs and suchlike and has a much higher RAM limit that the free AWS account)
The reason that you might find it difficult to get free java hosting like you might be familiar with for mod_php or cgi scripts is that in general, java applications do not share resources well.
I mean in the sense that for example tomcat has resources allocated per deployed application which means that its not practical to run 100 tomcat wars in the same app server. But the same is not true of php apps running under mod_php where its just the requests running and cached that are consuming RAM. (my very naive understanding...)