X11 forwarding within cursor

I am working on java code on a remote system and am using libraries like javafx and joptionpane, but in order to run those scripts I have to open a terminal window and manually create a ssh -X connection and export the DISPLAY environment variable, I have tried putting ForwardX11 yes in the sshconfig used by cursor, but the debugger still does not have DISPLAY set