I'm not sure what you mean. If you are asking if the router is programmed using the Java programming language then the answer is likely no. Routers are designed to be as fast a possible at what they do. Generally speaking, Java doesn't provide the facilities to support things that talk directly to speed - this article addresses the reasons better than I could. The article is in reference to git but the idea remains the same.
However... There is a new generation of software routers still under heavy development that use a variety of languages. Click is one that I am familiar with that uses C++. The same performance penalty applies as above but there may in fact be an implementation in Java that I am not aware of.
Some routers provide run a web server to allow the administrator to use a web browser to interact with. This is where you may think that the router was programmed using Java. Now, it may be that the router's HTTP server is serving java pages. That is not uncommon. You would need to check with your router's documentation for more information about the HTTP server that it is running. However, as L7Sqr indicated, the core IOS that the router is running to "route" packets is not going to be written in Java.
thank you very much for your replies
now to make my problem more spicific, let we say that the administrator (or a company or any government office) want to add a new protocol to the router, for example let say to make the connection secure, (it add a key exchange between the client and the local router).
does it use the java language for this purpose?
thank you very much before and in advance
DNS queries are not the extent of a routers capabilities. The project you link to is an application to be hosted on an end-node in the network. A router is an internal node that manages getting data frames to and from end-node hosts.
It is misleading to suggest that one can be a starting point for the other.