:


     WWW   Jet Infosystems

 ,
 




1. 

2. , WWW  

3. Java, Joe, NEO

4. Java -   
4.1.  Java
4.1.1.    Java
4.1.2.   
4.1.3. 
4.1.4.  
4.1.5.  
4.1.6.  
4.2.  Java
4.2.1.    Java-
4.2.2. Java-
4.2.3. Java  
4.2.4. Java WorkShop
4.3.  Java  :  
4.3.1.  
4.3.2.      (  )
4.3.3.   
4.3.4. 
4.3.5.   Component,    

5. Joe -   Java-    -
-

6. 




      Java,    
"   ". ,  ,    -
 (      -
    " ")   .  -
 -      -
 (. 1).

.  1.     Java ( 
  ).

-      
   .  ,   -
  , ,   .    -
  WWW-   Java     -
          
.      ,  -
    ,    , -
    " "     -
 .

            ,
 ?     
   ,        
          
 Java   .

          
    .     -
 " "     -
.    ,    ,  
    ,     -
   .    , 
       
  ,   Java.    
  ,     ?

  .      , 
  .     
        
     .  -
       -
 ,        
    .   .  ,
   ,  ,  ,
        .



  -      .
  ,   
  .     -
    .

  ,      -
,    .   -
        , ,  
,    (. 2).

. 2.     

    ,  ,  -
 .    .  
    ,  ,  ,  
  ,  .     
  .       -
,   ,    -
,   .       
  ,      -
 .

        ,  
     -   ,    
  .  ,   
  ,      -
 ,      .

    ,    10
 ,      
   ,    -
 ,   ,  , -
   .     -
  -     (. 3).

. 3.     

        
 .

       -
 ,      
  ,     
     ,      
 (. 4).

. 4.      

        
  .

   ,    -
 ,      -
     ,   Web-    -
   (. 5).

. 5.   Web-

        (, ,
, )       ,
     ,  -
       
   ,     ,
       "".  
        -
,         -
  ,    .

  Web,       , -
     .   -
     ,  -
     .     -
    ,       
 .

 , Web-  Web-     -
    " ". Web -  -
 ,     --
   .

     , Web-    ,
     HTTP-. -,
       -
      WWW-  (,
   ,   WWW-).

-,  Web-  .   
HTTP,       ,
   .     -
  .  , ,  
 .    ,    - 
,     ,   -
.

-, Web-    -
 ,     
        .  
       
 15 .    .

Java-      .
  -     .  
Web-,       ,  
    .      
,     Java.



    Java -  -  ,
  C++,        -
.     Java -      -
,       Web--
,       ,  Web-
      --
 , Java-      ,
     .

       ,  -
  Web-,    .

-       Java-,    
  () Java-. -
  ,      -
 Java-.   Java-      
 .  ,    --
        Java--
;  ,   Java,   .

- ,       Java--
      Web-   
           
   ,     , -
      ( ,  WWW-).  
,         -
.

,     -
   .     
   ,   (   -
)          . 
 ,        -
    , , ,    Java--
.        -
,     . , ,
   -  ,    -
.

    Java-   -
   Web-.   -
       . 
    ,     -
    ,   Java.
     ,    -
      ,    . 
        -
  .   ,   
          
Java-,     WWW-, 
  ( ,  )   .

       
  Java.     -
      .

   ,   WWW-   
  Java-      -
  Java- (,  ,    Java
    ,  , , C++). , ,
 ,     ,  
     .  ,  
   " "   -
 Java-,      Java  
   .

,      ,   
Web-     , -
   ,      ,  
,    (,  ),
        -
.           
      WWW,   
,         
,    .  ,  
   ,    Java, 
  (. 6).

. 6.    Java-   -
.

   ?

     -       
  Java    .  
  Sun Microsystems    -
  -  NEO  (NEtworked Objects,  ). 
NEO   CORBA  (Common  Object  Request
Broker  Architecture),    . 
     
NEO       -
       ,  
 ,         -
     (. 7).

.  7.    
.

 ,         
   Java-  NEO-. , 
      -
  ( Java   , -
  C/C++,      ),    
     , Java   
 ""  MS-Windows.    1996  -
 SunSoft           
Joe,          
 Java-       ,
       
NEO (. 8).

. 8.    Java, Joe  NEO.

 ,       
    -.      
    Java.      
 ,   Joe.






   Java  ,  , -
    ,    C++.



    -  -
,    :

- 

- 

- .

     Java    
 .



    Java  C++  .  
   ;      -
.      ,    
 (        -
      Java-).

1     class Point extends Object {
2       private double x;
3       private double y;

4       Point (double x, double y) {
5         this.x = x;
6         this.y = y;
7       }

8       Point () {
9         this (0.0, 0.0);
10      }

11      public void setX (double x) {
12        this.x = x;
13      }

14      public void setY (double y) {
15        this.y = y;
16      }
        . . .
17    }

    Java      () 
 .   class  
       .  , -
      .

            
extends ( 1).  Object -    -
.    Java    -"":   , 
Object,  .    -
    .

     (private, protected,  public)
  ,       C++,    .  
 ,  ,      
    (. ).

  9       
.

         
 - .    Java      .
  ,     ( -
      ).   
,   ,    
finalize.         -
 ,  .

  this (., ,  5  9)  
     .      -
    super:

1     class ThreePoint extends Point {
2       protected double z;

3       ThreePoint () {
4         super ();
5         z = 0.0;
6       }

7       ThreePoint (double x, double y, double z) {
8         super (x, y);
9         this.z = z;
10      }
11    }

  4  8    .

  ,    Java,      C++,
    ,      -
       .

  C++,       static    
    ,         
. ( ,  ,   -
 ,   Java  .)   
   java.lang.

1 public final
2 class Character extends Object {

3     public static final int MAX_RADIX = 36;

4     static char downCase[];

5     static {
6         char down[] = new char[256];
7         for (int i = 0 ; i < 256 ; i++) {
8             down[i] = (char) i;
9       }
10        for (int lower = 'a' ; lower <= 'z' ; lower++) {
11            int upper = (lower + ('A' - 'a'));
12            down[upper] = (char)lower;
13      }

14        for (int lower = 0xE0; lower <= 0xFE; lower++) {
15            if (lower != 0xF7) { // multiply and divide
16                int upper = (lower + ('A' - 'a'));
17                down[upper] = (char)lower;
18            }
19        }
20      downCase = down;
21    }

22    public static boolean isLowerCase(char ch) {
23      return (upCase[ch] != ch);
24    }

25 }

       Java  C++.

  5  21      
  ,      
 Java-.        
Character.

  1  3    final.      1
                 
Character.   3       const  
C++.

  final    ,   -
      -.

      C++,   Java    , 
    .  ,   -
  ,   .  -
 (   )        abstract.
          
.

  Java    ,  -
   java.lang.  . 9   
.

. 9.     Java.

       Class. -
      Class (,  
      ).     Class
     getClass,   -
  Object.

  Class      -
   ""   .    
 Class,  ,   :

1    public native String getName();
2    public native Class getSuperclass();
3    public static native Class forName(String className)
         throws ClassNotFoundException;

 forName        .
  native    ,   
,     Java- (, -
   C).



    Java     -
  C++.  -,   Java   .
-,        -
    (    final   
). -,   Java     -
  C++  .

     . :

public interface Verbose {
  public void drawOn (Graphics g);
  public void printOn (OutputStream os);
}

public class Star extends Polygon implements Verbose {
  public void drawOn (Graphics g) {
  //   
  }
  public void printOn (OutputStream os) {
  //   
  }
}

public class Text extends StringBuffer implements Verbose {
  public void drawOn (Graphics g) {
  //   
  }
  public void printOn (OutputStream os) {
  //   
  }
}

public class Blackboard extends Canvas {
  public void drawVerbose (Verbose d) {
    Graphics g = getGraphics ();
    d.drawOn (g);
  }
}

 Verbose   .    
      ,  -   
 .

   Star            
(Polygon).    ,        
   (Blackboard)      .

   Text       
       .

 Blackboard -   Canvas,  -
    .     ,    
     ,  -
   (  Object).

 ,        -
   .   
     ,   -
 .



     new.  -
        . 
   -  new  . .

Point myPoint = new Point ();

    (    new)  
Java  .

    ,      ( 
            -
).           .
 ,    ,   -
    .

     ,    
        
 (   ). .

  Point p = new Point (100.0, 100.0);
  . . .
  p = new Point (1.0, 1.0);
  //     (100, 100)   

  {
     String s = new String ("Local string");
     System.out.println (s);
  }
  //   "Local string"   

        
finalize. - ,       -
,  finalize  .



  Java     ,  
  .    .

      Java  ,  , 
   .

-  :
- - byte - 8 ,
- - short - 16 ,
- - int -  32 ,
- - long - 64 .
   ,  unsigned   .

-    :
- - float - 32 ,
- - double - 64 .
    IEEE 754.

- char
  char  16-     (
0-65535).     Unicode.  -
         
  Java-.

- boolean
   true  false,     -
   .

  Java, ,  .   -
. 

Point myPoints[];

  myPoints       Point.
       


myPoints = new Point[10];

          
  null.

         -
:

howMany = myPoints.length;

   (  )   Java
,    ,   ..   Java  -
.

,           String
( )    StringBuffer  (  ).
,

String hello = "Hello world!";



   Java   .  , 
   ,       -
,         ,  
       private
 protected.

    .  "  "
   Java  .

      

package my_packages.pack1:

  package           
Java-.     .

      -
 import. ,

import java.util;
import java.util.HashTable;
import java.util.*;

  import      
util  :

util.Vector
util.HashTable
. . .

      HashTable,  
         ,  
 util.

   import     -
     util.



   Java  ,   -
         ( , 
 ). .

test:
  for (int i = 0; i < 10; i++) {
    for (int j = 0; j < 10; j++) {
      if (i > 3) {
        break test;
      }
    }
  }

        break,
  continue (    ).

 goto   Java .



   ,    -
  ,   Java   try/
catch/finally.  try  ,    
     .  
     catch   
 . ,  finally    -
,          
    try.       try-
        (break, return 
..)  finally   .

      
  -   Throwable. , 
ArrayIndexOutOfBoundsException      -
   ,  OutOfMemoryException -  -
     ,  ClassCastException
-                     ,     
InterruptedException  -     
 ..        String,
              .   
getMessage   .

       -
.  ,    InterruptedIOException 
,     ,   -
  .

      
messages.          -
,          
. (,           
).

try {
  for (int i = 0; i < 100; i++) {
    System.out.println (messages[i]);
  }
}

catch (ArrayOutOfBoundException e) {
  System.out.println ("No more messages");
}
catch (Exception e) {
  System.out.println ("Unexpected exception");
  System.out.println (e.getMessage());
}

finally {
  System.out.println ("Work done");
}

      -
  

throw new MyException ("Something's wrong");

  Java    
 .    ( Error)  -
,       ( 
 Java-).    ( Exception) -
  ,     -
.       -
   ,       
  try/catch/finally,      
  

throws Exception1, Exception2, ...

.

class Foo extends Object {
  . . .
  public void readFromFile (String fn) throws InvalidFormatException {
    FileInputStream fis;
    try {
      fis = new FileInputStream (fn);
      //    .
      . . .
      //     ,
      //   :
      throw new InvalidFormatException ("Wrong format");
      . . .
    }
    catch (FileNotFoundException e) {
      //   
    }
    finaly {
      if (fis != null )
        fis.close(); //   ,    
    }
  }
  . . .
}

     readFromFile    -
  .     ,    -
.                 
readFromFile.       ,
    .      
  .



   -    
.      -
 ,    ,  -
        .  
   ,    Java    
       .

  Java     Thread, -
  Runnable,   synchronized  
 Object wait  notify.

4.1.6.1.  Thread   Runnable

 (thread)       
 .  ,     ,
 ,    .

            start()  
Thread.  ,    -
,    run(). ,     run()  -
     ; 
     ,    .

            
run(),              Thread
stop()    destroy().     
.

         -
   suspend(), sleep()  yeild().

 ,     suspend, -
    resume().

  sleep()      
 .

    yeild()    
 ;       -
.

Java-  .   -
,  Java-   . 
,        -
    . ,   -
   .  ,     
     ,  , -
       -  -
 suspend(), sleep()  yeild().

 . 10    .

. 10.   .

       -
    "/".  -
  ,   Mark Tillotson    -
  comp.lang.java.

class my_producer extends Thread
{
  int items_to_do ;
  my_buffer the_buffer ;

  my_producer (my_buffer buf, int count)
    { super() ;
      the_buffer = buf ;
      items_to_do = count ;
    }

  public void run ()
    {
      while (items_to_do > 0)
        { System.out.println ("producer to_do = " + items_to_do) ;
          Integer item = new Integer (items_to_do*items_to_do) ;
          the_buffer.insert (item) ;
          items_to_do-- ;
        }
      System.out.println ("producer exiting") ;
    }
}

       .

       my_producer  -
  Thread,      -
 ,   run().   ,
 ,     -  -
    ,    
    Runnable.    -
    - run(). .

1  class SomethingToRun extends BaseRunner implements Runnable {
2    private Thread aThread;
3    public void run () {
       //  
    . . .
4    }

5    SomethingToRun () {
6       aThread = new Thread (this);
7       aTread.start ();
8    }
9  }

  6   .   -
   SomethingToRun, , , 
         run()
 .   start()   7      
   .



           , 
Java         
.        "-
/".

      ,   ,
   Java,    , -
  70-  -.

 Java-    , 
   synchronized.   -
  ,  synchronized  
 () .    
(  )     

synchronized () ;

       .

      -
       .
     .

 wait()      , 
        -
     ,   - -
      notify()  notifyAll(). -
        
     .

class my_buffer
{
  Object [] vec = new Object [8] ;
  int ip = 0 ;
  int ep = 0 ;

  synchronized void insert (Object item)
    {
      do
        {
          if (ip-ep < 8)
            { vec [(ip++) & 7] = item ;
              if (ip-ep == 1) notify () ;  // ,    
              return ;
            }
          try wait () ;  catch (InterruptedException e) ;
        } while (true) ;
    }

  synchronized Object extract ()
    {
      do
        {
          if (ip > ep)
            { Object result = vec [(ep++) & 7] ;
              if (ip-ep == 7) notify();  // ,    
              return result ;
            }
          try wait () ; catch (InterruptedException e) ;
        } while (true) ;
    }
}

class my_producer extends Thread
{
  int items_to_do ;
  my_buffer the_buffer ;

  my_producer (my_buffer buf, int count)
    { super() ;
      the_buffer = buf ;
      items_to_do = count ;
    }

  public void run ()
    {
      while (items_to_do > 0)
        { System.out.println ("producer to_do = " + items_to_do) ;
          Integer item = new Integer (items_to_do*items_to_do) ;
          the_buffer.insert (item) ;
          items_to_do-- ;
        }
      System.out.println ("  ") ;
    }
}

class my_consumer extends Thread
{
  int items_to_do ;
  my_buffer the_buffer ;

  my_consumer (my_buffer buf, int count)
    { super() ;
      the_buffer = buf ;
      items_to_do = count ;
    }

  public void run ()
    {
      while (items_to_do > 0)
        { System.out.println ("consumer to_do = " + items_to_do) ;
          Object item = the_buffer.extract () ;
          System.out.println ("consumer got " + item) ;
          items_to_do-- ;
        }
      System.out.println ("  ") ;
      synchronized (this){
        notify () ; //     
                    // (. con.wait()  main())
      }
    }
}

public class threaded3
{
  public static void main (String [] args) throws InterruptedException
    {
      my_buffer the_buffer = new my_buffer () ;
      my_producer prod = new my_producer (the_buffer, 40) ;
      my_consumer con  = new my_consumer (the_buffer, 40) ;

      Thread.currentThread().setPriority (5) ;
      prod.setPriority (4) ;  //     
      con.setPriority  (3) ;  //    

      prod.start() ;
      con.start() ;
      synchronized (con)
        {
          con.wait() ;  //      
                        //  
        }
      System.out.println ("    ") ;
    }
}

     ,  .
        .     insert() 
extract()  my_buffer  wait()    -
 .   ,   notify()   -
    .  ""    
   ,   . ,   ""
 insert(),      -
,          
.    ,  insert()  .





 ,   , , -
    ,  ,   
Java-  ,       
,      -  -
      -
   (. xxx).

. xxx.   Java-

  ,  ,   Java-  
     -      
,        ,   
WWW-.

   ,        
      .

      

public static void main (String args[]);

       public-,   
,   Java-.
  args    -   .

: ,   

public class myTop {
  public static void main (String args[]){
    int argc = args.length;

    for (int i = 0; i < argc; i++)
      System.out.println (argc[i]);
  }
}

          
    Applet:

public void init ()     ;
public void start ();     ;
public void stop ();  ,      Web-;
public void destroy ();     
          ;  ,    ; 
           stop();        
           .

   :

1     import java.awt.Graphics;
2     import java.applet.Applet;

3     class SimpleApplet extends Applet {
4       public void paint (Graphics g) {
5         g.drawString ("Hello world!", 10, 10);
6       }
7     }

 public void paint (Graphics g) (  4-6)  ,
        ,   -
  WWW-   .

   WWW-   .
  HTML 2.0    
 .          -
     ,  . 
      WWW-   -
,     .

       WWW-.




, Java

WWW- , , Java, -------------------------------------------------------------------------- , Java -------------------------------------------------------------------------- , , : public void init () { String fontname = getParameter ("name"); String fontSizestring = getParameter ("size"); int theSize = Int.parseInt (fontSizeString); . . . }

    4.2.2. Java-

Java- Java- Java-. , Java- - , - , - , - - . , Java-. , , . - P- - -; ; - -, . Java - , Java- -- . , , Java-. Web- Java-, - . , , Java- ; . , - Java- , . , Java- (- ), () . , Java-, -. Java- . 1.0.

    4.2.2.1. , Java-

Java- : - byte - ; - short - ; - int - ; - long - ; - float - IEEE-754; - double - ; - char - Unicode. Java- , - . , . , iadd, - dadd. boolean - . : - object - ( ); - returnAddress - . Java- - . Sun Microsystems object - , - . . Java- 32-. (long, double) . , ; , - , "" .

    4.2.2.2.

Java- : - pc - ; , . - vars - - . - optop - . Java- - , . - frame - , . , : , - . , - - . - ( ). - . . Java- catch, . - , , , , Java- .

    4.2.2.3.

. Java , , . , - Java-.

    4.2.2.4. Java-

Java- , ( ). : - . . , dload , , , aload . - . - . , newarray , , , . , - - , anewarray. Java-. - . , , , , , - . - . ; . - (, , , ). - . - . , jsr ( ) ; , jsr, . . - . . - , breakpoint, - - . - (/- / ). - . . invokevirtual - () . invokenonvirtual - - , - . invokestatic . , invokeinterface , . - , . - - athrow. - ( , - ). - ( , ). , Java Java-. , - Java- .

    4.2.3. Java

, . - Java-, Web- - . , Java . , goto "". , .. - , , , . , , "" - . - - , , , Java-. , , , , , , . , - ( UNIX, fork exec), , - Java-. , Java- . , Netscape Navigator 2.0 . , JDK 1.0 Sun Microsystems , - . , : - ; - // ; - ; - - , , . JDK , - ~/.hotjava/properties acl.read=/home/welcome acl.write=/tmp - -. , - , , , , - , .. . finally - . , . , , Argus System Group, , "- " . , , - Java-. , - , Java.

    4.2.4. Java WorkShop

1996 Sun Microsystems 1.0 Java WorkShop. : - Java , Web-. . y1 Java WorkShop. . y1. Java WorkShop. , , - , . - , , , . , . Java WorkShop , , , , - . : - - , - , . - - . - , .. - - . , - Web- - , , . - - Java-. - - . - . Java WorkShop, - . - . , Java WorkShop , Java-. y2 . . y2. Java WorkShop. - . Java WorkShop SPARC/Solaris Intel/Solaris, Microsoft Windows 95/NT. - - Java WorkShop . - 45 , 32 ( Solaris) 16 ( Windows) . , - .

    * 4.3. Java :

    4.3.1.

Java , , - - . , Java - . . ( - ) , - ( ) . - - . - , . , - , - , - . Motif MS-Windows Macintosh. - - , - , - .. , - . - , - - , , , , , , , - . , , " - ", " " .. , -- - - , - . , , - - , "" . MFC, OWL, Zink . Java- AWT Abstract Windowing Toolkit - - . AWT . "" , , , - . AWT , , , ; - - , , . . x1. . x1. AWT. , Peer. AWT, . - - Java.

    4.3.2. (

) , , , . AWT ( Component), - . - , - , . , - . . x2. ( Charles L. Perkins, clp@home.HarvardSq.com.) . x2. AWT . x3 , . x2. : - Button - Checkbox - Label - List - ScrollBar - TextArea - TextField : - Dialog - FileDialog - Frame - Panel - Window - , - .

    4.3.3.

, , . , , - . (, , ) - . , , - (, - , " "). - , - , - . AWT . , . Layout (). Layout , , . AWT 5 : - BorderLayout - CardLayout - FlowLayout - GridLayout - GridBagLayout . x4. . x4. AWT. Object LayoutManager. LayoutManager Container. Container 3 add, . - add, LayoutManager . LayoutManager setLayout. , - .

    4.3.3.1. BorderLayout

BorderLayout 5 : , , , : [Image] - add (string, component); . setLayout (new BorderLayout()); buttonN = new Button ("one"); add ("North", buttonN); // ...

    4.3.3.2. CardLayout

[Image] . - . , CardLayout - . C . : add (string, component); string - "", component - - . , ( - ): setLayout (new CardLayout ()); add ("one", create (new FlowLayout ())); add ("two", create (new BorderLayout ())); add ("three", create (new GridLayout (2, 2))); add ("four", create (new BorderLayout (10, 10))); add ("five", create (new FlowLayout (FlowLayout.LEFT, 10, 10))); add ("six", create (new GridLayout (2, 2, 10, 10)));

    4.3.3.3. FlowLayout

FlowLayout . . - . [Image] setLayout (new FlowLayout ()); add (new Button ("OK")); add (new Button ("Cancel")); add (new Button ("Resume")); add (component). , , - .

    4.3.3.4. GridLayout

. . , . . add (component) [Image] . setLayout (new GridLayout (2, 3)); // 2 , 3 add (new Button ("1")); add (new Button ("2")); add (new Button ("3")); add (new Button ("I")); add (new Button ("II"));

    4.3.3.5. GridBagLayout

GridBagLayout - . . , GridBagLayout . GridBagConstraints. 10 , - . , GridBagConstraints, : GridBagLayout gridbag = new GridBagLayout (); GridBagConstraints c = new GridBagConstraints (); setLayout (gridbag); // c.fill = GridBagConstraints.BOTH; c.weightx = 1.0; . . . Button button1 = new Button ("1"); gridbag.setConstraints (button1, c); add (button1); . . . // // GridBagConstraints, // // c.fill = GridBagConstraints.NONE; Button buttonX= new Button ("X"); gridbag.setConstraints (buttonX, c); add (buttonX);

    4.3.4.

AWT, , . - - , AWT ACTION_EVENT. , AWT , . , - . , AWT. (, ) . , - (, ), - handleEvent. , , , - (, ). , , - ( ) . . - -, , . - -, - , handleEvent. . - , . - handleEvent , - - (, - ). , , - . "The Command Class for AWT objects", - Jan Newmarch, jan@ise.canberra.edu.au.

    4.3.5. Component,

Component, - . - postEvent(). , , - . - handleEvent(). , , , - - action() - - keyUp() - - mouseDown() - - gotFocus() .. handleEvent() . , , - , , handleEvent() - false, handleEvent() , - . AWT Event, : public Object target; // public long when; // , public int id; // (KEY_PRESS, MOUSE_DOWN...) public int x; // public int y; // public int key; // public int modifiers;// (control, shift ...) public Object arg; // public Event evt; // , - ( - ). class MyApplet extends Applet { . . . public boolean action( Event evt, Object arg) { . . . if ((ev.target instanceof Button) && arg.equals ("OK")) { // . . . return true; } else { // . . . } . . . return false; } . . . } , Button - "OK", - true, . - . . class OKButton extends Button { . . . public boolean action (Event e, Object arg) { // . . . return true; } } , Java . - .

    5. Joe - Java-

- , "Java, Joe NEO", , SunSoft - Joe - , Java, , NEO. Joe ( ) - , , - Java- - . Jet Info "- ". . Java - , . 1 import java.awt.Font; 2 import java.awt.Color; 3 public class JAVAhello extends java.applet.Applet { 4 Font f = new Font ("TimesRoman", Font.BOLD, 36); 5 public void init () { 6 resize (150, 25); 7 } 8 public void paint (Graphics g) { 9 g.setFont (f); 10 g.setColor (Color.blue); 11 g.drawString ("Hello, World!", 50, 25); 12 } 13 } Joe, - /. 1 import sunw.services.*; 2 import java.awt.Graphics; 3 import java.awt.Font; 4 import java.awt.Color; 5 public class JOEhello extends sunw.services.JOEApplet { 6 sunw.corba.ObjectRef obj; 7 Hello.HelloWorldRef hiThere; 8 Font f = new Font("TimesRoman", Font.BOLD, 36); 9 public void init () { 10 super.init (); 11 resize (150, 25); 12 obj = find ("HelloWorldServer"); 13 hiThere = Hello.HelloWorldStub.narrow (obj); 14 } 15 public void paint (Graphics g) { 16 g.setFont (f); 17 g.setColor (Color.red); // , C++, // . 18 g.drawString (hiThere.sayHello (), 50, 25); 19 } 20 } , - . 1 . 5 , Hello JOEApplet. 6 ( ) NEO-. . 7 NEO-, ( , ) Java. 12 NEO . 13 . , 18 - , , , Java (, C++). , - , . Joe . - : - NEO-, IDL (Interface Definition Language), Java. Joe IDL - Java. , , . , , Joe, - WWW- Java-. - Java Joe . Java- - . , - , . , -. Joe Java- IDL-.

    6.

Java - , - . - - , . , - - - . Java Web-, - -. Java - - - . - , - . Sun Microsystems - Joe NEO - Java , - . ------------------ , . , 1993 , Sun Microsystems. Java, Java, - Java- Java. 1996 Java. Java, - 1996 "Hooked on Java". . Internet, Web Java . - Java, - , , - , , Java - . - , - Internet, , Java- .. - . , , - ? . , Java Internet , , . , , . , Java Internet , . , . Java Internet? , - , : - . . , Java - . , , Java (, - )? Java? . , , Java, . , - , . - , , - . , , Java, , Java, ? . , Internet, Web Java, (IBM, Sun, HP, DEC, Compaq, Oracle - )? . - . - . - Java, , , , Microsoft, . - , , , , - . . , , - , - . , " " 80- . - , - . - , Java " ", . , , Java - " "? . Java- . Internet - , . , , . . Java? . , , , , 3D-. Java, - 3D- , . - . Java, 3D-- - . . Internet, Web Java , - , . - Java . - , - , ? . , , Java. Internet - . . Sun , Java. . Netscape Microsoft Web- . Netscape 70% , Microsoft - - . , . Sun - HotJava - Web-. , - , Netscape, Microsoft - , Sun ? . HotJava, , HotJava Internet. Netscape Navigator, Internet Explorer , . HotJava Sun - , , Java. , Java, . . - Internet, Web Java? . Internet - - . , Internet , , . ! . ? . OLE!

Last-modified: Tue, 15 Jul 1997 06:32:49 GMT
: