I`m developing an application in Java and I need to run a terminal from inside the application.
I do not want to run the default terminal using "xterm" but instead I want to run the terminal designed by the desktop environment on that distribution of Linux. (like the KDE terminal or the Gnome terminal).

I was wondering if there is any linux command that returns inside the terminal the desktop environment which the operating system currently uses so that I can interpret it`s results from inside the program and create the adequate command to run the terminal. I haven`t been using linux for a long time, and I`ve done very low programming on it, I`ve tried to google this but couldn`t find an answer.

Thank you.