My application's JNLP file inside tomcat\webapps\swingapp\simple.jnlp
<?xml version="1.0" encoding="utf-8"?>
<jnlp
spec="1.0+"
codebase="http://localhost:8080/swingapp/"
href="simple.jnlp">
<information>
<title>Simple Swing application</title>
<vendor>Me</vendor>
<description>Simple Swing Demo Application</description>
<description kind="short">Simple Swing Demo Application.</description>
<offline-allowed/>
</information>
<resources>
<j2se version="1.7.0+"/>
<jar href="simple.jar"/>
</resources>
<application-desc/>
</jnlp>
My MANIFEST.MF file inside simple.jar contains these entries :
Manifest-Version: 1.0
Class-path: mysql-connector-java-5.1.18-bin.jar
Sealed: true
Created-By: 1.7.0_01 (Oracle Corporation)
Main-Class: com.ui.LoginForm
simple.jar - I have a simple swing login window where I check the username/password against a mysql table.
When I execute the jar from the command it works fine. It connects to the mysql database and checks the username/password.
But when I launch the application using the url "http://localhost:8080/swingapp/simple.jnlp", it cannot find the mysql driver. Though I can see its in the jar when I unjar using 'jar xf'. Log file from "C:\Documents and Settings\user\Application Data\Sun\Java\Deployment\log"
<record>
<date>2012-03-18T23:15:39</date>
<millis>1332092739265</millis>
<sequence>0</sequence>
<logger>com.sun.deploy</logger>
<level>FINE</level>
<class>com.sun.deploy.trace.LoggerTraceListener</class>
<method>print</method>
<thread>8</thread>
<message>user name : admin
</message>
</record>
<record>
<date>2012-03-18T23:15:39</date>
<millis>1332092739265</millis>
<sequence>1</sequence>
<logger>com.sun.deploy</logger>
<level>FINE</level>
<class>com.sun.deploy.trace.LoggerTraceListener</class>
<method>print</method>
<thread>8</thread>
<message>password : swingAdmin
</message>
</record>
<record>
<date>2012-03-18T23:15:39</date>
<millis>1332092739281</millis>
<sequence>2</sequence>
<logger>com.sun.deploy</logger>
<level>FINE</level>
<class>com.sun.deploy.trace.LoggerTraceListener</class>
<method>print</method>
<thread>8</thread>
<message>java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
</message>
</record>
<record>
What could be the cause here?