Re: [問題] jar 能否加上類似 Xmx 的參數

看板java作者 (愚人)時間19年前 (2006/11/11 17:57), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串6/6 (看更多)
※ 引述《pao0111 (Pao)》之銘言: : ※ 引述《tkcn (小安)》之銘言: : : 最近替案主寫了一個小工具, : : 為了案主方便,所以我是把程式包成 jar,點兩下就可執行 : : 但是這支程式,需要用到大量的記憶體, : : 因此,我想請問除了在 console 下 -Xmx 參數外, : : 有沒有其他的方式能夠設定某 jar 使用的記憶體大小, : : 例如修改 manifest 之類的? : 我的搞笑方法... 搞笑完 還是打個廣告好了 http://jakarta.apache.org/commons/launcher/index.html The Launcher Component The Launcher Component is designed to be a cross platform Java application launcher. The original Java classes come from the Jakarta Tomcat 4.0 project. Commons-launcher eliminates the need for a batch or shell script to launch a Java class. Some situations where elimination of a batch or shell script may be desirable are: * You want to avoid having to determining where certain application paths are e.g. your application's home directory, etc. Determining this dynamically in a Windows batch scripts is very tricky on some versions of Windows or when softlinks are used on Unix platforms. * You want to avoid having to handle native file and path separators or native path quoting issues. * You need to enforce certain system properties e.g. java.endorsed.dirs when running with JDK 1.4. * You want to allow users to pass in custom JVM arguments or system properties without having to parse and reorder arguments in your script. This can be tricky and/or messy in batch and shell scripts. * You want to bootstrap system properties from a configuration file instead hard-coding them in your batch and shell scripts. * You want to provide localized error messages which is very tricky to do in batch and shell scripts. -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 210.59.94.161
文章代碼(AID): #15LPwdrR (java)
討論串 (同標題文章)
文章代碼(AID): #15LPwdrR (java)