Applet to Oracle

Hello,
I have written an aplet to connect to oracle. Now, i have the oracle loaded on to my PC and the applet is also there on the same PC. I am using Oracle thin driver to connect. It works fine with application as i give the classpath while executing the java programs. But here when i load the HTML for the applet, i get error
Can't find the driver specified : OracleDriver
here is the code i am using:
String url = "oracle.jdbc.driver.OracleDriver";
String connect_string = "jdbc:oracle:thin:@homepc:1521:ORA815";
I am using ForName(url) and DriverManager.getConnection(connect_string..)
I guess it is not recognizing the path where this orcledriver class is located. I don't have any knowledge as to how to specify this classpath in applet tag in HTML file if atall it is possible. Somebody please help in telling me what should be done to connect to Oracle from an Applet.
Once more i am telling the applet and Oracle both are on the same PC. Only in different directories. Hope this is ok.
I will appreciate any kind of help.
Thanks a lot for the helper in advance.

Are you using a Webserver to deploy the applet ?.
Are you using the appletviewer ?.
By default all classfiles required by the Applet would be searched relative to the codebase from which the applet was downloaded.
You could include Java Archive files using
the ARCHIVE tag of the applet to download jar files containing the classes required by the applet.
<APPLET CODE="mypackage.MyApplet.class"
CODEBASE="/test/"
ARCHIVE = "MyApplet.jar,
jdev-rt.zip,
classes111.zip" ...>
In your case, its not able to find the Driver, since th driver classes are present in the JDBC zip file classes111.zip. You need
to include it in the ARCHIVE.
If you are excuting the applet without the webserver, then
In the above, "/test/" is a virtual directory
mapped in the webserver pointing to a physical directory. It is in this directory
on the webserver system that the class file
pointed by the CODE & the JAR files pointed
by ARCHIVE.
If you are executing the applet without the
webserver, then have the classes111.zip &
the applet class in the directory where the html file is and have the applet tag as follows
<APPLET CODE="applet.class"
CODEBASE="."
ARCHIVE = "classes111.zip">
You could find the classes111.zip under
$ORACLE_HOME\jdbc\lib
Hope this helps.
null

Similar Messages

  • Embedding Java Applet in Oracle Form

    I'd like to embed Java applet in Oracle Form. Please someone help me..let me know how to do it. Also I need to know how'll I use a jar within Oracle. Please help.
    Regards
    Rashed

    Hi Grant
    Thanks...I developed an applet which has a button on it and clicking the button something will happen. I mean this is a complete java project. Now I need to use this java applet from Oracle Form...that means I'll develop an oracle form on which the applet will be embedded so that the button on the applet can be pressed. Now could you please help me do this? I also have another problem but I need to resolve this first.
    Rashed

  • Connectivity of Applet with Oracle

    I am able to connect an Applet to oracle.It is displayed on the client browser only when there is an .java.policy file in my home directory.I created a .java.policy file on my server home directory.It is not running on the client machine.Please let me know how i can overcome this problem.Going through some of the previous topics in the forum i saw that signing the applet is one of the solution....please let me know how i can sign the applet.....its very urgent.

    we're currently looking at building the reports j2ee thin client for ibm websphere - however do not have a scheduled date for this. you can see if the j2ee thin client meets your requirements by looking at the doc for it for the bea client:
    http://otn.oracle.com/products/reports/htdocs/getstart/examples/Tools/thinclient/bea/Readme.html
    is something like this for websphere what you are looking for?
    thanks
    paul narth
    oracle reports & portal product management

  • Problem of calling the applet by Oracle Form

    Hi,
    The oracle form invokes a applet function, and send one parameter to the applet. The parameter will be displayed in the applet correctly at the first time.
    But if the user do not close the applet and use invoke the applet function again, the applet cannot show the latest parameter and keep show the old one.
    Please give me some adive.
    Thanks

    Hi,
    This is a JDeveloper help forum, the Formsforum can be found at Forms Now you might think that Forms developers don't understand Java well enough, they do however understand teh Forms context and this is important to answr the question.
    a) Which Java version does your ben require?
    b) Are you using JInitiator or JavaPlugin (Jinitiator only supports Java 1.3)
    c) Is your PJC signed? Note that running an app stand alone as a Java app does not require special grants. Running it within a JavaApplet - as Forms is - does execute teh bean in a security sandbox, for which reasons the jar file must be signed and the public key be available in the Forms certdb.txt file (assuming Jinitiator)
    d) An exception stack trace gives more information than "Oracle Form it doesn't run and exception is thrown on javax.imageio and other packages", which is meanlingless to me and others. Teh stack trace canbe copied from teh JInitiator console
    I recommend resending this question to the Forms forum
    Frank

  • Error connecting applet with oracle database

    hi all,
    here i m running the following code .
    it executes the following query "Select * from emp";
    the number in the text filed decides the column number to be displayed.
    import java.awt.*;
    import java.applet.*;
    import java.sql.*;
    /*<applet code=project.class width=300 height=200>
    </applet>*/
    public class project extends Applet
    Statement stmt=null;
    Connection conn = null;
    TextField t1;
    public void init()
    t1 = new TextField(2);
    add(t1);
    t1.setText("0");
    public void paint(Graphics g)
    int x=0,y=0,z=0;
    String s1,s2,s;
    try{
    DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
    catch(Exception e)
    try{
    conn = DriverManager.getConnection
    ("jdbc:oracle:thin:@anant:1521:student", "scott", "tiger");
    stmt = conn.createStatement();
    catch(Exception e)
    s1 = t1.getText();
    x = Integer.parseInt(s1);
    try{
    ResultSet rset = stmt.executeQuery("select * from emp");
    while (rset.next())
    s2 = (rset.getString(x));
    g.drawString(s2,100,100);
    stmt.close();
    catch(Exception e){}
    public boolean action(Event event,Object obj)
    repaint();
    return true;
    i m getting following error.
    Exception in thread "AWT-EventQueue-1" java.lang.NoClassDefFoundError: oracle/jdbc/OracleDriver
    at project.paint(project.java:23)
    at java.awt.Container.update(Container.java:1730)
    at sun.awt.RepaintArea.updateComponent(RepaintArea.java:239)
    at sun.awt.RepaintArea.paint(RepaintArea.java:216)
    at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:254)
    at java.awt.Component.dispatchEventImpl(Component.java:4031)
    at java.awt.Container.dispatchEventImpl(Container.java:2024)
    at java.awt.Component.dispatchEvent(Component.java:3803)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    this error comes when i run every jdbc applet.
    can anyone suggest any solution.

    Mintu,
    You said:
    i do have to access to jdbc driversNo, you don't. Otherwise you wouldn't be getting that error message.
    Good Luck,
    Avi.

  • Error connecing applet with oracle database

    here i m running the following code .
    it executes the following query "Select * from emp";
    the number in the text area decides the column number to be displayed.
    import java.awt.*;
    import java.applet.*;
    import java.sql.*;
    /*<applet code=project.class width=300 height=200>
    </applet>*/
    public class project extends Applet
    Statement stmt=null;
    Connection conn = null;
    TextField t1;
    public void init()
    t1 = new TextField(2);
    add(t1);
    t1.setText("0");
    public void paint(Graphics g)
    int x=0,y=0,z=0;
    String s1,s2,s;
    try{
    DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
    catch(Exception e)
    try{
    conn = DriverManager.getConnection
    ("jdbc:oracle:thin:@anant:1521:student", "scott", "tiger");
    stmt = conn.createStatement();
    catch(Exception e)
    s1 = t1.getText();
    x = Integer.parseInt(s1);
    try{
    ResultSet rset = stmt.executeQuery("select * from emp");
    while (rset.next())
    s2 = (rset.getString(x));
    g.drawString(s2,100,100);
    stmt.close();
    catch(Exception e){}
    public boolean action(Event event,Object obj)
    repaint();
    return true;
    i m getting following error.
    Exception in thread "AWT-EventQueue-1" java.lang.NoClassDefFoundError: oracle/jdbc/OracleDriver
    at project.paint(project.java:23)
    at java.awt.Container.update(Container.java:1730)
    at sun.awt.RepaintArea.updateComponent(RepaintArea.java:239)
    at sun.awt.RepaintArea.paint(RepaintArea.java:216)
    at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:254)
    at java.awt.Component.dispatchEventImpl(Component.java:4031)
    at java.awt.Container.dispatchEventImpl(Container.java:2024)
    at java.awt.Component.dispatchEvent(Component.java:3803)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    this error comes when i run every jdbc applet.
    can anyone suggest any solution.

    seems as if your client machines are missing the oracle driver. This is one of the disadvantages of a single tier environment you have to make sure that the oracle driver is available to the machines where the applet is run.
    If you have the possibility to define/change the configuration or setup of these machines, e.g. in an intranet environment) deploy the driver in the ext directory of the virtual machines used. If not you can make it a part of your applet jar file, so it is downloaded with the applet code and therefore available to the virtual machines.

  • Urgent : Communicate from JAVA Applet to Oracle Forms

    Hi All,
    I have developed swing applet. Through this applet I need to start the Oracle Forms on web and access it as well. Is there a way to to this. In this case, Oracle Form is using Global Variables, and the requirement is to set these from my swing applet.

    Many thnx Frank.
    Still little confused. I am J2EE guys and hardly have any understanding on Oracle Forms. I am explaining the requirement in detail so as to you can get an insight into my issue.
    We have a developed a swing Applet, which would be access on web. We have received Oracle Forms from the client, and this has been installed on Oracle10gAS. Our application is installed on the same server. Once user starts interactions with the applet, it will be session based. Also the applet is running at the client end and the form would open at the client end as well. So how is this singleton going to benefit it.
    If the singleton in placed at the server end, how would be maintain the session?
    Can the solution you are mentioning, used in some way to implement SSO, although the login will be done through the applet?
    I am sorry to be a trouble, but if can possibly provide some code snippet, it would be of immense help.
    Thnx a million!
    Regards,
    Rajiv

  • Query to connect Java Applet to Oracle 10g.

    I am developing an Applet in Java 1.5.0.7.My database is Oracle 10g.Now when i connect Oracle to Java I get the Error : java.lang.ExceptionInInitializerError
    and it does not get connected.Please help me anyone.
    Below is the code which i have written.
    import java.awt.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.MouseEvent;
    import java.beans.PropertyChangeEvent;
    import java.beans.PropertyChangeListener;
    import java.sql.*;
    import java.util.ArrayList;
    import javax.swing.JApplet;
    import javax.swing.JButton;
    import javax.swing.JLabel;
    public class tt7 extends JApplet
         implements ActionListener, PropertyChangeListener
    private int m_uniqueID = 0;
         JLabel m_lblRadius;
         // A button the user can click to display the Add Theme wizard.
         JButton m_btnAddTheme;
         static String m_mapxtremeURL = null;
         // TODO: Specify a map file name such as "uk.mdf" (if the mdf file is in
         // in same directory that the applet was loaded from),
         // or an URL to a map file, such as "http://host.com/maps/uk.mdf".
         // Or, instead of specifying this URL explicitly here, you can specify it
         // in the HTML page that loads the applet (using the 'filetoload' param).
    ResultSet rs=null ;
    ArrayList arrlist=null;
    ArrayList arrlist1=null;
    ArrayList arrlist2=null;
    //Connection con=null;
    Statement st=null;
         public void start()
         } // start method
         public void init()
    try{
    // System.out.println("helloooooooo");
    Class.forName("oracle.jdbc.driver.OracleDriver");
    //Class.forName("oracle.jdbc.driver.OracleDriver");
    Connection con= DriverManager.getConnection("Jdbc:oracle:thin:@asl005:1521:geo","system","1234567");//"jdbc:oracle:thin:@asl005:1521:geo","system","1234567");
    System.out.println("helloooooooo");
    System.out.println("CON:"+con.toString());
    st = con.createStatement();
    System.out.println("St:"+st);
    catch(Exception e2){System.out.println("Exception :"+e2);}
    catch(ExceptionInInitializerError s)
    System.out.println("Exception2 :"+s);
    }// If the HTML page specified parameters, use them to
              // override our default values.
              // See if a MapDef file was specified in the HTML file.
         }     // propertyChange method
         // Respond to the user actions, such as clicking
         // the Add Theme button.
    public void actionPerformed(ActionEvent e)
    // LocalDataProviderRef localDPRef = null;
    // a static label displayed in the applet
    public void propertyChange(PropertyChangeEvent evt) {
    This is the HTML CODE...
    <HTML>
    <HEAD>
    <TITLE>SimpleMap applet demonstration</TITLE>
    </HEAD>
    <BODY>
    <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    WIDTH = 600 HEIGHT = 440
    codebase="http://java.sun.com/products/plugin/1.3.1/jinstall-131-win32.cab#Version=1,3,1,0">
    <PARAM NAME = CODE VALUE = "tt7.class" >
    <PARAM NAME=archive VALUE="classes12.jar">
    <PARAM NAME="type" VALUE="application/x-java-applet;version=1.5">
    <COMMENT>
    <EMBED type="application/x-java-applet;version=1.5"
    CODE = "tt7.class"
    WIDTH = 600 HEIGHT = 440
    archive="classes12.jar"
    pluginspage="http://java.sun.com/products/plugin/1.3.1/plugin-install.html">
    <NOEMBED></COMMENT>
    alt="Your browser understands the &lt;APPLET&gt; tag but isn't running the applet, for some reason."
    Your browser is completely ignoring the &lt;APPLET&gt; tag!
    </NOEMBED></EMBED>
    </OBJECT>
    </BODY>
    </HTML>

    My dear colleague, You better consider asking this question in Jdeveloper forum.
    I have a simple code for Windows application. You can easily convert it into Applet application..
    import java.awt.*;
    import java.awt.event.*;
    import java.sql.*;
    import oracle.jdbc.*;
    import oracle.sql.*;
    public class QueryFrame extends Frame {
    TextField inputText;
    public QueryFrame() {
    super("Query Interface");
    setSize(450, 250);
    addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    System.exit(0);
    ActionListener printListener = new ActionListener() {
    public void actionPerformed(ActionEvent ae) {
    ConnectAndRun(inputText.getText());
    Panel toolbar = new Panel();
    toolbar.setLayout(new FlowLayout(FlowLayout.LEFT));
    Button queryButton = new Button("Run Query");
    queryButton.addActionListener(printListener);
    toolbar.add(queryButton);
    inputText = new TextField(14);
    toolbar.add(inputText);          
    // The "preferred" BorderLayout add call
    add(toolbar, BorderLayout.NORTH);
    public static void main(String args[]) {
    QueryFrame tf1 = new QueryFrame();
    tf1.setVisible(true);
         public void ConnectAndRun(String s)
              String sqlquery;
              if (s.equals(""))
              sqlquery ="select * from DEPT where LOC is null";
              else
              sqlquery ="select * from DEPT where LOC like '" + s + "'";
              System.out.println(sqlquery);
              try
              DriverManager.registerDriver (new oracle.jdbc.OracleDriver());
         Connection conn = DriverManager.getConnection ("jdbc:oracle:thin:@localhost:1521:HELLO","scott","tiger");
         Statement stmt = conn.createStatement ();
              ResultSet rset = stmt.executeQuery (sqlquery);
              while (rset.next ())
                   System.out.println( rset.getInt("DEPTNO"));
                   System.out.println( rset.getString("DNAME"));
                   System.out.println (rset.getString("LOC"));
              rset.close();
         stmt.close();          
              catch (SQLException se)
                   System.out.println(se);
    Make sure you have appropriate libraries in classpath...

  • Need help re applet and oracle thin

    I'm having with applets when it comes to connection to the database. Here's what happened I want to integrate my Elixir report to my applet application I compiled it and I saw no error. But when I tried to run a dialog box appeared into my screen with a message
    "java.security.AccessControlException:access denied(java.util.PropertyPermission oracle.jserver.version read)"
    what's wrong with this I don't know what to do already hope you can help me figure out what's wrong with my program tnx.
    here's my html code:
    <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta name="Author" content="Shem Kua">
    <meta name="GENERATOR" content="Mozilla/4.61 [en] (Win98; I) [Netscape]">
    <title>PPI Reports</title>
    </head>
    <body>
    <applet codebase="./" code="ReportApplet" archive ="report.jar,elxrt.jar, ojdbc14.jar" width=780 height=480>
    <param name=mode value="appletviewer">
    <param name=dsmfile value="sav/ppi.sav">
    <param name=template value="templates/ppi.template">
    </applet>
    </body>
    </html>

    In contrast to what many people say in this forum, it is possible to have an unsigned applet access a database. You don't even have to manipulate the client's policy-file. The requirement is that the database is located on the same machine as the applet is downloaded from.There are however other things that can break this possibility. One is the database-driver itself.
    In the case of Oracle we have tried using different versions of the driver. When using version 8.1.7 or 9.0.1 things work nicely, but when switching to version 9.2 it stops working. There is a question on OTN [1]. Let's see what Oracle has to say about it.
    [1] Problem connecting using Oracle JDBC drivers

  • Forms 11g: Multiple applets same oracle session??

    Hi,
    I am developing an AJAX environment that integrates different technologies, including Forms 11g.
    I need to open multiple forms within the environment, I'm calling to various forms and works fine.
    But the problem is that it opens a database session for each applet that is executed.
    Is it possible to have multiple applets with a unique session of Oracle?
    Did you configure the Forms Service? With the Parameters to environment?
    Thanks in advanced

    That's a feature that would make the whole Forms Community happy. Not me, and most others B-)
    http://talk2gerd.blogspot.com/2011/08/result-of-2011-oracle-forms-poll-part-7.html
    My most wanted would be the same as #1 on that list: reintroduction Client/Server.
    Anyway, as for the OP:
    I am developing an AJAX environment that integrates different technologies, including Forms 11g.Are you looking for something like this?
    http://www.oracle.com/technetwork/articles/adf/wilfred-adf-forms-099635.html

  • Applet and Oracle JInitiator

    Hi,
    I have JSP page contain two things
    1- Applet (for example: JTree with checkboxes)
    2- IFRAME and the source is Oracle Form (http://svr:port/forms90/f90servlet?xxx).
    the Applet need Web Start Launcher as a part of JRE
    and the Oracle Form need JInitiator, the two needs JVM at the same time and then a message appear "Attachment to running Virtual Machine failed"
    is there any way to avoid this conflict?
    thanks

    oracle-sun-forums, welcome to the forum. Please don't post in threads that are long dead and don't hijack another poster's thread. When you have a question, start your own topic. Feel free to provide a link to an old post that may be relevant to your problem.
    As your question isn't related to the subject of this thread, I'[m blocking your post.  I'm locking this thread now.
    db                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Un-embed applet on oracle 10g forms from web browser

    Hi all,
    I want to ask how can i seperately open my applet from web browser in oracle 10g forms. To be more precise to my question, i dont want to use my applet in web browser. It should be opened in new window i.e. applet window.
    Regards,
    Qasim Javaid Malik

    If you want to run forms without the IE browser (hidden)
    Try this
    To open web forms just like client server with a hidden IE window, I have invented two methods.
    ****** make seperateFrame = True on formsweb.cfg ******
    Method 1
    <job id="SYMA">
    <script language="VBScript">
    Const SW_HIDE = 0
    Const High = 128
    strComputer = "."
    strCommand = "C:\Program Files\Internet Explorer\IEXPLORE.EXE http://symphony-devl.atradiusnet.com/forms/frmservlet?config=syma"
    Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" _
    & strComputer & "\root\cimv2")
    ' Configure the Notepad process to show a window
    Set objStartup = objWMIService.Get("Win32_ProcessStartup")
    Set objConfig = objStartup.SpawnInstance_
    ' Create Notepad process
    Set objProcess = objWMIService.Get("Win32_Process")
    intReturn = objProcess.Create _
    (strCommand,Symphony, objConfig, intProcessID)
    If intReturn <> 0 Then
    Wscript.Echo "Process could not be created." & _
    vbNewLine & "Command line: " & strCommand & _
    vbNewLine & "Return value: " & intReturn
    Else
    Wscript.Echo "Process created." & _
    vbNewLine & "Command line: " & strCommand & _
    vbNewLine & "Process ID: " & intProcessID
    End If
    </script>
    </job>
    Method 2
    <job id="SYMA">
    <script language="VBScript">
    dim objShell
    set objShell = CreateObject("InternetExplorer.Application")
    objShell.ShellExecute "C:\Program Files\Internet Explorer\IEXPLORE.EXE", "http://ws-79767.atradiusnet.com:8890/forms/frmservlet?config=localJpi", "", "open",0
    </script>
    </job>
    Change the URL as appropriate, it's fantasitic .... !!!!!!
    Any questions let me know ...... !

  • Applet to oracle server

    I m trying to connect to oracle through an applet
    My Browser is IE 5.0
    it gives security exceptions. how can i over come this ?
    my code is as follows
    I want to make sure that this applet works on IE and Netscape , can i ?
    import java.sql.*;
    public class JdbcApplet extends java.applet.Applet
    Connection conn; // Hold the connection to the database
    public void init()
    // Register the driver.
    DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
    // Connect to the database.
    conn = DriverManager.getConnection
    ("jdbc:oracle:thin:@noah:1521:
    noahDb","scott","tiger");
    I have replaced machine name with ip, no effect
    any help will be cordially appreciated
    Renjith

    I m trying to connect to oracle through an applet
    My Browser is IE 5.0
    it gives security exceptions. how can i over come this
    my code is as follows
    I want to make sure that this applet works on IE and
    Netscape , can i ?
    import java.sql.*;
    public class JdbcApplet extends java.applet.Applet
    Connection conn; // Hold the connection to the
    database
    public void init()
    // Register the driver.
    DriverManager.registerDriver (new
    oracle.jdbc.driver.OracleDriver());
    // Connect to the database.
    conn = DriverManager.getConnection
    ("jdbc:oracle:thin:@noah:1521:
    noahDb","scott","tiger");
    I have replaced machine name with ip, no effect
    any help will be cordially appreciated
    RenjithHi Renjith,
    You're hitting the applet sandbox trap. One of the key rules is:
    "An applet cannot make network connections except to the host that it came from."
    Technically, a SQL*Net session is a network connection onto a new host. Read up on the recommended work arounbd for this one:
    http://java.sun.com/docs/books/tutorial/applet/practical/workaround.html
    HTH
    Simon

  • Developing Custom Applet in Oracle Webcenter

    Hi,
    We can create custom component in Oracle Webcenter Content Server.
    We can use different ways to create resource for these custom components, one of which is "HTML includes", which can contain Idoc Script and valid HTML code, including JavaScript, Java applets etc.
    Could anybody give an example of 'HTML includes' calling/including *'Java Applet'*?
    Any pointer for the same will be helpful.
    Thanks

    OOTB there is only one page I'm aware that contains links to applets: Administration - Applet Admin.
    Note that the reason for this page is that the same (admin) functionality is provided in an applet as well as in Java standalone mode (if no server runs). I'd discourage you from writing applets for an end-user functionality.

  • Can applet connect Oracle???

    Hi,
    I have a class which contains:
    "Class.forName("oracle.jdbc.driver.OracleDriver");"
    If I run it using java myclass, everything is fine and
    the application gives a result set from Oracle.
    If I run it under applet (appletviewer myclass.html),
    I got "ClassNotFoundException" error.
    I saw one reply here saying applets cannot connect to
    database.
    Anyone can give a help?
    Thanks,

    I saw one reply here saying applets cannot connect todatabase.
    That isn't true.
    It is just more difficult.
    You have to pass the jar with the Oracle stuff to the applet (just like any other jar.) If you don't know how to do this you might want to ask on a forum that discusses applets.
    Presumably you are using the thin driver. The OCI driver won't work.
    Presumably the database server is the same as the web server or you have already figured out the security issues with connecting to a different server. If you don't know how to do this you might want to ask on a forum that discusses applets.

Maybe you are looking for