I've been using url parameters to pass arguments to the main-method of the .jar application. After updating to latest jre 7u7 on windows 7, Java-web-start launcher crashes when launching the files.
(JNLP download-servlet and jsp-page parses the url-parameters and inputs them in the argument further down)
The interesting parts of the jsp
<jnlp spec="6.0+" codebase="http://localhost:8080/" href="myfile.jnlp?username=charles">
...
<application-desc main-class="MyMain">
<argument><%=request.getParameter("username")%></argument>
</application-desc>
</jnlp>
So this might or might not be a bug,
Q1: have I been using the href-attribute in a correct way?
Q2: Any smart ideas how to get around the problem?
I get the same problem today. I didn't find anything on the net, but I tried to replace the '?' with the HTML entity '?' and it works.
I have looking for this answer for quite sometime and never got a concrete solution. So here I am after ultimately solving it. I shall put forth the solution below.
Current situation: Had a simple java application to launch from a browser with parameters. The existing route was browser-->index.html-->calls my jnlp file-->calls the main method of my java class.
Needed situation: Now the user would send the arguments say, username from the browser to be sent all the way to the main method of the java class.
Solution:
Change the index.html as follows:
Add function getUrlParameters() (google it) to the javascript part of the index.html
Get the value of the username with the call usernameParam = getUrlParameters("username", "", true)
Create a new jsp file (this is a must) like:
Once this URL is formed you will be sending this to: IFrameDoc.location.replace(URL); in the same index.html
You will get the passed username value in the String[] args of the main method. So now you can check if the param value exists, if so, form the URL with the jsp file or continue with the old jnlp file directly.
This problem has been added in Oracle Bug Database at: