Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OT: set memory use for jar in manifest



JP,

As a developer of cross platform Java apps, I understand where you are
comming from, however, after long deliberation, we decided to offer our
app in three (actually 4, should be 5) formats - an OS X app, a Windows
install and a JAR file (we also offer download of just the Windows exe for
updates).

The OS X app has the same jar (exactly the same jar - we drag it in the
app bundle) as the the Windows version (for which we customized the JVM
launcher and bundle the same jar). And there is the free-standing jar.

As the developer-in-charge, I was all for just give 'em the jar. But my
colleagues pointed out - on a Mac, users expect an application bundle they
can drag into the Applications folder; on Windows, they like to have the
desktop icons and lots of choices off the Start button; Linux users expect
a RPM (but I've just not had time to tackle that one), but they are more
savvy, so we give them the JAR for now.

But back to your question -- on OS X you can set up your application
bundle's plist with options for the -Xmx??? option -- ours defaults to
128MB on both OS X and Windows. For the Windows version there is a command
line switch into our custom launcher to increase the memory, and for OS X
I'm going to add soemthing to modify the plist to change the memory (NOTE
- if anyone has the code already, please share, otherwise look for
something from me this summer....).

So yeah, its a pain in the ass, but after thinking about it, and trying to
install our app on different platforms, I must admit my colleagues were
right, doing the extra work to make platform specific versions is well
worth the time and effort.

Larry

PS - back to your original question -- if you look at the code for any JVM
launcher, you'll get some insight into how the JVM works and why some
options can't be changed once loaded...

On Sun, 25 Apr 2004, J.P.Lewis wrote:

| off topic, but since there are some commercial developers
| on this list someone may know:
|
| Is there a way to set the -mx memory use parameter?
| My application needs more memory than the default, and it
| would be a lot cleaner if it could be specified in the .jar
| rather than having to distribute a shell file to launch the program.
|

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Larry Nussbaum Purgamentum init,
email@hidden exit purgamentum.
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >OT: set memory use for jar in manifest (From: "J.P.Lewis" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.