• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applet - Package

 
srihari miriyala
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi guys, i am newbie, i have following code

AppletOne.java




and

a package




while running in a eclipse, i got the data from mySQL database.. but in through command prompt i am getting following error


and




and my html page look like



i 've windows7 OS and 've only java path..

but in eclipse i added mysql-connector-java-5.1.6.jar as reference..


please help me in this...
 
Tim Moores
Bartender
Posts: 2895
46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't run applets using the "java" command - applets are not applications.

As to the DB driver, you need to add its jar file in an archive attribute of the applet tag.
 
srihari miriyala
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for replay me..

i created SignedAppletOne.jar like



and add this to html page like



while seeing it in a browser i am getting an error this





please help me in this


 
Tim Moores
Bartender
Posts: 2895
46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see - the applet is signed; you didn't mention that before. But the applet tag still doesn't point to the DB driver jar file (which also needs to be signed).

Note that using JDBC in an applet is generally considered a security risk. You should consider using a proxy on the web server instead that the applet would access via HTTP, and which in turn uses JDBC to access the DB. That also obviates the need to open up the firewall on the Mysql port.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic