title: Java Web Start is not working
body: <p>I have been working on a Java project. It is now over but Java Web start is not working. I compile the program and put dist files in my Tomcat Server. I want clients to download my program and use as a desktop application.</p>
  
  <p>I can run the program inside Netbeans IDE just fine, however when I try it using <code>.jnlp</code> file it is giving errors. Until a while ago I managed to run the program using jnlp, somehow it is giving below errors. I can still run the program with executable jar but I desperately need to use Java Web Start.</p>
  
  <pre><code> `Exception in thread "Abandoned connection cleanup thread" java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "setContextClassLoader")
      at java.security.AccessControlContext.checkPermission(Unknown Source)
      at java.security.AccessController.checkPermission(Unknown Source)
      at java.lang.SecurityManager.checkPermission(Unknown Source)
      at com.sun.javaws.security.JavaWebStartSecurity.checkPermission(Unknown Source)
      at java.lang.Thread.setContextClassLoader(Unknown Source)
      at com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:38)
  Exception in thread "AWT-EventQueue-2" java.lang.ExceptionInInitializerError
      at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:298)
      at java.sql.DriverManager.getConnection(Unknown Source)
      at java.sql.DriverManager.getConnection(Unknown Source)
      at dbo.dealSave.user(dealSave.java:364)
      at TradeX.uyegiris.jButton1ActionPerformed(uyegiris.java:177)
      at TradeX.uyegiris.access$100(uyegiris.java:20)
      at TradeX.uyegiris$2.actionPerformed(uyegiris.java:81)
      at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
      at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
      at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
      at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
      at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
      at java.awt.Component.processMouseEvent(Unknown Source)
      at javax.swing.JComponent.processMouseEvent(Unknown Source)
      at java.awt.Component.processEvent(Unknown Source)
      at java.awt.Container.processEvent(Unknown Source)
      at java.awt.Component.dispatchEventImpl(Unknown Source)
      at java.awt.Container.dispatchEventImpl(Unknown Source)
      at java.awt.Component.dispatchEvent(Unknown Source)
      at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
      at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
      at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
      at java.awt.Container.dispatchEventImpl(Unknown Source)
      at java.awt.Window.dispatchEventImpl(Unknown Source)
      at java.awt.Component.dispatchEvent(Unknown Source)
      at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
      at java.awt.EventQueue.access$400(Unknown Source)
      at java.awt.EventQueue$3.run(Unknown Source)
      at java.awt.EventQueue$3.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
      at java.awt.EventQueue$4.run(Unknown Source)
      at java.awt.EventQueue$4.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
      at java.awt.EventQueue.dispatchEvent(Unknown Source)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
      at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      at java.awt.EventDispatchThread.run(Unknown Source)
  Caused by: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "file.encoding" "read")
      at java.security.AccessControlContext.checkPermission(Unknown Source)
      at java.security.AccessController.checkPermission(Unknown Source)
      at java.lang.SecurityManager.checkPermission(Unknown Source)
      at com.sun.javaws.security.JavaWebStartSecurity.checkPermission(Unknown Source)
      at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
      at java.lang.System.getProperty(Unknown Source)
      at com.mysql.jdbc.StringUtils.&lt;clinit&gt;(StringUtils.java:70)
      ... 43 more
  `
  </code></pre>
  
  <p>Below is the jnlp file. Sorry it is too long. I can provide additional information.</p>
  
  <pre><code>`&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
  &lt;jnlp codebase="http://192.168.0.162:9999/" href="launch.jnlp" spec="1.0+"&gt;
      &lt;information&gt;
          &lt;title&gt;Unit Elektrik Trader Team&lt;/title&gt;
          &lt;vendor&gt;seckin.celik&lt;/vendor&gt;
          &lt;homepage href=""/&gt;
          &lt;description&gt;Versiyon 1&lt;/description&gt;
          &lt;description kind="short"&gt;Unit Elektrik Trader Team&lt;/description&gt;
      &lt;offline-allowed/&gt;
  &lt;/information&gt;
      &lt;update check="background"/&gt;
      &lt;resources&gt;
          &lt;j2se version="1.7+"/&gt;
          &lt;jar href="Trade.jar" main="true"/&gt;
      &lt;jar href="lib/jxl.jar"/&gt;
  &lt;jar href="lib/swingx-all-1.6.4.jar"/&gt;
  &lt;jar href="lib/mysql-connector-java-5.1.23-bin.jar"/&gt;
  &lt;jar href="lib/AbsoluteLayout.jar"/&gt;
  &lt;jar href="lib/beansbinding-1.2.1.jar"/&gt;
  &lt;jar href="lib/antlr-2.7.6.jar"/&gt;
  &lt;jar href="lib/cglib-2.2.jar"/&gt;
  &lt;jar href="lib/commons-collections-3.1.jar"/&gt;
  &lt;jar href="lib/dom4j-1.6.1.jar"/&gt;
  &lt;jar href="lib/jta-1.1.jar"/&gt;
  &lt;jar href="lib/hibernate-core-3.6.10.Final.jar"/&gt;
  &lt;jar href="lib/hibernate-commons-annotations-3.2.0.Final.jar"/&gt;
  &lt;jar href="lib/hibernate-entitymanager-3.6.10.Final.jar"/&gt;
  &lt;jar href="lib/hibernate-tools-3.6.0.CR1.jar"/&gt;
  &lt;jar href="lib/javassist-3.12.0.GA.jar"/&gt;
  &lt;jar href="lib/c3p0-0.9.1.jar"/&gt;
  &lt;jar href="lib/oscache-2.1.jar"/&gt;
  &lt;jar href="lib/slf4j-api-1.6.1.jar"/&gt;
  &lt;jar href="lib/slf4j-simple-1.6.1.jar"/&gt;
  &lt;jar href="lib/hibernate-jpa-2.0-api-1.0.1.Final.jar"/&gt;
  &lt;jar href="lib/dom4j-1.6.1.jar"/&gt;
  &lt;jar href="lib/antlr-2.7.6.jar"/&gt;
  &lt;jar href="lib/cglib-2.2.jar"/&gt;
  &lt;jar href="lib/commons-collections-3.1.jar"/&gt;
  &lt;jar href="lib/jta-1.1.jar"/&gt;
  &lt;jar href="lib/hibernate-core-3.6.10.Final.jar"/&gt;
  &lt;jar href="lib/hibernate-commons-annotations-3.2.0.Final.jar"/&gt;
  &lt;jar href="lib/hibernate-entitymanager-3.6.10.Final.jar"/&gt;
  &lt;jar href="lib/hibernate-tools-3.6.0.CR1.jar"/&gt;
  &lt;jar href="lib/javassist-3.12.0.GA.jar"/&gt;
  &lt;jar href="lib/c3p0-0.9.1.jar"/&gt;
  &lt;jar href="lib/oscache-2.1.jar"/&gt;
  &lt;jar href="lib/slf4j-api-1.6.1.jar"/&gt;
  &lt;jar href="lib/slf4j-simple-1.6.1.jar"/&gt;
  &lt;jar href="lib/jaxb-impl.jar"/&gt;
  &lt;jar href="lib/jaxb-xjc.jar"/&gt;
  &lt;jar href="lib/FastInfoset.jar"/&gt;
  &lt;jar href="lib/gmbal-api-only.jar"/&gt;
  &lt;jar href="lib/ha-api.jar"/&gt;
  &lt;jar href="lib/javax.mail_1.4.jar"/&gt;
  &lt;jar href="lib/jaxws-rt.jar"/&gt;
  &lt;jar href="lib/jaxws-tools.jar"/&gt;
  &lt;jar href="lib/management-api.jar"/&gt;
  &lt;jar href="lib/mimepull.jar"/&gt;
  &lt;jar href="lib/policy.jar"/&gt;
  &lt;jar href="lib/saaj-impl.jar"/&gt;
  &lt;jar href="lib/stax-ex.jar"/&gt;
  &lt;jar href="lib/stax2-api.jar"/&gt;
  &lt;jar href="lib/streambuffer.jar"/&gt;
  &lt;jar href="lib/woodstox-core-asl.jar"/&gt;
  &lt;jar href="lib/jaxws-api.jar"/&gt;
  &lt;jar href="lib/jsr181-api.jar"/&gt;
  &lt;jar href="lib/javax.annotation.jar"/&gt;
  &lt;jar href="lib/saaj-api.jar"/&gt;
  &lt;jar href="lib/activation.jar"/&gt;
  &lt;jar href="lib/jaxb-api.jar"/&gt;
  &lt;jar href="lib/jsr173_1.0_api.jar"/&gt;
  &lt;/resources&gt;
      &lt;application-desc main-class="TradeX.uyegiris"&gt;
      &lt;/application-desc&gt;
  &lt;/jnlp&gt;`
  </code></pre>