app_java: allocate enough space to store terminating NULL pointer in split

- on a report by Tom Johnson