Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1032279
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:03:19+00:00 2026-05-16T14:03:19+00:00

I am using the G1 garbage collector with JDK1.7.0, but the VM does not

  • 0

I am using the G1 garbage collector with JDK1.7.0, but the VM does not recognize the option G1YoungGenSize. Specifically, when I run:

java -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1YoungGenSize=512m ...

I get the following error:

Unrecognized VM option 'G1YoungGenSize=512m'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

I have also tried it with a “+” sign before G1YoungGenSize, as some of the G1 documentation lists it that way:

java -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:+G1YoungGenSize=512m ...

But I get the same error.

I have tried older JDKs, including 1.6 update 18 through 21. It seems that G1YoungGenSize is recognized through update 20, and breaks beginning with 21 and through the latest 1.7 build (snapshot dated August 19, 2010).

Does anyone know what could be causing this error?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T14:03:19+00:00Added an answer on May 16, 2026 at 2:03 pm

    This looks to have changed about 6 months ago:

    6928065: G1: use existing command line parameters to set the young generation size
    http://hg.openjdk.java.net/jdk7/jdk7/hotspot/rev/a1c410de27e4

    Changes made for 1.6 here:

    https://bugs.java.com/bugdatabase/view_bug?bug_id=6928065

    To be consistent with the other GCs, G1 should observe UseAdaptiveSizePolicy to decide whether to auto-tune the young generation size. NewSize / MaxNewSize (and also -Xmn) should dictate the initial max size.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a general idea of how the Garbage Collector works in Java, but
I am running a Java program with the G1 garbage collector using the following
// Global cache of images. // Using SoftReference to allow garbage collector to clean
See also these related resources: Does the .NET garbage collector perform predictive analysis of
Has someone used a configuration enabling the garbage collector optimized for multi-processor machines using
Possible Duplicate: Creating a memory leak with Java There is a Garbage Collector in
Basically, I'm interested in writing a platform-independent garbage collector in C , probably using
I am developing a parallel garbage collector. It is a tri-marking collector that does
What garbage collectors are there available for C++? Are you using any of them?
I'm using garbage collection in Objective-C 2.0. Do I need to retain properties? Eg.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.