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

  • SEARCH
  • Home
  • 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 8560961
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:23:42+00:00 2026-06-11T16:23:42+00:00

I have created a java application and many users use it. I have bundled

  • 0

I have created a java application and many users use it. I have bundled the application in an exe file, where it is being run using this command :

java -jar -Xms256m -Xmx1024m MyApplication.jar

I am using this high “-Xmx” value because sometimes the application may need high memory to work or it may cause “Out of memory” error.

The application runs just fine for me, as i have 3GB Rams, but many other users get the error “Could not create the Java virtual machine” at startup because they have low memory: 1.5GB, or 2GB.

I am stuck here between the 2 errors “Out of memory” and “Could not create the Java virtual machine” !!

Is there a java parameter to reserve 1024 memory if this memory is available, and if not then reserve the maximum memory it can when needed ?

  • 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-06-11T16:23:43+00:00Added an answer on June 11, 2026 at 4:23 pm

    I don’t believe there is.

    The bigger problem you face is that, if you get Out Of Memory when you set the Xmx lower (i.e the same Xmx available to other user) then they will also get Out of Memory , so you haven’t really helped anything by allowing them to set a lower Xmx.

    I think the simple answer is that you need to set some minimum memory requirements for running your program.

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

Sidebar

Related Questions

I have created a java application on netbeans 7 .Now By using netbeans ihave
I have created a java application and packed it into a jar file on
I have created a JAVA application. Sometimes, users do invalid operations on it or
Using Restlet I have created a router for my Java application. From using curl,
I have created one application in flex that is accessing the Java webservice using
I have created a fairly substantial Java GUI application with many form windows where
I have created a java application for Debian Linux. Now I want that that
Hi I have created a java application. I found there is an application menu
I have created a sample java socket application. I used Socket s = new
I have an application where many unit tests use a real connection to an

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.