Even though libreoffice is being actively rid of java:
java’s EventListener interface is cool. Imagine you have some interactive document in which when you hover the mouse over the word “red” a picture next to it becomes red.
How could you do that with C or C++?
If you cannot, how could you make java do it in a LO document?