Connection / Permission Problems with java applet
Posted by: mathieu charles
Date: October 28, 2004 03:58AM

I've a permission problem when i want to run my applet which access to a MySQL database via JDBC.

Let me explain from the beginning.

I've done a native executable that access the MySQL database via JDBC : no probleme when running the executable on a computer with only JRE 1.4 installed (not the dataBase Server)

Now i want to do the same thing with an applet. I've converted my executable in an Applet , no problem with JBuilder appletviewer. But when i want to start the applet with html/jar file on internet explorer : problem access denied( pulsar.***.fr resolve)".

when adding 'permission "*", "accept, connect, listen,
resolve";' to java.policy : the applet works. But i can't modify all the java.policy of the computer acceding to the applet!!!How can i do to make it works without modifing this file.

the computer with the Web server, the computer with the SQL server and the computer requestiong the applet are on the same network.

Is it possible to make the applet works on a computer not in this network?

Note :
Java code :
try { Class.forName("com.mysql.jdbc.Driver").newInstance();}catch (Exception ex) {}
no problem

try {
Connection conn = DriverManager.getConnection("jdbc:mysql://pulsar.***.fr/db_charles?user=***&password=***");
Statement stmt = null;
ResultSet rs = null;
stmt = conn.createStatement();
}catch (SQLException ex) {}
Permission Error

JDBC : 3.0.11

thanks for any help

Options: ReplyQuote

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.