-1

In my application's JNLP file, I specify the PermGenSize in JNLP java-vm-args parameter. After upgrading Java on my MAC to Java7u13, the JNLP fails to launch with java-vm-args params. If I remove the java-vm-args parameter everything works fine.

My java-vm-args parameter is java-vm-args="-XX:MaxPermSize=128m"

Is this a Java 7 issue?. I am able reproduce the above problem in solaris also.

During the failure I see the following exception in trace file:

 Log started: Tue, 19 Feb 2013 11:02:41 +0530
java.lang.StringIndexOutOfBoundsException: String index out of range: -8
        at java.lang.String.substring(String.java:1911)
        at com.sun.deploy.util.Property.<init>(Unknown Source)
        at com.sun.deploy.util.Property.createProperty(Unknown Source)
        at com.sun.deploy.util.JVMParameters$ArgumentSet.addArgument(Unknown Source)
        at com.sun.deploy.util.JVMParameters.addArgumentImpl(Unknown Source)
        at com.sun.deploy.util.JVMParameters.parseImpl(Unknown Source)
        at com.sun.deploy.util.JVMParameters.parseTrustedOptions(Unknown Source)
        at com.sun.javaws.Main.initializeExecutionEnvironment(Unknown Source)
        at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
        at com.sun.javaws.Main.access$000(Unknown Source)
        at com.sun.javaws.Main$1.run(Unknown Source)
        at java.lang.Thread.run(Thread.java:722)
Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
avis
  • 599
  • 1
  • 6
  • 18
  • how exactly you start the program? – Nikolay Kuznetsov Feb 19 '13 at 05:44
  • I launch the JNLP file from the browser. Internally it uses javaws command by passing the path to downloaded JNLP file as parameter – avis Feb 19 '13 at 06:02
  • what is content of JNLP file? where `java-vm-args` is specified? – Nikolay Kuznetsov Feb 19 '13 at 06:26
  • Be sure to validate the JNLP using [JaNeLA](http://pscode.org/janela/). – Andrew Thompson Feb 19 '13 at 08:15
  • @Nickolay, the java-vm-args parameter is part of resources tag in JNLP file. PLease refer to following link for more info on JNLP file format :http://docs.oracle.com/javase/7/docs/technotes/guides/javaws/developersguide/syntax.html – avis Feb 19 '13 at 08:20
  • @AndrewThompson The same JNLP file is working with Windows 7 running Java 7u13. Only in MAC I am facing this issue. It used to work fine earlier on Apple JDK 6 in MAC. I also verified the JNLP using JaNeLA.No error was reported on java-vm-args params – avis Feb 19 '13 at 08:22
  • *"No error was reported on java-vm-args params"* Was any error reported in any other part of the JNLP? – Andrew Thompson Feb 19 '13 at 09:27
  • 3
    Looks like there is some issue introduced in Java 7u9 on parsing of java-vm-args params (check the Known Issues section in the below link) : http://www.oracle.com/technetwork/java/javase/7u9-relnotes-1863279.html . Also check @ http://www.inductiveautomation.com/forum/viewtopic.php?f=72&t=9232 – avis Feb 21 '13 at 00:40

1 Answers1

0

Permgen is gonna disappear in futher releases. Remove XX:MaxPermSize from your arguments lists and re-run application.

Mon Calamari
  • 4,403
  • 3
  • 26
  • 44