2
votes

OS: Windows 7 32-bit, Java: Java 7

  1. I have downloaded a jnlp file
  2. Double click on downloaded JNLP to run

jnlp file was not executed. The following error was shown at pop up:

Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit

I also tried to execute from command prompt as follows:

  1. Execute the batch file containing the following command:
    echo "Running Content Studio on Java 7"............
    javaws -uninstall
    "C:\Program Files\Java\jdk1.7.0_25\jre\bin\javaws.exe" http://cbazyx.com/studio/Test.jnlp

But unfortunately same error occurred: Could not create the Java Virtual Machine.

1
Don't forget to add the java tag to Java questions. It has 48,200 followers, as opposed to the 82 for Java-7. - Andrew Thompson
Your machine probably does not have enough memory based on your jnlp heap settings (it is very unlikely to get 2 GB on win 32 bits). - assylias
So, there is no possibility of happening this error on Windows 64 bit. Am I right? - Ripon Al Wasim

1 Answers

2
votes

I have solved it as follows:

Open downloaded Studio.jnlp on an editor. I found the following line in my Studio.jnlp:

<j2se version="1.7.0_13+" 
  java-vm-args="-Xms128m -Xmx2048m" 
  href="http://java.sun.com/products/autodl/j2se"/>  

Where max-heap-size is not defined.

I defined initial-heap-size and max-heap-size as below:

<j2se version="1.7.0_13+" 
  initial-heap-size="100m" 
  max-heap-size="512m" 
  java-vm-args="-Xms128m -Xmx2048m" 
  href="http://java.sun.com/products/autodl/j2se"/>

Finally, Save and double click on Studio.jnlp

It was successfully executed.