Skip to main content



      Home
Home » Newcomers » Newcomers » Newbie-question: include command line VM-arguments into JAR file?
Newbie-question: include command line VM-arguments into JAR file? [message #160466] Wed, 12 July 2006 09:46 Go to next message
Eclipse UserFriend
Originally posted by: bloeth.gosub.de

Hello java coders,


I've just built my first Swing app in eclipse, exported it as JAR and
now find a problem:

When running it out of eclipse, I can configure VM arguments that always
will be applied automatically - in my case it is a "-Xmx512m", giving
the VMm more heap space - my app really needs loads of memory.

But when I want to give away the JAR, will then every single user only
be able to start the app via the command line, specifying the switch
manually, or is there any way to include this VM option into some file
inside the JAR, so the app can be run by simply double clicking it
(under Windows, that is)?


Any comment welcome,
best regards,
Roman.
--

------------------------------------------------------------ -------
gosub communications gmbh | fredersdorfer str. 10 | 10243 berlin
t [030] 29 36 39 1 - 43 | f [030] 29 66 88 84 | http://www.gosub.de
------------------------------------------------------------ -------
Re: Newbie-question: include command line VM-arguments into JAR file? [message #160475 is a reply to message #160466] Wed, 12 July 2006 09:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wayne.beaton._NOSPAM_eclipse.org

Roman Blöth wrote:
> Hello java coders,
>
>
> I've just built my first Swing app in eclipse, exported it as JAR and
> now find a problem:
>
> When running it out of eclipse, I can configure VM arguments that always
> will be applied automatically - in my case it is a "-Xmx512m", giving
> the VMm more heap space - my app really needs loads of memory.
>
> But when I want to give away the JAR, will then every single user only
> be able to start the app via the command line, specifying the switch
> manually, or is there any way to include this VM option into some file
> inside the JAR, so the app can be run by simply double clicking it
> (under Windows, that is)?
>
>
> Any comment welcome,
> best regards,
> Roman.
Hi Roman. This is more of a Java question and you'll probably get a
better answer on one of the Java-specific forums. That said, I believe
that you need to create some sort of application launcher that sets the
command-line arguments. In the past, I've done this with a shell script.
To be honest, it's been a while since I've had to do this sort of thing
and there may well be a better way to do it now.

Good luck,

Wayne
Re: Newbie-question: include command line VM-arguments into JAR file? [message #160484 is a reply to message #160475] Wed, 12 July 2006 09:56 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bloeth.gosub.de

Wayne Beaton schrieb:
> Hi Roman. This is more of a Java question and you'll probably get a
> better answer on one of the Java-specific forums. That said, I believe
> that you need to create some sort of application launcher that sets the
> command-line arguments. In the past, I've done this with a shell script.
> To be honest, it's been a while since I've had to do this sort of thing
> and there may well be a better way to do it now.
Dear Wayne,


thanks a load for your answer - this gives me an idea; obviously there
is no point-and-click-solution for this kind of problem...


Best regards,
Roman.

--

------------------------------------------------------------ -------
gosub communications gmbh | fredersdorfer str. 10 | 10243 berlin
t [030] 29 36 39 1 - 43 | f [030] 29 66 88 84 | http://www.gosub.de
------------------------------------------------------------ -------
Re: Newbie-question: include command line VM-arguments into JAR file? [message #160690 is a reply to message #160466] Thu, 13 July 2006 03:31 Go to previous message
Eclipse UserFriend
Originally posted by: weconsul.ptd.net

Roman Blöth wrote:
> Hello java coders,
>
>
> I've just built my first Swing app in eclipse, exported it as JAR and
> now find a problem:
>
> When running it out of eclipse, I can configure VM arguments that always
> will be applied automatically - in my case it is a "-Xmx512m", giving
> the VMm more heap space - my app really needs loads of memory.
>
> But when I want to give away the JAR, will then every single user only
> be able to start the app via the command line, specifying the switch
> manually, or is there any way to include this VM option into some file
> inside the JAR, so the app can be run by simply double clicking it
> (under Windows, that is)?
>
>
> Any comment welcome,
> best regards,
> Roman.

You add the options to the java command when you invoke your bat file
that has the jar file. Ex.

java -Xmx512m -jar your.jar

Thanks in Advance...
IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
____________________________________________________________ ______________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
Previous Topic:Project creation APIs
Next Topic:how to reference a view from an application
Goto Forum:
  


Current Time: Tue Jul 22 16:20:18 EDT 2025

Powered by FUDForum. Page generated in 1.09384 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top