add -server flag and JAVA_OPTS env variable