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

Compiler generated exception and said to report it to Sun

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 1.1.7
    • vm-legacy



      Name: vi73552 Date: 03/20/99


      When compiling my classes, I got the following messages from the compiler.

      F:\>javac Test.java
      A nonfatal internal JIT (3.00.072b(x)) error 'Structured Exception(c0000005)' ha
      s occurred in :
        'sun/tools/javac/Main.compile ([Ljava/lang/String;)Z': Interpreting method.
        Please report this error in detail to http://java.sun.com/cgi-bin/bugreport.cg
      i

      .\JoinPanel.java:57: Invalid type expression.
            bigFont = new Font( "Serif", Font.NORMAL, 24 )
                    ^
      .\JoinPanel.java:59: Invalid declaration.
            setLayout( new BorderLayout( 0, 20 ) );
                     ^
      .\JoinPanel.java:78: Undefined variable: lowerPanel
            add( lowerPanel );
                 ^
      3 errors

      F:\>

      I was compiling Test.java which also compiles JoinPanel.java which is in the same directory. The source code is below. This is the code that generated the error. It does have syntax errors as it is here. I created these classes as part of an introductory Java class at Shoreline Community College in Seattle, WA.

      // This test applet will do nothing but display a given panel
      // 3/19/99 ajq


      import java.awt.*;
      import java.awt.event.*;
      import java.applet.Applet;

      public class Test extends Applet
      {
         private JoinPanel p;

         public void init()
         {
            p = new JoinPanel(); // Insert panel to test here
            add( p );
         }
      }

      // ==================================
      // NEW FILE
      // ==================================

      // This panel will work with JavaJungle. It will collect the
      // new membership information from a user creating a new account

      import java.awt.*;
      import java.awt.event.*;


      public class JoinPanel extends Panel
      {
         private Label joinLabel;
         private Label clickJoinLabel;

         private Label firstLabel;
         private TextField first;
         private Label lastLabel;
         private TextField last;
         private Label addressLabel;
         private TextField address;
         private Label cityLabel;
         private TextField city;
         private Label stateLabel;
         private TextField state;
         private Label zipLabel;
         private TextField zip;

         private Panel upperPanel;
         private Panel inputPanel;

         private Font bigFont;

         public JoinPanel()
         {
            joinLabel= new Label( "Join" );
            joinLabel.setFont( bigFont );
            clickJoinLabel= new Label ( "Click " + '"' + " When Done" );
         
            firstLabel= new Label( "First Name" );
            first= new TextField();
            lastLabel= new Label( "Last Name" );
            last= new TextField();
            addressLabel= new Label( "Address" );
            address= new TextField();
            cityLabel= new Label( "City" );
            city= new TextField();
            stateLabel= new Label( "State" );
            state= new TextField();
            zipLabel= new Label( "Zip Code" );
            zip= new TextField();

            upperPanel = new Panel();
            inputPanel = new Panel( new GridLayout( 2, 4, 15, 15 ) );

            bigFont = new Font( "Serif", Font.NORMAL, 24 )

            setLayout( new BorderLayout( 0, 20 ) );

            upperPanel.add( joinLabel );
            upperPanel.add( clickJoinLabel );
         
            inputPanel.add( firstLabel );
            inputPanel.add( first );
            inputPanel.add( lastLabel );
            inputPanel.add( last );
            inputPanel.add( addressLabel );
            inputPanel.add( address );
            inputPanel.add( cityLabel );
            inputPanel.add( city );
            inputPanel.add( stateLabel );
            inputPanel.add( state );
            inputPanel.add( zipLabel );
            inputPanel.add( zip );

            add( upperPanel );
            add( lowerPanel );
         }
      }
      (Review ID: 55845)
      ======================================================================

            Unassigned Unassigned
            vasya Vassili Igouchkine (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: