#! perl use strict; use warnings; my $child_pid = fork(); die "Couldn't fork: $!\n" unless defined $child_pid; if ($child_pid) { print "Child pid is $child_pid\n"; } else { exec( 'java ...' ); }