Thanks for the reply. I had to change the directory
JAVA_HOME is set to /usr/lib/java, so not sure why it wasn't working out-of-the-box, unless it has something to do with the difference in directory names. Although I've got the editor working, problem is that I get the same error when trying to run a gui program from it.