[Geoserver-devel] [jira] (GEOS-5594) JAVA_OPTS variable not functioning

Jonathan Moules created BugGEOS-5594
JAVA_OPTS variable not functioning

Issue Type:

BugBug

Affects Versions:

2.2.3

Assignee:

Justin Deoliveira

Components:

Configuration

Created:

22/Jan/13 11:34 AM

Description:

If I set a JAVA_OPTS environmental variable to something like:

-Xmx1G -Xms128m -XX:MaxPermSize=256m -XX:SoftRefLRUPolicyMSPerMB=36000 -XX:+UseParallelGC

GeoServer won’t start, citing an invalid heap size. What its actually doing is only getting the “-Xmx1G” from the variable because of the poor way windows handles spaces in them.

If I change JAVA_OPTS to:

“-Xmx1G -Xms128m -XX:MaxPermSize=256m -XX:SoftRefLRUPolicyMSPerMB=36000 -XX:+UseParallelGC”

(note the quotes around it). It still doesn’t start, but this time instantly closes the batch file.

The only way to get it to run using options is to edit the batch file and declare it there. I.e. line 116 becomes:

if “%JAVA_OPTS%” == “” (set JAVA_OPTS=“-Xmx1G -Xms128m -XX:MaxPermSize=256m -XX:SoftRefLRUPolicyMSPerMB=36000 -XX:+UseParallelGC”)

or I guess just stick it directly into line 121.

Environment:

Windows 2008 R2

Project:

GeoServer

Priority:

MinorMinor

Reporter:

Jonathan Moules

This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your [JIRA administrators](https://jira.codehaus.org/secure/ContactAdministrators!default.jspa). For more information on JIRA, see: [http://www.atlassian.com/software/jira](http://www.atlassian.com/software/jira)