Re: Connection / Permission Problems with java applet
Posted by: Javier Andres Lenis Trujillo
Date: December 12, 2004 07:17PM

mathieu charles wrote:
> 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
> java.security.AccessControlException: access
> denied(java.net.SocketPermission pulsar.***.fr
> resolve)".
>
> when adding 'permission java.net.SocketPermission
> "*", "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();
> stmt.executeUpdate(theRequest);
> }catch (SQLException ex) {}
> Permission Error
>
> JDBC : 3.0.11
>
> thanks for any help


Hello i'd like to know if you already solved the problem, i have the same. so please may you share your solution.

thank you

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.