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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:05:23+00:00 2026-06-02T02:05:23+00:00

Currently I have been deploying my application as a .jar file, because users of

  • 0

Currently I have been deploying my application as a .jar file, because users of every OS can just double click it. However I now need to increase the max heap size, and the only way to do that is to pass a command-line argument (-Xmx1g) to the JVM. I wish it was possible to include this in the jar manifest, but it’s not.

So now I am forced to include a .bat or .csh with the .jar that has the arguments. It seems like there is a better way to do this right? I don’t think that Webstart is a good option because the .jar is meant to run in a user’s directory where it writes out files. The application is a desktop GUI app.

  • 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-02T02:05:25+00:00Added an answer on June 2, 2026 at 2:05 am

    Unfortunately it is not possible to specify vmargs in the manifest file inside your jar, so you need a workaround like :

    • Create a script that launch the jar file with specified vm args
    • Wrap your jar inside an executable that will work as a launcher
    • Compile your Java code into native binary

    The first solution can be easily implement using a batch or an shell script for example, while for the second solution there are several alternatives that can be useful as for example the aforementioned and native Java Web Start and launch4j that is a Cross-platform Java executable wrapper.
    The third solution can be implemented in some situations and if your code is compatible with the GNU classpath library, in this case you could compile into native binary using GCJ .

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

Sidebar

Related Questions

Currently, I have been reading lists of data from a binary data file programmatically
We currently have an application available on the app store. We have been approached
I have been investigating building web parts for sharepoint 2010 and currently have a
I have been trying to get more in to TDD. Currently keeping it simple
I have been working on keeping things object oriented for my project. Currently, I'm
I've been trying to implement unit testing and currently have some code that does
I'm currently monitoring a large network with Hobbit and have been tasked with lowering
The title may have been confusing, but please let me explain: Currently when I
I am currently trying to learn Android. Have been reading tutorials and manual for
I currently use Notepad++ for most of my development. I have been checking out

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.