Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4122541

[Solaris 116K] Appletviewer hangs up in reloading an applet on Solaris2.5

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      1.1.6
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Not verified

      Description

      JDK1.1.6K appletviewer hangs up in reloaoding an applet by its title menu
      clicking. Platform is as follows:
      SunOS ireland 5.5 Generic_103093-14 sun4m sparc SUNW,SPARCstation-5

      Here's the steps for this problem.
      1.set Japanese to LANG environment.
      %LANG=ja # I noticed this doesn't occur when 'C' is set to LANG
                      # after I had reported my previous message.

      2.Run the applet by appletviewer.
      %appletviewer SimpleApplet.html

      3.Click 'Type' label and type any character upon it. Typed character
        will be displayed on the label and the console through System.out
        class.

      4.Repeat 3 for the 'Away' label.

      5.Then, reload the applet by the title menu of appleteviewer.

      6.The apple does not accept any keyboard or mouse event any more.

      I'm not sure whether this matters or not, but I run Solaris2.5
      bundled ATOK8 IM server when this applet runs by the following
      command:
      %/usr/openwin/bin/atok8 -xnllanguage ja -iconic &

      Following HTML and Java source code demonstrates the problem.
       
       
      <HTML>
      <Title>Applet</Title>
      <Body>
      <H2>Applet</H2>
      <applet code=SimpleApplet.class width=100 height=50>
      </applet>
      </BODY>
      </HTML>
       
       
      import java.awt.*;
      import java.applet.*;
       
      public class SimpleApplet extends Applet implements java.awt.event.KeyListener,java.awt.event.MouseListener {
       
        Label label1;
        Label label2;
       
        public void init() {
          super.init();
       
          setSize(200,200);
          label1 = new Label("Type");
          label2 = new Label("Away!");
          label1.setBounds(0,0,200,100);
          label2.setBounds(0,100,200,100);
          add(label1);
          add(label2);
          this.label1.addKeyListener(this);
          this.label1.addMouseListener(this);
          this.label2.addKeyListener(this);
          this.label2.addMouseListener(this);
        }
       
        public void keyPressed(java.awt.event.KeyEvent event)
        {
          System.out.println(event.toString());
        }
        public void keyReleased(java.awt.event.KeyEvent event)
        {
          System.out.println(event.toString());
        }
        public void keyTyped(java.awt.event.KeyEvent event)
        {
          System.out.println(event.toString());
          Label label=(Label)event.getComponent();
          label.setText(String.valueOf(event.getKeyChar()));
        }
        
        public void mouseClicked(java.awt.event.MouseEvent event)
        {
        }
        public void mouseEntered(java.awt.event.MouseEvent event)
        {
        }
        public void mouseExited(java.awt.event.MouseEvent event)
        {
        }
        public void mousePressed(java.awt.event.MouseEvent event)
        {
          Component component=event.getComponent();
          component.requestFocus();
        }
        public void mouseReleased(java.awt.event.MouseEvent event)
        {
        }
       
      }

      It works fine with 1.1.5 or with 1.1.6 on win nt. but it dies on 1.1.6K on Solaris 2.6 with this message

      java.lang.NoSuchMethodError: java.io.ObjectInputStream: method readObject(Z)Ljava/lang/Object; not found
              at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java)
              at java.io.ObjectInputStream.inputObject(ObjectInputStream.java)
              at java.io.ObjectInputStream.readObject(ObjectInputStream.java)
              at sun.security.provider.IdentityDatabase.fromStream(IdentityDatabase.java:90)
              at sun.security.provider.IdentityDatabase.fromFile(IdentityDatabase.java:130)
              at sun.security.provider.IdentityDatabase.initializeSystem(IdentityDatabase.java:336)
              at
              at java.security.IdentityScope.initializeSystemScope(IdentityScope.java:73)
              at java.security.IdentityScope.getSystemScope(IdentityScope.java:123)
              at sun.applet.AppletSecurity.reset(AppletSecurity.java:94)
              at sun.applet.AppletSecurity.<init>(AppletSecurity.java:70)
              at sun.applet.AppletViewer.init(AppletViewer.java:808)
              at sun.applet.AppletViewer.mainInit(AppletViewer.java:1026)
              at sun.applet.AppletViewer.main(AppletViewer.java:1039)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              okutsu Masayoshi Okutsu
              Reporter:
              sishidasunw Shoji Ishida (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: