0

I have an application that launches javaws using

Runtime.getRuntime().exec(new String[] {[javawsPath], [jnlpPath]}, null);

That works fine. However, I now need to also give it the proxy settings (host and port), which I will prompt the user for before launching javaws.

How can I do this? I tried adding

"deployment.proxy.http.host=[url]", "deployment.proxy.http.port=[port]"

to the String[] in exec(), but that gives me an invalid argument exception.

Any ideas?

Thanks!

  • possible duplicate of [Passing command line arguments to javaws (Java WebStart) executable](http://stackoverflow.com/questions/1396426/passing-command-line-arguments-to-javaws-java-webstart-executable) – assylias Jan 28 '14 at 17:24
  • yeah, i saw that post, but could find an answer there. based on the information from there, it seems like i can just add the two strings to the array like i did, but that didn't work. :-/ if i'm overlooking something from that post though, please let me know. thanks! – pr0crstnation101 Jan 28 '14 at 18:51
  • You should show the exact arguments you pass to `exec()`. Do you include the `-open` or `-arg` flag? See also: http://stackoverflow.com/questions/10606183/trying-to-pass-multiple-command-line-parameters-to-javaws-launch-application – assylias Jan 28 '14 at 19:03
  • i've tried: Runtime.getRuntime().exec(new String[] {"-arg", "deployment.proxy.http.host=url", "deployment.proxy.http.port=port", javawsPath, jnlpPath}, null); and the same thing but without the -arg element – pr0crstnation101 Jan 28 '14 at 20:26
  • You should try to make it work from the command line first. Have you tried with -open? Maybe there are spaces in your paths? – assylias Jan 28 '14 at 20:32
  • yeah i've been trying it from the command line, and yep, i've tried it with open from there. do i need brackets [] anywhere? i dont work with the command line much, so i'm not too sure of the syntax. – pr0crstnation101 Jan 28 '14 at 20:37

0 Answers0