You can define a proxy server in the code using "JavaSetOption" command in the script before "JavaCreateJavaVM" command is called. 

See the example below:
...
JavaSetOption(JAVA_CMDLINE_OPTIONS, "-Dhttp.proxyHost=proxy.domain.com -Dhttp.proxyPort=8080");
...
JavaCreateJavaVM();

You can also specify these options in the JVM settings under SETTINGS | ACTIVE PROFILE | JAVA