Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

connecting to a database using Applets  RSS feed

Cool Impression
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Applet while creating a database connection I get
RuntimePermissionException "Access is denied"
while same code is running in windows 2000, and on Some Systems it runs.
Code is very simple. but I am getting Exception.
The code is:
import java.applet.*;
import java.sql.*;
public class testapp extends Applet{
static Connection cn;
static Statement st;
static ResultSet rs;
public void init()
cn=DriverManager.getConnection("jdbc dbc:testdsn");
rs=st.executeQuery("select * from tablename");;
}catch(Exception e){System.out.println(e);}
This is the code and I am getting the Exception on the line
What is this Error, and How this Exception can be solved Please
guide me about that.
It's Urgent.....
Thank You..;

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!