Specify Parameters to JAR file

Right now, i'm running my jar file with a batch file that says:

java -Xms32m -Xmx128m -jar Client.jar

How do I make my executable jar file execute with those parameters without a batch file. I just want to hand this jar file to the end user, and let them run it without having to have an additional batch file.

Thanks

[343 byte] By [Nethera] at [2007-11-27 6:16:29]
# 1

> Right now, i'm running my jar file with a batch file

> that says:

>

> java -Xms32m -Xmx128m -jar Client.jar

>

>

> How do I make my executable jar file execute with

> those parameters without a batch file. I just want

> to hand this jar file to the end user, and let them

> run it without having to have an additional batch

> file.

>

> Thanks

You can't.

kajbja at 2007-7-12 17:28:18 > top of Java-index,Java Essentials,Java Programming...
# 2
thats lame, so what should i do:1. Send a batch file with it to run it with.2. Wrap it in an exe like with jSmooth3. Some other idea
Nethera at 2007-7-12 17:28:18 > top of Java-index,Java Essentials,Java Programming...
# 3
> thats lame, so what should i do:> > 1. Send a batch file with it to run it with.> 2. Wrap it in an exe like with jSmooth> 3. Some other ideaBatch file, exe or a windows shortcut.
kajbja at 2007-7-12 17:28:18 > top of Java-index,Java Essentials,Java Programming...
# 4

> thats lame

Nice.

In fact what's lame is this: "I just want to hand this jar file to the end user, and let them run it without having to have an additional batch file."

Executable jar files (and other executables) belong somewhere where the user has, at best, read only access. As for launching programs, most platforms offer a variety of ways (icons on a desktop, entries in a start menu etc). It is often convenient for these launching scripts to be somewhere read/writable, both so that the user can configure them and so that they can organise the way programs are launched to suit themselves.

pbrockway2a at 2007-7-12 17:28:18 > top of Java-index,Java Essentials,Java Programming...
# 5
Does anyone have any recommendations of a program I can download which will install the jar file to a folder and create a shortcut to it? (preferably platform independent)Thanks
Nethera at 2007-7-12 17:28:18 > top of Java-index,Java Essentials,Java Programming...
# 6
Such programs are called "installers". So "java installer" are your Google keywords.
DrClapa at 2007-7-12 17:28:18 > top of Java-index,Java Essentials,Java Programming...
# 7

Thanks for those keywords. I found a very nice looking windows installer:

http://www.advancedinstaller.com/java.html

but when i added the worlds "cross platform" into my google search, i didnt really find anything good. Anyone have a program they'd like to suggest (or better keywords)?

Thanks

Nethera at 2007-7-12 17:28:18 > top of Java-index,Java Essentials,Java Programming...
# 8
Do you really need to specify those memory parameters? I stopped doing that about eight years ago.
ejpa at 2007-7-12 17:28:18 > top of Java-index,Java Essentials,Java Programming...
# 9
> Do you really need to specify those memory> parameters? I stopped doing that about eight years> ago.if i dont, it runs out of memory.
Nethera at 2007-7-12 17:28:18 > top of Java-index,Java Essentials,Java Programming...