This discussion is archived
0 Replies Latest reply: Nov 27, 2013 6:28 AM by Harry707 RSS

java heap space problem using JNLP

Harry707 Newbie
Currently Being Moderated

Hey all,

I have a little experience working with JNLP so i am having some trouble regarding the heap space problem. My application needs to have a suitable amount of heap space available so what i did was to change the heap size in the jnlp like this:

<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.5+" codebase="" href="">
    <information>
        <title>Applet Takes Params</title>
        <vendor>Dynamic Team</vendor>
    </information>
  <security>
  <all-permissions/>
  </security>
    <resources>
        <!-- Application Resources -->
        <java version="1.7+" href="http://java.sun.com/products/autodl/j2se" java-vm-args="-ea" initial-heap-size="128m" max-heap-size="512m"/>
        <jar href="applet_AppletWithParameters.jar"  />
    </resources>
    <applet-desc
         name="Applet Takes Params"
         main-class="com.AppletTakesParams"
         width="800"
         height="50">
             <param name="downloadURL" value=""/>
     </applet-desc>
     <update check="background"/>
</jnlp>

 

 

Now, when i run the app,it gives me these strange lines in the java console when applet call is made :


handleLaunchJVM(): RemoteJVMLauncher.setCallBack for 11
handleLaunchJVM(): now unregisterApplet 11

 

 

and opens up a new java console. And then in that console, the applet runs.

 

Now, after the applet runs it gives me this beautiful message:


Exception in thread "Thread-17" java.lang.OutOfMemoryError: Java heap space
at com.AppletTakesParams.download(AppletTakesParams.java:101)
at com.AppletTakesParams.access$0(AppletTakesParams.java:78)
at com.AppletTakesParams$1.run(AppletTakesParams.java:41)

 

 

 

 

 

 

What am i doing wrong with the JNLP? Can someone please help me.

Also i am using the java version 7 update 45.

 

Please.any help would be appreciated.

 

Thanks.



Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points