Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Java and 8i question

Re: Java and 8i question

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Tue, 02 Nov 1999 06:53:21 -0500
Message-ID: <xc8eOOotszGMMs3ZCkeE4EdfRGIQ@4ax.com>


A copy of this was sent to Thomas Kyte mikegrof_at_rocketmail.com (if that email address didn't require changing) On Sun, 24 Oct 1999 19:44:17 -0400, you wrote:

>A copy of this was sent to mikegrof_at_rocketmail.com
>(if that email address didn't require changing)
>On Sun, 24 Oct 1999 23:04:06 GMT, you wrote:
>
>>In article <qwsTOPninRFmhYQPcCuhQrqzgmUn_at_4ax.com>,
>> tkyte_at_us.oracle.com wrote:
>>> A copy of this was sent to mikegrof_at_rocketmail.com
>>> (if that email address didn't require changing)
>>> On Sun, 24 Oct 1999 03:06:03 GMT, you wrote:
>>>
>>> >Hi all,
>>> >
>[snip]
>>
>>Sure, but will it cause an error? Will anything I do in Java that
>>compiles and runs clean as a standalone application run as a stored
>>procedure?
>>
>
>pretty much. I'll find out more about what happens exactly with the GUI calls
>and get back to you on that.
>

Ok, so this is what happens. The GUI stuff all works until you try to make a window or some GUI object 'materialize'. You can create windows, you can create widgets on the windows, you can interact with the window but if you try to 'show' it -- it'll fail. for example:

    try {
        pl ("Create frame");
        java.awt.Frame f = new java.awt.Frame ("FRAME TITLE");
        pl ("Create dialog");
        java.awt.Dialog d = new java.awt.Dialog (f, "DIALOG TITLE");

        pl ("Add frame buttons");
        f.add(new java.awt.Button ("Button 1"));
        f.add(new java.awt.Button ("Button 2"));
        pl ("Add frame label");
        f.add(new Label ("Hi There!"));
        pl ("Add 3 frame checkboxes");
        f.add(new Checkbox("one", null, true));
        f.add(new Checkbox("two"));
        f.add(new Checkbox("three"));

        pl ("Create window");
        java.awt.Window w = new java.awt.Window (f);

        pl ("Add window buttons");
        w.add(new java.awt.Button ("Button 1"));
        w.add(new java.awt.Button ("Button 2"));
        pl ("Add window label");
        w.add(new Label ("Hi There!"));
        pl ("Add 3 window checkboxes");
        w.add(new Checkbox("one", null, true));
        w.add(new Checkbox("two"));
        w.add(new Checkbox("three"));

        pl ("f.show ()");
        f.show();
        pl ("w.show ()");
        w.show();

        BhvImapConnection.getConnection ().refreshFolder
(BhvFolder.getInboxName ());
        rc = 1;
    } catch (BhvConnectionNotFoundException e) {
        e.printStackTrace ();
    } catch (MessagingException e) {
        e.printStackTrace ();
    } catch (SQLException e) {
        pl ("Unable to refresh inbox headers for [" +
BhvImapConnection.getConnection ().getUser () + "].");
        e.printStackTrace ();
    } catch (Exception e) {
        e.printStackTrace ();
    } finally {
        return rc;

    }

Create frame
Create dialog
Add frame buttons
Add frame label
Add 3 frame checkboxes
Create window
Add window buttons
Add window label
Add 3 window checkboxes
f.show ()
oracle.aurora.awt.UnsupportedOperation: GUI not supported   at oracle.aurora.awt.peer.ContainerPeer.beginValidate(ContainerPeer.java)   at java.awt.Container.validate(Container.java)   at java.awt.Window.show(Window.java)
  at com.oracle.beehive.mail.BIM.refreshInbox(BIM.java:175)

shows that the GUI operations worked until you tried to actually display the window (and it has no where to go). So, you can put code into the database that has GUI stuff, it'll load, it'll run -- as long as the GUI is not material to the application -- as long as the gui doesn't try to show itself (eg: a java app that has a command line interface as well as a GUI interface will work just fine in the database -- you can use the command line interface to interact with it -- a java app that starts out by putting up a splash screen right away OTOH will not work -- the showing of the splash will fail)

--
See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'... Current article is "Part I of V, Autonomous Transactions" updated June 21'st  

Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Tue Nov 02 1999 - 05:53:21 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US