Yes, you can use several well-known WordNet metrics via a Java interface such as this one:
WS4J (WordNet Similarity for Java)
http://code.google.com/p/ws4j/
Alternatively, you can use a distributional semantic similarity algorithm which, instead of a knowledge base (such as the WordNet), relies on a corpus of text in a given language. There are several Java libraries which implement distributional models. I had experience with and can recommend the S-Space Package - it contains a number of different algorithms:
http://github.com/fozziethebeat/S-Space
You could also try out a neural language model such as the popular word2vec which has been ported to Java: