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 9011113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T02:38:36+00:00 2026-06-16T02:38:36+00:00

Why an executable jar when run from a command line uses much more RAM

  • 0

Why an executable jar when run from a command line uses much more RAM – in my case around 7 time more – than the same project run from Eclipse?

While developing the project I run the application from Eclipse (Run->Run) it used around 60mb (I looked at the just created javaw.exe process) of ram, whereas if I create an executable JAR and run it from command line (Windows) the ram usage is about 450mb. Also, the amplitude of ram usage change is more when run from the command line, than from Eclipse’s Run->Run.

  • 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-16T02:38:37+00:00Added an answer on June 16, 2026 at 2:38 am

    This is probably to do with the JVM settings that Eclipse launches the application with. When launching the Jar, Java will make a best guess at what settings to use in terms of memory. You can change the size of the memory used with the the java command on the console:

    java -Xms64m -Xmx256m -cp your.jar
    

    -Xms??m sets the minimum heap size in mb.
    -Xmx??m sets the maximum heap size in mb.

    Java is probably automatically choosing a larger heap size automatically as it is not being dictated by eclipse.

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

Sidebar

Related Questions

We have an executable jar file that can be run from the command line
I'm trying to build an executable jar from the command line (I don't want
I am attempting to run VLCJ test jar from command line. VLCJ requires two
My log4j is working fine when I run java pakcage.Main from command line, but
I need to run an executable JAR file in multiple threads/cores. The JAR file
I get the error below when trying to run an executable jar file. The
I created an executable jar and executed it using process builder from another java
question is: what is included in the executable jar when exporting as such from
I new to web-start and We are using exe4j to create executable from One-jar.
I am trying to run executable jar developed with JavaFx 2.0 platform on windows

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.