Reputation: 10639
I have a question how to run JAR files with the parameters using a JNLP protocol . For example, to properly run the selenium-server-standalone-2.21.0.jar package I call it as:
selenium-server-standalone-2.21.0.jar -timeout 60000 -trustAllSSLCertificates -port 5555
When I add these parameters as:
<jar href="/selenium-server-standalone-2.21.0.jar -timeout 60000 -trustAllSSLCertificates -port 5555"/>
I'm getting error - no such file found. I guess that these parameters are treated as part of the file name and for this reason I got this error. Where can I place the parameters for the call JAR package in XML below.
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="http://test.com/">
<information>
<title>Selenium-Server-Standalone-2.21.0</title>
<vendor>ESKY Testers Toolkit</vendor>
<homepage href="http://www.esky.pl/"/>
<description>starts selenium server on client machine</description>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.4+"/>
<jar href="/selenium-server-standalone-2.21.0.jar"/>
</resources>
<application-desc main-class="org.openqa.selenium.server.SeleniumServer"/>
</jnlp>
Upvotes: 2
Views: 3981
Reputation: 168825
Add arg
elements as children of the application-desc
element. E.G.
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="http://test.com/">
<information>
<title>Selenium-Server-Standalone-2.21.0</title>
<vendor>ESKY Testers Toolkit</vendor>
<homepage href="http://www.esky.pl/"/>
<description>starts selenium server on client machine</description>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.4+"/>
<!-- size. The downloadable size of the JAR file in bytes. -->
<jar href="/selenium-server-standalone-2.21.0.jar" size="21247" />
</resources>
<application-desc main-class="org.openqa.selenium.server.SeleniumServer">
<argument>-timeout</argument>
<argument>60000</argument>
<!-- etc... -->
</application-desc>
</jnlp>
Former comments (now deleted).
Upvotes: 2