How can i use Rete Algorithm in java?
Do i need to write my own algorithm implementation?
Or is there already implemented library available?
A simple Google search for "Rete Algorithm Java" showed up this result (among others): http://java-source.net/open-source/rule-engines.
The first entry reads: Drools is an Object-Oriented Rule Engine for Java. Drools is an augmented implementation of Forgy's Rete algorithm tailored for the Java language.
So the answer seems to be: Yes, there already is a library that implements the algorithm you're looking for.