I can't use the java shell outside of UXterm when I run it with rofi

Hello everyone
I have recently installed the packages jre-openjdk and jdk-openjdk on my system. These packages include the java shell. When I launch it from the Xfce panel, java launches well in my default terminal (I had to modify the java shortcut command in the menu though). However, when I launch java from rofi, it launches in the UXterm terminal. Moreover when I uninstall UXterm and Xterm, java “failed to find a suitable terminal”. How can I get it to run in my default terminal (xfce4-terminal) ?

Are you launching with drun? If so, edit the file in /usr/share/applications.

I tested with drun and by modifying the .desktop files but nothing changes my applications always launch in UXterm

What did you change it to? Exec line in the file should be something like:

Exec=xfce4-terminal -e your-program-name

Yes I changed that and I also changed the boolean next to “terminal” like that:
image