jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • groovy
  • GROOVY-3781

JAVA_OPTS is not affecting groovy runtime

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Cannot Reproduce
  • Affects Version/s: 1.5.7, 1.6.4
  • Fix Version/s: None
  • Component/s: command line processing
  • Labels:
    None
  • Environment:
    Windows XP

Description

I want to set specific amount of java maxmem to groovy process. Regarding documentation I use 'set JAVA_OPTS="-Xmx10m"'. When I start groovy I see from Process Monitor that groovy takes 33Mb. It doesn`t matter how much memory I set. Also "groovy -Xmx10m" does not work. And even more 'set JAVA_OPTS="-Xmx10m -Xms10m"' does not work at all.
Am I doing something wrong or what?

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
blackdrag blackdrag added a comment - 23/Sep/09 1:44 AM

I found that the jvm is using a certain minimum amount of heap memory, even if you specify less. Also the Groovy command sets mx already and the java command does ignore further settings of it. That's the reason why mx is ignored. Might be the same for ms

Show
blackdrag blackdrag added a comment - 23/Sep/09 1:44 AM I found that the jvm is using a certain minimum amount of heap memory, even if you specify less. Also the Groovy command sets mx already and the java command does ignore further settings of it. That's the reason why mx is ignored. Might be the same for ms
Hide
Permalink
Uldis Karlovs-Karlovskis added a comment - 23/Sep/09 8:10 AM

I see. However I would like to have ability to configure it by myself like it is expected for any java application. Also this means that neither throught options nor JAVA_OPTS I can`t set any other JAVA properties what is wrong.

Show
Uldis Karlovs-Karlovskis added a comment - 23/Sep/09 8:10 AM I see. However I would like to have ability to configure it by myself like it is expected for any java application. Also this means that neither throught options nor JAVA_OPTS I can`t set any other JAVA properties what is wrong.
Hide
Permalink
blackdrag blackdrag added a comment - 23/Sep/09 2:54 PM

For a short term solution I suggest you change the bat files. Also I think the native launcher has not that problem. And also, you can use any arguments for Java as long as it is not those Well and classpath, but for this groovy has an alternative.

Show
blackdrag blackdrag added a comment - 23/Sep/09 2:54 PM For a short term solution I suggest you change the bat files. Also I think the native launcher has not that problem. And also, you can use any arguments for Java as long as it is not those Well and classpath, but for this groovy has an alternative.
Hide
Permalink
Uldis Karlovs-Karlovskis added a comment - 24/Sep/09 1:28 AM

Yes, for temporary workaround that should be enough.

Show
Uldis Karlovs-Karlovskis added a comment - 24/Sep/09 1:28 AM Yes, for temporary workaround that should be enough.
Hide
Permalink
Peter Monks added a comment - 21/Dec/09 9:06 PM - edited

It seems like Groovy has several issues in the area of JVM parameters (eg. GROOVY-2037). Perhaps these issues could be grouped together and fixed en masse?

Show
Peter Monks added a comment - 21/Dec/09 9:06 PM - edited It seems like Groovy has several issues in the area of JVM parameters (eg. GROOVY-2037). Perhaps these issues could be grouped together and fixed en masse?
Hide
Permalink
blackdrag blackdrag added a comment - 22/Dec/09 6:35 AM

JAVA_OPTS works, just not with this low values. You can for example use JAVA_OPTS="-Dfoo=bar" and then in a groov program request the system property foo. There might be another reason for -Xmx not working and that is that the bat file may use -Xmx already and java does not like multiple of those. GROOVY-2037 is relaed to the startup scripts, yes, but it is an entirely different issue, because it is about a new feature more or less, while this here is about something that should work

Show
blackdrag blackdrag added a comment - 22/Dec/09 6:35 AM JAVA_OPTS works, just not with this low values. You can for example use JAVA_OPTS="-Dfoo=bar" and then in a groov program request the system property foo. There might be another reason for -Xmx not working and that is that the bat file may use -Xmx already and java does not like multiple of those. GROOVY-2037 is relaed to the startup scripts, yes, but it is an entirely different issue, because it is about a new feature more or less, while this here is about something that should work
Hide
Permalink
Paul King added a comment - 18/Sep/10 11:50 PM

So should we close this issue?

Show
Paul King added a comment - 18/Sep/10 11:50 PM So should we close this issue?

People

  • Assignee:
    blackdrag blackdrag
    Reporter:
    Uldis Karlovs-Karlovskis
Vote (1)
Watch (2)

Dates

  • Created:
    22/Sep/09 9:30 AM
    Updated:
    19/Sep/10 2:57 AM
    Resolved:
    19/Sep/10 2:57 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.