Before you start your application, that is before the "java" command,
$ DEFINE/USER JAVA$FILE_OPEN_MODE 3
$ DEFINE/USER JAVA$FSYNC_INTERVAL 5
Where the open mode 3 ensures that the file is shared (not locked) and the 5 seconds interval ensures EOF is updated. Obviously you can change the number of seconds to any other useful value. Small values may reduce the overall I/O performance. Also, keep in mind, that these settings affect all file operations done by your Java application.
This works for 1.5.0-8 (VMS numbering scheme) and should work for other recent versions as well.