4 Replies Latest reply: Jan 19, 2012 12:38 AM by 881648 RSS

    VM arguments

    881648
      All,

      I am trying to use javaws to start an application with the following .jnlp configuration file. My application requires the following VM parameters.
      -Djavax.net.ssl.keyStore=NONE -Djavax.net.ssl.keyStoreType=PKCS11 -Dhttp.proxyHost=xxxx.xxx.com -Dhttp.proxyPort=80.

      It seems to be when javaws launches the application, it is not passing the above parameters and I am getting exception. The question that I have
      whether I have right  .jnlp file contents specifially related to above parameters. I have also listed exception details below the .jnlp contents
      Any pointers greatly appreciated and thanks for your time.

      Thanks,
      Soma.

      ==========================================================================================
      <?xml version="1.0" encoding="utf-8"?>
      <!-- JNLP File for Login into PF-->
      <jnlp spec="1.0+" codebase="http://xxx.xxx.xx.xx:8080/AuditToolWebApplication" href="Login.jnlp">

      <information>
      <title>Login into PF</title>
      <vendor>ME</vendor>
      <description>Provides login facility using CAC on a local machine</description>
      </information>
      <resources>
           <j2se version="1.4+" java-vm-args="-Djavax.net.ssl.keyStore=NONE -Djavax.net.ssl.keyStoreType=PKCS11 -Dhttp.proxyHost=proxy1.lmco.com -Dhttp.proxyPort=80"/>
           <jar href="LoginApplet.jar" />
      </resources>

      <application-desc main-class="ifsdTools.AuditToolMain" />
      </jnlp>
      =============================================================================================================

      =============================================================================================================
      java.net.ConnectException: Connection refused: connect
           at java.net.PlainSocketImpl.socketConnect(Native Method)
           at java.net.PlainSocketImpl.doConnect(Unknown Source)
           at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
           at java.net.PlainSocketImpl.connect(Unknown Source)
           at java.net.SocksSocketImpl.connect(Unknown Source)
           at java.net.Socket.connect(Unknown Source)
           at java.net.Socket.connect(Unknown Source)
           at sun.net.NetworkClient.doConnect(Unknown Source)
           at sun.net.www.http.HttpClient.openServer(Unknown Source)
           at sun.net.www.http.HttpClient.openServer(Unknown Source)
           at sun.net.www.http.HttpClient.<init>(Unknown Source)
           at sun.net.www.http.HttpClient.New(Unknown Source)
           at sun.net.www.http.HttpClient.New(Unknown Source)
           at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
           at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
           at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
           at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
           at com.sun.deploy.net.BasicHttpRequest.doGetRequestEX(Unknown Source)
           at com.sun.deploy.net.DownloadEngine.isUpdateAvailable(Unknown Source)
           at com.sun.deploy.net.DownloadEngine.isUpdateAvailable(Unknown Source)
           at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
           at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
           at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)
           at com.sun.javaws.LaunchDownload$DownloadTask.call(Unknown Source)
           at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
           at java.util.concurrent.FutureTask.run(Unknown Source)
           at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
           at java.lang.Thread.run(Unknown Source)

      ========================================================================================================

      Edited by: 878645 on Jan 18, 2012 5:47 PM
        • 1. Re: VM arguments
          EJP
          The VM arguments are restricted for security reasons. Use the <property> element.
          • 2. Re: VM arguments
            881648
            I tried by using 'property' element, but did not work. PL. see the .jnlp file contents

            ===============================================================================================
            <?xml version="1.0" encoding="utf-8"?>
            <!-- JNLP File for Login into PF-->
            <!-- <jnlp spec="1.0+" codebase="http://localhost:8080/JNLPTesting/Login.jnlp" href="Login.jnlp"> -->
            <jnlp spec="1.0+" codebase="http://localhost:8080/AuditToolWebApplication" href="Login.jnlp">

            <information>
            <title>Login into PF</title>
            <vendor>ME</vendor>
            <description>Provides login facility using CAC on a local machine</description>
            </information>
            <resources>
            <j2se version="1.4+"/>
            <jar href="LoginApplet.jar" />
            </resources>

            <property name="-Djavax.net.ssl.keyStore" value="NONE"/>
            <property name="-Djavax.net.ssl.keyStoreType" value="PKCS11"/>
            <property name="-Dhttp.proxyHost" value="proxy1.lmco.com"/>
            <property name="-Dhttp.proxyPort" value="80"/>

            <application-desc main-class="ifsdTools.AuditToolMain" />
            </jnlp>
            ====================================================================================================================
            • 3. Re: VM arguments
              EJP
              <property name="-Djavax.net.ssl.keyStore" value="NONE"/>
              The name of that property is javax.net.ssl.keyStore. Same mistake in the others.
              • 4. Re: VM arguments
                881648
                Thanks you very much that worked.