Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Mar 2007

    Applet with mysql

    Hi guys!
    I dont know if this is the right place where i have to post it! If it is not please let me know where I should post it....

    I have a small problem using the applet with the driver mysql.
    This is what i managed to do:
    I have created a java program which is connected with a database mysql using the driver jdbc.
    It works fine when i run the program from the netbeans tool.
    Now I would like to create an applet and i have created this class:

    import Webpages.InitialWebPage;
    import java.awt.*;
    import java.applet.*;

    public class RunApplet extends Applet
    InitialWebPage f;
    public void init()

    f = new InitialWebPage();


    The class InitialWebPage is the one which contains the main method.

    Then I have done:

    This is an applet:<BR>

    <applet code="RunApplet.class"


    I have put this file in the same folder of the file RunApplet.class

    But I have received this exception:
    java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
    java.security.AccessControlException: access denied (java.lang.RuntimePermission exitVM.0)

    I tried to resolve the first exception and I created a jar file: anto.jar which contains the RunApplet.class and mysql-connector-java-5.1.0-bin.jar

    I modified the html code in this way :

    Il seguente è un applet:<BR>

    <applet archive="anto.jar" code="RunApplet.class">


    But now I received this execption:
    java.security.AccessControlException: access denied (java.util.PropertyPermission java.home read)

    Please could someone help me to fix this problem? What I have to do to connect an applet with a mysql database?

    thanks in advance


  2. #2
    Regular Contributor
    Join Date
    Aug 2006

    Re: Applet with mysql

    I guess the post is a little bit out of topic, but take a look at this example: http://tecfa.unige.ch/guides/java/st...ingApplet.html

    Or more specifically, at this source code: http://tecfa.unige.ch/guides/java/st...ingApplet.java

Similar Threads

  1. applet to midlet
    By arik_v in forum Mobile Java General
    Replies: 2
    Last Post: 2005-10-21, 20:33
  2. Series 60 handset and a USIM applet
    By SteveHarkins in forum General Development Questions
    Replies: 0
    Last Post: 2005-09-14, 12:59
  3. How can I modify an application into an applet?
    By eyvind1 in forum Mobile Java General
    Replies: 0
    Last Post: 2004-07-12, 14:25
  4. JDBC & MySQL problems
    By cyntellitek in forum Mobile Java General
    Replies: 1
    Last Post: 2003-03-10, 01:52

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts