in reply to Set Display Variable

The special hash %ENV is used to read/set environment variables. Environment variables are propagated to any child processes, so if you do
$ENV {DISPLAY} = "192.168.1.1:0.0";
before spawning the Java program, the variable should be set.

See also the perlvar manual page.

Abigail