Java webstart max-heap-size causes JVM cannot be started
2012-10-22 09:32
597 查看
Stack Exchange
log
in | careers | chat | meta | about | faq
Stack
Overflow
Questions
Tags
Users
Badges
Unanswered
Ask
Question
![](https://oscdn.geek-share.com/Uploads/Images/Content/201912/02/fdfdb48612e3283776a1f5d2d298f34f.gif)
![](http://engine.adzerk.net/v/v.gif?i=eyJVc2VyIjpudWxsLCJDYXRlZ29yaWVzIjpbXSwiQ3JlYXRlZE9uIjoiXC9EYXRlKDEzNTA4NjkyNjY3ODEpXC8iLCJJZCI6IjE4Yzc1YmIwLWFhMzAtNDFiOS04NDI4LWJkOGMzNjY5N2UxOCIsIlJlbW90ZUlQIjpudWxsLCJVc2VyQWdlbnQiOm51bGwsIlJlZmVycmVyVXJsIjpudWxsLCJVcmwiOm51bGwsIkNyZWF0aXZlSWQiOjI2OTA4LCJSU1NLZXkiOm51bGwsIkFkVHlwZUlkIjo0LCJTaXRlSWQiOjgyNzcsIkNoYW5uZWxJZCI6MTE3OCwiUHJpb3JpdHlJZCI6NzY1LCJOZXR3b3JrSWQiOjIyLCJab25lSWQiOjQzLCJMb2NhdGlvbiI6bnVsbCwiQ2FtcGFpZ25JZCI6MTIwNzMsIlBhc3NJZCI6MjI3NjcsIkJyYW5kSWQiOjgxODksIkZpcnN0Q2hhbm5lbElkIjoxMTc4LCJJbXByZXNzaW9uQ291bnQiOjEsIlVzZXJLZXkiOm51bGwsIktleXdvcmRzIjoiamF2YSxqdm0saGVhcCxqbmxwLGphdmEtd2ViLXN0YXJ0IiwiRGVsaXZlcnlNb2RlIjoxLCJSZXZlbnVlIjo2MjUsIklzVHJhY2tpbmdDb29raWVFdmVudHMiOmZhbHNlLCJQaGFudG9tUGFzc0lkIjowLCJQaGFudG9tQ3JlYXRpdmVQYXNzSWQiOjAsIkNyZWF0aXZlUGFzc0lkIjozODI2OSwiSXNWYWxpZFVBIjpmYWxzZSwiSXNOb1RyYWNrIjpmYWxzZSwiTWF0Y2hpbmdLZXl3b3JkcyI6WyJqdm0iLCJoZWFwIl190)
activeoldestvotes
![](https://oscdn.geek-share.com/Uploads/Images/Content/202002/22/0b389866c45ae54b716390011061f564.png)
![](http://engine.adzerk.net/v/v.gif?i=eyJVc2VyIjpudWxsLCJDYXRlZ29yaWVzIjpbXSwiQ3JlYXRlZE9uIjoiXC9EYXRlKDEzNTA4NjkyNjY3ODEpXC8iLCJJZCI6IjI4ZDRlY2Q2LTAxYTktNDUzZC1iNTgzLTZkZWY4YTVjYzc1NiIsIlJlbW90ZUlQIjpudWxsLCJVc2VyQWdlbnQiOm51bGwsIlJlZmVycmVyVXJsIjpudWxsLCJVcmwiOm51bGwsIkNyZWF0aXZlSWQiOjU5MjAsIlJTU0tleSI6bnVsbCwiQWRUeXBlSWQiOjQsIlNpdGVJZCI6ODI3NywiQ2hhbm5lbElkIjoxMTc4LCJQcmlvcml0eUlkIjoxNTY4LCJOZXR3b3JrSWQiOjIyLCJab25lSWQiOjQ0LCJMb2NhdGlvbiI6bnVsbCwiQ2FtcGFpZ25JZCI6ODQ3LCJQYXNzSWQiOjI0NDQsIkJyYW5kSWQiOjQxNCwiRmlyc3RDaGFubmVsSWQiOjExNzgsIkltcHJlc3Npb25Db3VudCI6MSwiVXNlcktleSI6bnVsbCwiS2V5d29yZHMiOiJqYXZhLGp2bSxoZWFwLGpubHAsamF2YS13ZWItc3RhcnQiLCJEZWxpdmVyeU1vZGUiOjEsIlJldmVudWUiOjAsIklzVHJhY2tpbmdDb29raWVFdmVudHMiOmZhbHNlLCJQaGFudG9tUGFzc0lkIjowLCJQaGFudG9tQ3JlYXRpdmVQYXNzSWQiOjAsIkNyZWF0aXZlUGFzc0lkIjo4ODA2LCJJc1ZhbGlkVUEiOmZhbHNlLCJJc05vVHJhY2siOmZhbHNlLCJNYXRjaGluZ0tleXdvcmRzIjpudWxsfQ2)
By posting your answer, you agree to the privacy
policy and terms
of service.
This is a collaboratively edited question and answer site forprofessional
and enthusiast programmers. It's 100% free, no registration required.
about
» faq
»
tagged
java × 312536
jvm × 2668
heap × 1421
jnlp × 458
java-web-start × 396
![](https://oscdn.geek-share.com/Uploads/Images/Content/202002/22/50be91feb6660d4392e9a08f21d72894.jpg)
![](http://engine.adzerk.net/v/v.gif?i=eyJVc2VyIjpudWxsLCJDYXRlZ29yaWVzIjpbXSwiQ3JlYXRlZE9uIjoiXC9EYXRlKDEzNTA4NjkyNjY3ODEpXC8iLCJJZCI6Ijk3Y2ZjYWEwLTA4OTYtNGQ3ZS05OGVlLTQ3YmIxYmQ2OWI3MyIsIlJlbW90ZUlQIjpudWxsLCJVc2VyQWdlbnQiOm51bGwsIlJlZmVycmVyVXJsIjpudWxsLCJVcmwiOm51bGwsIkNyZWF0aXZlSWQiOjgyMTEsIlJTU0tleSI6bnVsbCwiQWRUeXBlSWQiOjE3LCJTaXRlSWQiOjgyNzcsIkNoYW5uZWxJZCI6MTE3OCwiUHJpb3JpdHlJZCI6MTU2OCwiTmV0d29ya0lkIjoyMiwiWm9uZUlkIjo0NSwiTG9jYXRpb24iOm51bGwsIkNhbXBhaWduSWQiOjg0NywiUGFzc0lkIjoyNDQ0LCJCcmFuZElkIjo0MTQsIkZpcnN0Q2hhbm5lbElkIjoxMTc4LCJJbXByZXNzaW9uQ291bnQiOjEsIlVzZXJLZXkiOm51bGwsIktleXdvcmRzIjoiamF2YSxqdm0saGVhcCxqbmxwLGphdmEtd2ViLXN0YXJ0IiwiRGVsaXZlcnlNb2RlIjoxLCJSZXZlbnVlIjowLCJJc1RyYWNraW5nQ29va2llRXZlbnRzIjpmYWxzZSwiUGhhbnRvbVBhc3NJZCI6MCwiUGhhbnRvbUNyZWF0aXZlUGFzc0lkIjowLCJDcmVhdGl2ZVBhc3NJZCI6MTMwMzksIklzVmFsaWRVQSI6ZmFsc2UsIklzTm9UcmFjayI6ZmFsc2UsIk1hdGNoaW5nS2V5d29yZHMiOm51bGx90)
Java
maximum memory on Windows XP
Why
is the maximum size of the Java heap fixed?
failed
to create Java Virtual Machine
How
to embed Java Web Start (with jnlp) application on google?
input/output
with Java Web Start
In
java web start where does the jar file get downloaded to?
How
can I use JNLP to download Java 7?
Java
Webstart not working offline (NoRouteToHostException/UnknownHostException)
Use
Java web start to start application on the command line by the file name
creating
a JAVA jnlp file
Hide
loading popup of Java WebStart?
WebStart
keeps trying to use Java 1.4 when I have Java 1.6 installed
Invoke
JNLP file from java code
Using
java web start (jnlp) with several java installed on Windows XP
Java
Web Start / JNLP for non-GUI console application / Code update distribution
Set
Java-web-start Trace file options from server-end
Deploying
*.war application with Java Web Start (JNLP)
Java
web start: how to vary heap memory request in jnlp depending on what client can manage?
Finding
the jnlp file that started a Java application (Java Web Start)
Can
I delete downloaded JNLP file (Java web start/JWS) from Java application?
Java
WebStart does not see the parameters in the first run
JNLP
should use a specific Java version but error results
Java
Webstart Application - Loading Properties From a Separate File
Java
Web Start Jar signing Issue?
Troubleshooting
a Webstart application and accessing log files
How
can I programmatically find the path of JNLP file? I am using Java Web Start to generate the JNLP file
FileNotFoundException
starting 1.4.2 webstart application with java webstart 1.6 over HTTPS
java
get current file content
question
feed
about | faq | blog | chat | data | legal | privacy
policy | jobs | advertising
info | mobile | contact
us | feedback
■ stackoverflow.com ■ api/apps ■ careers ■ serverfault.com ■ superuser.com ■ meta ■ area 51 ■ webapps ■ gaming ■ ubuntu ■ webmasters ■ cooking ■ game
development ■ math ■ photography ■ stats ■ tex ■ english ■ theoretical
cs ■ programmers ■ unix ■ apple ■ wordpress ■ physics ■ home improvement ■ gis ■ electrical engineering ■ android ■ security ■ bicycles ■ dba ■ drupal ■ sharepoint ■ scifi
& fantasy ■ user
experience ■ skeptics ■ rpg ■ judaism ■ mathematica
rev 2012.10.21.4493
site design / logo © 2012 stack exchange inc; user contributions licensed under cc-wiki with attribution
required
log
in | careers | chat | meta | about | faq
Stack
Overflow
Questions
Tags
Users
Badges
Unanswered
Ask
Question
Java
webstart max-heap-size causes JVM cannot be started
![](https://oscdn.geek-share.com/Uploads/Images/Content/201912/02/fdfdb48612e3283776a1f5d2d298f34f.gif)
![](http://engine.adzerk.net/v/v.gif?i=eyJVc2VyIjpudWxsLCJDYXRlZ29yaWVzIjpbXSwiQ3JlYXRlZE9uIjoiXC9EYXRlKDEzNTA4NjkyNjY3ODEpXC8iLCJJZCI6IjE4Yzc1YmIwLWFhMzAtNDFiOS04NDI4LWJkOGMzNjY5N2UxOCIsIlJlbW90ZUlQIjpudWxsLCJVc2VyQWdlbnQiOm51bGwsIlJlZmVycmVyVXJsIjpudWxsLCJVcmwiOm51bGwsIkNyZWF0aXZlSWQiOjI2OTA4LCJSU1NLZXkiOm51bGwsIkFkVHlwZUlkIjo0LCJTaXRlSWQiOjgyNzcsIkNoYW5uZWxJZCI6MTE3OCwiUHJpb3JpdHlJZCI6NzY1LCJOZXR3b3JrSWQiOjIyLCJab25lSWQiOjQzLCJMb2NhdGlvbiI6bnVsbCwiQ2FtcGFpZ25JZCI6MTIwNzMsIlBhc3NJZCI6MjI3NjcsIkJyYW5kSWQiOjgxODksIkZpcnN0Q2hhbm5lbElkIjoxMTc4LCJJbXByZXNzaW9uQ291bnQiOjEsIlVzZXJLZXkiOm51bGwsIktleXdvcmRzIjoiamF2YSxqdm0saGVhcCxqbmxwLGphdmEtd2ViLXN0YXJ0IiwiRGVsaXZlcnlNb2RlIjoxLCJSZXZlbnVlIjo2MjUsIklzVHJhY2tpbmdDb29raWVFdmVudHMiOmZhbHNlLCJQaGFudG9tUGFzc0lkIjowLCJQaGFudG9tQ3JlYXRpdmVQYXNzSWQiOjAsIkNyZWF0aXZlUGFzc0lkIjozODI2OSwiSXNWYWxpZFVBIjpmYWxzZSwiSXNOb1RyYWNrIjpmYWxzZSwiTWF0Y2hpbmdLZXl3b3JkcyI6WyJqdm0iLCJoZWFwIl190)
up vote3down votefavorite | We use java webstart on the client side for a java swing based aplication. Recently we have been experiencing a weird "Cannot start java Virtual machine " error when clicking in the jnlp link. We soon find out its because the max-heap-size setting in the jnlp file was set to 1024m whereas most of the clients PC only have 1 gb physical memory. Set the max-heap-size back to 512m solved the problem. Currently, the relevant line in the jnlp file looks like <j2se version="1.5+" initial-heap-size="100m" max-heap-size="512m"/> I looked into the jnlp spec, but cannot find anything related to the "Java Virtual machine" issue. In theory the max-heap-size should not matter as much as the initial-heap-size. But our experience suggested quite the contrary. The client environment: Windows XP SP2 ( 32bit ), Internet Explorer 8.06, Memory 1G Note max-heap-size set to 1024m can cause the same problem on a machine with 2G ram. Basically, what I am looking for here is some reference/spec/experience about why this is happening, and if there is any get-round for this issue besides increasing the physical memory size. Another thing is that if we leave the max-heap-size unspecified, will the actual physical memory size be used as the max-heap-size, or a system-default one will be used? Thanks, JasonW java jvm heap jnlp java-web-start
| ||
Was this post useful to you? |
3 Answers
activeoldestvotesup vote2down vote | It is likely that this problem is caused by the fact that a sufficiently large memory area could not be allocated to your JVM. The Java object heap has to be allocated in contiguous virtual addresses, for implementation reasons. I noticed that on a Win XP box with 2 Gb RAM this breaks at around 1.5 GB (this off course varies depending on what processes are running on each PC, so YMMV). Checkout the following posts for some explanations: Java maximum memory on Windows XP Why is the maximum size of the Java heap fixed?
| ||
|
![](https://oscdn.geek-share.com/Uploads/Images/Content/202002/22/0b389866c45ae54b716390011061f564.png)
![](http://engine.adzerk.net/v/v.gif?i=eyJVc2VyIjpudWxsLCJDYXRlZ29yaWVzIjpbXSwiQ3JlYXRlZE9uIjoiXC9EYXRlKDEzNTA4NjkyNjY3ODEpXC8iLCJJZCI6IjI4ZDRlY2Q2LTAxYTktNDUzZC1iNTgzLTZkZWY4YTVjYzc1NiIsIlJlbW90ZUlQIjpudWxsLCJVc2VyQWdlbnQiOm51bGwsIlJlZmVycmVyVXJsIjpudWxsLCJVcmwiOm51bGwsIkNyZWF0aXZlSWQiOjU5MjAsIlJTU0tleSI6bnVsbCwiQWRUeXBlSWQiOjQsIlNpdGVJZCI6ODI3NywiQ2hhbm5lbElkIjoxMTc4LCJQcmlvcml0eUlkIjoxNTY4LCJOZXR3b3JrSWQiOjIyLCJab25lSWQiOjQ0LCJMb2NhdGlvbiI6bnVsbCwiQ2FtcGFpZ25JZCI6ODQ3LCJQYXNzSWQiOjI0NDQsIkJyYW5kSWQiOjQxNCwiRmlyc3RDaGFubmVsSWQiOjExNzgsIkltcHJlc3Npb25Db3VudCI6MSwiVXNlcktleSI6bnVsbCwiS2V5d29yZHMiOiJqYXZhLGp2bSxoZWFwLGpubHAsamF2YS13ZWItc3RhcnQiLCJEZWxpdmVyeU1vZGUiOjEsIlJldmVudWUiOjAsIklzVHJhY2tpbmdDb29raWVFdmVudHMiOmZhbHNlLCJQaGFudG9tUGFzc0lkIjowLCJQaGFudG9tQ3JlYXRpdmVQYXNzSWQiOjAsIkNyZWF0aXZlUGFzc0lkIjo4ODA2LCJJc1ZhbGlkVUEiOmZhbHNlLCJJc05vVHJhY2siOmZhbHNlLCJNYXRjaGluZ0tleXdvcmRzIjpudWxsfQ2)
up vote0down vote | I found that both the initial-heap-size and max-heap-size were not well respected by the Mac version of javaws. I ended up replacing them with something like this:<j2se version="1.6+" java-vm-args="-Xmx1024m -Xms256m -Xss8m" /> And finally got it working on Mac with the larger heap size
| ||
feedback |
up vote0down vote | Isn't there a possibility to set the Xmx for Clients with this problem permanently to a lower value? I tried to set Xmx in the Java Control Panel - without any effect. Additionally i exported the environment Varialbe jnlpx-heapsize=x,y without any effect. javaws -J-Xmx=y didn't work too. Only building manually the internal java.exe call did work.
| ||
|
Your Answer
log in | or | Name Home Page |
policy and terms
of service.
Not the answer you're looking for? Browse other questions tagged java jvm heapjnlp java-web-start or ask
your own question.
Hello World!
This is a collaboratively edited question and answer site forprofessionaland enthusiast programmers. It's 100% free, no registration required.
about
» faq
»
tagged
java × 312536
jvm × 2668
heap × 1421
jnlp × 458
java-web-start × 396
asked | 2 years ago |
viewed | 3253 times |
active | 9 months ago |
![](https://oscdn.geek-share.com/Uploads/Images/Content/202002/22/50be91feb6660d4392e9a08f21d72894.jpg)
![](http://engine.adzerk.net/v/v.gif?i=eyJVc2VyIjpudWxsLCJDYXRlZ29yaWVzIjpbXSwiQ3JlYXRlZE9uIjoiXC9EYXRlKDEzNTA4NjkyNjY3ODEpXC8iLCJJZCI6Ijk3Y2ZjYWEwLTA4OTYtNGQ3ZS05OGVlLTQ3YmIxYmQ2OWI3MyIsIlJlbW90ZUlQIjpudWxsLCJVc2VyQWdlbnQiOm51bGwsIlJlZmVycmVyVXJsIjpudWxsLCJVcmwiOm51bGwsIkNyZWF0aXZlSWQiOjgyMTEsIlJTU0tleSI6bnVsbCwiQWRUeXBlSWQiOjE3LCJTaXRlSWQiOjgyNzcsIkNoYW5uZWxJZCI6MTE3OCwiUHJpb3JpdHlJZCI6MTU2OCwiTmV0d29ya0lkIjoyMiwiWm9uZUlkIjo0NSwiTG9jYXRpb24iOm51bGwsIkNhbXBhaWduSWQiOjg0NywiUGFzc0lkIjoyNDQ0LCJCcmFuZElkIjo0MTQsIkZpcnN0Q2hhbm5lbElkIjoxMTc4LCJJbXByZXNzaW9uQ291bnQiOjEsIlVzZXJLZXkiOm51bGwsIktleXdvcmRzIjoiamF2YSxqdm0saGVhcCxqbmxwLGphdmEtd2ViLXN0YXJ0IiwiRGVsaXZlcnlNb2RlIjoxLCJSZXZlbnVlIjowLCJJc1RyYWNraW5nQ29va2llRXZlbnRzIjpmYWxzZSwiUGhhbnRvbVBhc3NJZCI6MCwiUGhhbnRvbUNyZWF0aXZlUGFzc0lkIjowLCJDcmVhdGl2ZVBhc3NJZCI6MTMwMzksIklzVmFsaWRVQSI6ZmFsc2UsIklzTm9UcmFjayI6ZmFsc2UsIk1hdGNoaW5nS2V5d29yZHMiOm51bGx90)
Linked
Javamaximum memory on Windows XP
Why
is the maximum size of the Java heap fixed?
failed
to create Java Virtual Machine
Related
Howto embed Java Web Start (with jnlp) application on google?
input/output
with Java Web Start
In
java web start where does the jar file get downloaded to?
How
can I use JNLP to download Java 7?
Java
Webstart not working offline (NoRouteToHostException/UnknownHostException)
Use
Java web start to start application on the command line by the file name
creating
a JAVA jnlp file
Hide
loading popup of Java WebStart?
WebStart
keeps trying to use Java 1.4 when I have Java 1.6 installed
Invoke
JNLP file from java code
Using
java web start (jnlp) with several java installed on Windows XP
Java
Web Start / JNLP for non-GUI console application / Code update distribution
Set
Java-web-start Trace file options from server-end
Deploying
*.war application with Java Web Start (JNLP)
Java
web start: how to vary heap memory request in jnlp depending on what client can manage?
Finding
the jnlp file that started a Java application (Java Web Start)
Can
I delete downloaded JNLP file (Java web start/JWS) from Java application?
Java
WebStart does not see the parameters in the first run
JNLP
should use a specific Java version but error results
Java
Webstart Application - Loading Properties From a Separate File
Java
Web Start Jar signing Issue?
Troubleshooting
a Webstart application and accessing log files
How
can I programmatically find the path of JNLP file? I am using Java Web Start to generate the JNLP file
FileNotFoundException
starting 1.4.2 webstart application with java webstart 1.6 over HTTPS
java
get current file content
question
feed
about | faq | blog | chat | data | legal | privacy
policy | jobs | advertising
info | mobile | contact
us | feedback
■ stackoverflow.com ■ api/apps ■ careers ■ serverfault.com ■ superuser.com ■ meta ■ area 51 ■ webapps ■ gaming ■ ubuntu ■ webmasters ■ cooking ■ game
development ■ math ■ photography ■ stats ■ tex ■ english ■ theoretical
cs ■ programmers ■ unix ■ apple ■ wordpress ■ physics ■ home improvement ■ gis ■ electrical engineering ■ android ■ security ■ bicycles ■ dba ■ drupal ■ sharepoint ■ scifi
& fantasy ■ user
experience ■ skeptics ■ rpg ■ judaism ■ mathematica
rev 2012.10.21.4493
site design / logo © 2012 stack exchange inc; user contributions licensed under cc-wiki with attribution
required
相关文章推荐
- SoapUI启动报错:The JVM could not be started. The maximum heap size (-Xmx) might be too large
- Java_JVM参数-XX:MaxDirectMemorySize 与 两种 ByteBuffer: heap,direct ByteBuffer
- SoapUI启动报错:The JVM could not be started. The maximum heap size (-Xmx) might be too large
- the jvm could not be started. the maximum heap size
- SoapUI启动报错:The JVM could not be started. The maximum heap size (-Xmx) might be too large
- Java_JVM参数-XX:MaxDirectMemorySize 与 两种 ByteBuffer: heap,direct ByteBuffer
- SoapUI启动报错:The JVM could not be started. The maximum heap size (-Xmx) might be too large
- 认识 java JVM虚拟机选项 Xms Xmx PermSize MaxPermSize 区别
- java.lang.ClassCastException: org.apache.shiro.web.servlet.ShiroHttpServletRequest cannot be cast to
- Caused by: java.lang.ClassCastException: org.springframework.web.SpringServletContainerInitializer cannot be cast to javax.servlet.ServletContainerInitializer错误解决办法
- The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar
- The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar
- 报错:jstl标签——The absolute uri: http://java.sun.com/jsp/jstl/core cannot beresolved in either web.xml o
- java JVM : Xms Xmx PermSize MaxPermSize 区别
- The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar
- Tomcat启动项目,报错The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xm
- java.lang.SecurityException: Filter of class org.apache.catalina.ssi.SSIFilter is privileged and cannot be loaded by this web application
- Jsp http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar
- The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar
- This absolute uri http://Java.sun.com/jsp/jstl/core) cannot be resolved in either web.xml or the jar