Load:Tutorial.EmpApplet can't be instantiated ERROR

Hi,
By following JDevelopment 2.0 tutorial - Database Applet Tutorial
It was compiled successfully.
But when It was run, the ERROR occured !
" load:tutorial.EmpApplet can't be instantiated "
Anybody know why it happened ??
Thanks.
Youngho
null

Unfortunately these is a step missing in the tutorial for the
beta version. This is actually logged as a doc bug. Here is the
description:
For the database applet tutorial, you need to explicitly include
the JDBC classes111.zip file in the deployment archive. It does
not get pulled in automatically by the dependency checker.
Instructions for deployment need to instruct users to:
1. Click the Add File button for the Additions list box.
2. In the File Open dialog, navigate to and select the
aurora\lib\classes111.zip file.
3. Deploy.
Sorry, Roel.
Youngho Cho (guest) wrote:
: Hi,
: By following JDevelopment 2.0 tutorial - Database Applet
Tutorial
: It was compiled successfully.
: But when It was run, the ERROR occured !
: " load:tutorial.EmpApplet can't be instantiated "
: Anybody know why it happened ??
: Thanks.
: Youngho
null

Similar Messages

  • EmpApplet can't be instantiated ERROR

    Hi,I'm having the same "tutorial.EmpApplet can't be
    instantiated" problem everyone else seems to be having. I've
    tried all the recommended solutions and nothing works. Here is
    a copy of the output to the Java Console using Internet Explorer.
    com.ms.security.SecurityExceptionEx
    [com/sun/java/swing/UIManager.setLookAndFeel]:
    java.io.IOException: bad path: D:\Program
    Files\Oracle\JDeveloper 2.0.184
    Beta\myclasses\com\sun\java\swing\plaf\metal\MetalLookAndFeel.cla
    ss
    at com/ms/security/permissions/FileIOPermission.check
    at com/ms/security/PolicyEngine.deepCheck
    at com/ms/security/PolicyEngine.checkPermission
    at com/ms/security/StandardSecurityManager.chk
    at com/ms/security/StandardSecurityManager.checkRead
    at java/io/File.isDirectory
    at sun/net/www/protocol/file/FileURLConnection.connect
    at
    sun/net/www/protocol/file/FileURLConnection.getInputStream
    at
    com/ms/vm/loader/ResourceLoader.getCodebaseRelativeData
    at com/ms/vm/loader/ResourceLoader.getClassData
    at com/ms/vm/loader/URLClassLoader.findClass
    at com/ms/vm/loader/URLClassLoader.loadClass
    at java/lang/ClassLoader.loadClassInternal at
    java/lang/Class.forName
    at com/sun/java/swing/UIManager.setLookAndFeel
    at com/sun/java/swing/UIManager.initializeDefaultLAF
    at com/sun/java/swing/UIManager.initialize
    at com/sun/java/swing/UIManager.maybeInitialize
    at com/sun/java/swing/UIManager.getDefaults
    at com/sun/java/swing/UIManager.getColor
    at borland/jbcl/control/BevelPanel.<init>
    at borland/jbcl/control/ButtonBar.<init>
    at borland/jbcl/control/NavigatorControl.<init>
    at tutorial/QueryEmpPanel.<init> at
    tutorial/EmpApplet.<init>
    at com/ms/applet/BrowserAppletFrame.newInstance
    at com/ms/applet/AppletPanel.processSentEvent
    at com/ms/applet/AppletPanel.processSentEvent at
    com/ms/applet/AppletPanel.run
    at java/lang/Thread.runError loading class:
    com.sun.java.swing.plaf.metal.MetalLookAndFeel
    com.ms.security.SecurityExceptionEx
    [com/sun/java/swing/UIManager.setLookAndFeel]:
    java.io.IOException: bad path: D:\Program
    Files\Oracle\JDeveloper 2.0.184
    Beta\myclasses\com\sun\java\swing\plaf\metal\MetalLookAndFeel.cla
    ss
    com.ms.security.SecurityExceptionEx
    [com/sun/java/swing/UIManager.setLookAndFeel]:
    java.io.IOException: bad path: D:\Program
    Files\Oracle\JDeveloper 2.0.184
    Beta\myclasses\com\sun\java\swing\plaf\metal\MetalLookAndFeel.cla
    ss
    at com/ms/security/permissions/FileIOPermission.check
    at com/ms/security/PolicyEngine.deepCheck
    at com/ms/security/PolicyEngine.checkPermission
    at com/ms/security/StandardSecurityManager.chk
    at com/ms/security/StandardSecurityManager.checkRead
    at java/io/File.isDirectory
    at sun/net/www/protocol/file/FileURLConnection.connect
    at
    sun/net/www/protocol/file/FileURLConnection.getInputStream
    at
    com/ms/vm/loader/ResourceLoader.getCodebaseRelativeData
    at com/ms/vm/loader/ResourceLoader.getClassData
    at com/ms/vm/loader/URLClassLoader.findClass
    at com/ms/vm/loader/URLClassLoader.loadClass
    at java/lang/ClassLoader.loadClassInternal at
    java/lang/Class.forName
    at com/sun/java/swing/UIManager.setLookAndFeel
    at com/sun/java/swing/UIManager.initializeDefaultLAF
    at com/sun/java/swing/UIManager.initialize
    at com/sun/java/swing/UIManager.maybeInitialize
    at com/sun/java/swing/UIManager.getDefaults
    at com/sun/java/swing/UIManager.getColor
    at borland/jbcl/control/BevelPanel.<init>
    at borland/jbcl/control/ButtonBar.<init>
    at borland/jbcl/control/NavigatorControl.<init>
    at tutorial/QueryEmpPanel.<init> at
    tutorial/EmpApplet.<init>
    at com/ms/applet/BrowserAppletFrame.newInstance
    at com/ms/applet/AppletPanel.processSentEvent
    at com/ms/applet/AppletPanel.processSentEvent at
    com/ms/applet/AppletPanel.run
    at java/lang/Thread.runError loading class:
    com.sun.java.swing.plaf.metal.MetalLookAndFeel
    com.ms.security.SecurityExceptionEx
    [com/sun/java/swing/UIManager.setLookAndFeel]:
    java.io.IOException: bad path: D:\Program
    Files\Oracle\JDeveloper 2.0.184
    Beta\myclasses\com\sun\java\swing\plaf\metal\MetalLookAndFeel.cla
    ss
    java.lang.InstantiationException: tutorial/EmpApplet
    at com/ms/applet/BrowserAppletFrame.newInstance
    at com/ms/applet/AppletPanel.processSentEvent
    at com/ms/applet/AppletPanel.processSentEvent at
    com/ms/applet/AppletPanel.run
    at java/lang/Thread.run
    Please help as I am trying to prove that JDeveloper is the way
    our organization should go for Oracle development.
    Thanks,
    Joe Villarreal
    null

    Joe,
    Does the version on IE that you are using support Swing 1.1 ?
    Also, I am not sure why it is referring to the absolute path (D:
    \Program Files\Oracle\JDeveloper 2.0.184
    Beta\myclasses\com\sun\java\swing\plaf\metal\MetalLookAndFeel.cla
    ). Does your jar file have this path?
    Regards,
    Joe Villarreal (guest) wrote:
    : Hi,I'm having the same "tutorial.EmpApplet can't be
    : instantiated" problem everyone else seems to be having. I've
    : tried all the recommended solutions and nothing works. Here
    is
    : a copy of the output to the Java Console using Internet
    Explorer.
    : com.ms.security.SecurityExceptionEx
    : [com/sun/java/swing/UIManager.setLookAndFeel]:
    : java.io.IOException: bad path: D:\Program
    : Files\Oracle\JDeveloper 2.0.184
    Beta\myclasses\com\sun\java\swing\plaf\metal\MetalLookAndFeel.cla
    : ss
    : at com/ms/security/permissions/FileIOPermission.check
    : at com/ms/security/PolicyEngine.deepCheck
    : at com/ms/security/PolicyEngine.checkPermission
    : at com/ms/security/StandardSecurityManager.chk
    : at com/ms/security/StandardSecurityManager.checkRead
    : at java/io/File.isDirectory
    : at sun/net/www/protocol/file/FileURLConnection.connect
    : at
    : sun/net/www/protocol/file/FileURLConnection.getInputStream
    : at
    : com/ms/vm/loader/ResourceLoader.getCodebaseRelativeData
    : at com/ms/vm/loader/ResourceLoader.getClassData
    : at com/ms/vm/loader/URLClassLoader.findClass
    : at com/ms/vm/loader/URLClassLoader.loadClass
    : at java/lang/ClassLoader.loadClassInternal at
    : java/lang/Class.forName
    : at com/sun/java/swing/UIManager.setLookAndFeel
    : at com/sun/java/swing/UIManager.initializeDefaultLAF
    : at com/sun/java/swing/UIManager.initialize
    : at com/sun/java/swing/UIManager.maybeInitialize
    : at com/sun/java/swing/UIManager.getDefaults
    : at com/sun/java/swing/UIManager.getColor
    : at borland/jbcl/control/BevelPanel.<init>
    : at borland/jbcl/control/ButtonBar.<init>
    : at borland/jbcl/control/NavigatorControl.<init>
    : at tutorial/QueryEmpPanel.<init> at
    : tutorial/EmpApplet.<init>
    : at com/ms/applet/BrowserAppletFrame.newInstance
    : at com/ms/applet/AppletPanel.processSentEvent
    : at com/ms/applet/AppletPanel.processSentEvent at
    : com/ms/applet/AppletPanel.run
    : at java/lang/Thread.runError loading class:
    : com.sun.java.swing.plaf.metal.MetalLookAndFeel
    : com.ms.security.SecurityExceptionEx
    : [com/sun/java/swing/UIManager.setLookAndFeel]:
    : java.io.IOException: bad path: D:\Program
    : Files\Oracle\JDeveloper 2.0.184
    Beta\myclasses\com\sun\java\swing\plaf\metal\MetalLookAndFeel.cla
    : ss
    : com.ms.security.SecurityExceptionEx
    : [com/sun/java/swing/UIManager.setLookAndFeel]:
    : java.io.IOException: bad path: D:\Program
    : Files\Oracle\JDeveloper 2.0.184
    Beta\myclasses\com\sun\java\swing\plaf\metal\MetalLookAndFeel.cla
    : ss
    : at com/ms/security/permissions/FileIOPermission.check
    : at com/ms/security/PolicyEngine.deepCheck
    : at com/ms/security/PolicyEngine.checkPermission
    : at com/ms/security/StandardSecurityManager.chk
    : at com/ms/security/StandardSecurityManager.checkRead
    : at java/io/File.isDirectory
    : at sun/net/www/protocol/file/FileURLConnection.connect
    : at
    : sun/net/www/protocol/file/FileURLConnection.getInputStream
    : at
    : com/ms/vm/loader/ResourceLoader.getCodebaseRelativeData
    : at com/ms/vm/loader/ResourceLoader.getClassData
    : at com/ms/vm/loader/URLClassLoader.findClass
    : at com/ms/vm/loader/URLClassLoader.loadClass
    : at java/lang/ClassLoader.loadClassInternal at
    : java/lang/Class.forName
    : at com/sun/java/swing/UIManager.setLookAndFeel
    : at com/sun/java/swing/UIManager.initializeDefaultLAF
    : at com/sun/java/swing/UIManager.initialize
    : at com/sun/java/swing/UIManager.maybeInitialize
    : at com/sun/java/swing/UIManager.getDefaults
    : at com/sun/java/swing/UIManager.getColor
    : at borland/jbcl/control/BevelPanel.<init>
    : at borland/jbcl/control/ButtonBar.<init>
    : at borland/jbcl/control/NavigatorControl.<init>
    : at tutorial/QueryEmpPanel.<init> at
    : tutorial/EmpApplet.<init>
    : at com/ms/applet/BrowserAppletFrame.newInstance
    : at com/ms/applet/AppletPanel.processSentEvent
    : at com/ms/applet/AppletPanel.processSentEvent at
    : com/ms/applet/AppletPanel.run
    : at java/lang/Thread.runError loading class:
    : com.sun.java.swing.plaf.metal.MetalLookAndFeel
    : com.ms.security.SecurityExceptionEx
    : [com/sun/java/swing/UIManager.setLookAndFeel]:
    : java.io.IOException: bad path: D:\Program
    : Files\Oracle\JDeveloper 2.0.184
    Beta\myclasses\com\sun\java\swing\plaf\metal\MetalLookAndFeel.cla
    : ss
    : java.lang.InstantiationException: tutorial/EmpApplet
    : at com/ms/applet/BrowserAppletFrame.newInstance
    : at com/ms/applet/AppletPanel.processSentEvent
    : at com/ms/applet/AppletPanel.processSentEvent at
    : com/ms/applet/AppletPanel.run
    : at java/lang/Thread.run
    : Please help as I am trying to prove that JDeveloper is the way
    : our organization should go for Oracle development.
    : Thanks,
    : Joe Villarreal
    null

  • Load: AcidRainApplet.class can't be instantiated

    The error "load: AcidRainApplet.class can't be instantiated" is coming up on this bit of code, any ideas on being rid of it?
    // The "AcidRainApplet" class.
    import java.applet.Applet;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.Date;
    import javax.swing.*;
    public class AcidRainApplet extends Applet implements KeyListener, ActionListener
      public AcidRainApplet ()
        super ();
      int width = 600, height = 450;
      int x = width / 2, y = height - 100, w = 27, h = 40;
      int count = 0;
      boolean playing = true, pause = true;
      Font endFont = new Font ("Arial Black", Font.PLAIN, 36);
      Font ptFont = new Font ("Westminster", Font.PLAIN, 28);
      int points = 0;
      int numRain = 80;
      int maxRain = 200;
      int speed = 5;
      ImageIcon imgi = new ImageIcon ("homer.gif");
      Image ch = imgi.getImage ();
      javax.swing.Timer t;
      public void init ()
        setBackground (Color.black);
        t = new javax.swing.Timer (speed, this);
        this.addKeyListener (this);
        for (int i = 0 ; i < maxRain ; i++)
          rain = new Rain ();
    } // init method
    public void paint (Graphics g)
    super.paint (g);
    g.setColor (Color.white);
    g.drawString ("" + numRain, width - 20, 15);
    if (playing)
    g.drawImage (ch, x, y, null);
    g.setColor (Color.green);
    for (int i = 0 ; i < numRain ; i++)
    g.drawLine (rain [i].x, rain [i].y, rain [i].x, rain [i].y - 10);
    if (!(pause))
    rain [i].y += rain [i].sp;
    if (rain [i].y > height)
    rain [i].x = (int) (Math.random () * width);
    rain [i].y = 0;
    rain [i].sp = (int) (Math.random () * 5) + 2;
    points++;
    else if (rain [i].x >= x && rain [i].x <= x + w && rain [i].y >= y && rain [i].y <= y + h)
    playing = false;
    else
    g.drawString ("PRESS ENTER TO PLAY AGAIN", 180, 400);
    g.setFont (endFont);
    g.setColor (Color.red);
    g.drawString ("GAME OVER", 150, 200);
    g.setFont (ptFont);
    g.setColor (Color.green);
    g.drawString ("Score: " + points, 200, 300);
    t.stop ();
    if (pause)
    g.setColor (Color.green);
    g.drawString ("PRESS ENTER", 200, 200);
    } // paint method
    public void resetVars ()
    x = width / 2;
    y = height - 100;
    count = 0;
    playing = true;
    pause = true;
    points = 0;
    maxRain = 200;
    speed = 5;
    for (int i = 0 ; i < maxRain ; i++)
    rain [i] = new Rain ();
    public class Rain extends Applet
    Rain ()
    int x = (int) (Math.random () * width);
    int y = 0;
    int sp = (int) (Math.random () * 5) + 2;
    Rain rain [] = new Rain [maxRain];
    public void actionPerformed (ActionEvent e)
    repaint ();
    public void keyTyped (KeyEvent k)
    public void keyPressed (KeyEvent k)
    int key = k.getKeyCode ();
    if (!(pause))
    if (key == k.VK_LEFT && x > 0)
    x -= 5;
    if (key == k.VK_RIGHT && x + w < width)
    x += 5;
    if (key == k.VK_DOWN && numRain > 10)
    numRain -= 10;
    repaint ();
    if (key == k.VK_UP && numRain != maxRain)
    numRain += 10;
    repaint ();
    if (key == k.VK_ENTER)
    if (pause)
    pause = false;
    t.start ();
    else if (!(playing))
    resetVars ();
    else
    pause = true;
    t.stop ();
    public void keyReleased (KeyEvent k)
    } // AcidRainApplet class

    Irrespective of the working of your program, I would suggest you remove a lot of weeds and clean the code. That would help you do easier debugging .
    Somethings I can quickly tell are,
    the constructor in AcidRainApplet not useful, Rain implementing Applet not useful, implements KeyListener, ActionListener can be delegated to another class, usage of inner class can be rethinked of delegation can be given a thought. Following code can be thought of :
      class Rain
        private  int x = 0;
        private int y = 0;
        private int sp = 0;
        Rain ()
          reset();
        public int getX() {
          return x;
        public int getY() {
          return y;
        public void setX(int x) {
          this.x = x;
        public void setY(int y) {
          this.y = y;
         public void reset() {
          x = (int) (Math.random () * width);
          y = 0;
          sp = (int) (Math.random () * 5) + 2;   
      }Good wishes,
    Rajesh

  • "Class can't be instantiated " error message. Help !

    Dear Java People,
    In trying to do a program that outputs a sound with every button click
    I have no compilation errors but a runtime error that says:
    "class can't be instantiated"
    below is the program and below that the error message
    thank you in advance
    Norman
    import java.util.*;
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import java.applet.*;
    import java.awt.event.*;
    import java.net.*;
    public abstract class MyMusicApplet_1 extends JApplet implements ActionListener, AppletContext
         //AppletContext myAppletContext =   new AppletContext();
         //Iterator i =   myAppletContext.getStreamKeys();
         JButton myJButton;
         AudioClip acSound_1;
         AudioClip acSound_2;
         AudioClip acSound_3;
         AudioClip acSound_4;
         AudioClip acSound_5;
         AudioClip acSound_6;
         AudioClip acSound_7;
         AudioClip acSound_8;
         AudioClip acSound_9;
         JButton myJButtonSound1;
         JButton myJButtonSound2;
         JButton myJButtonSound3;
         JButton myJButtonSound4;
         JButton myJButtonSound5;
         JButton myJButtonSound6;
         JButton myJButtonSound7;
         JButton myJButtonSound8;
         JButton myJButtonSound9;
      public void init()
            try
             acSound_1 = getAudioClip(new URL ("c:/Program Files/Cakewalk/Cakewalk Pro Audio 9/seashore.wrk"));
             acSound_2 = getAudioClip(new URL ("c:/Program Files/Cakewalk/Cakewalk Pro Audio 9/seashore.wrk"));
             acSound_3 = getAudioClip(new URL ("c:/Program Files/Cakewalk/Cakewalk Pro Audio 9/seashore.wrk"));
             acSound_4 = getAudioClip(new URL ("c:/Program Files/Cakewalk/Cakewalk Pro Audio 9/seashore.wrk"));
             acSound_5 = getAudioClip(new URL ("c:/Program Files/Cakewalk/Cakewalk Pro Audio 9/seashore.wrk"));
             acSound_6 = getAudioClip(new URL ("c:/Program Files/Cakewalk/Cakewalk Pro Audio 9/seashore.wrk"));
             acSound_7 = getAudioClip(new URL ("c:/Program Files/Cakewalk/Cakewalk Pro Audio 9/seashore.wrk"));
             acSound_8 = getAudioClip(new URL ("c:/Program Files/Cakewalk/Cakewalk Pro Audio 9/seashore.wrk"));
             acSound_9 = getAudioClip(new URL ("c:/Program Files/Cakewalk/Cakewalk Pro Audio 9/seashore.wrk"));
             catch (MalformedURLException e)
               System.out.println("Error here " );
           Container myContentPane = getContentPane();
           myContentPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
            Dimension buttonSize = new Dimension(190,100);
           Font myFont = new Font("Arial", Font.BOLD,14);
           Border myEdge = BorderFactory.createRaisedBevelBorder();
                    //create 1st button's object
                     myJButtonSound1 = new JButton("sound #1");
                    myJButtonSound1.addActionListener(this);
                   //set the button's border and size, font background and foreground
                   myJButtonSound1.setBorder(myEdge);
                   myJButtonSound1.setPreferredSize(buttonSize);
                   myJButtonSound1.setFont(myFont);
                   myJButtonSound1.setBackground(Color.orange);
                   myJButtonSound1.setForeground(Color.black);
                    //create 2nd button's object
                     myJButtonSound2 = new JButton("sound #2");
                    myJButtonSound2.addActionListener(this);
                   //set the button's border and size, font, background and foreground
                   myJButtonSound2.setBorder(myEdge);
                   myJButtonSound2.setPreferredSize(buttonSize);
                   myJButtonSound2.setFont(myFont);
                   myJButtonSound2.setBackground(Color.blue);
                   myJButtonSound2.setForeground(Color.black);
                    //create 3rd button's object
                     myJButtonSound3 = new JButton("sound #3");
                    myJButtonSound1.addActionListener(this);
                   //set the button's border and size, font, background and foreground
                   myJButtonSound3.setBorder(myEdge);
                   myJButtonSound3.setPreferredSize(buttonSize);
                   myJButtonSound3.setFont(myFont);
                   myJButtonSound3.setBackground(Color.cyan);
                   myJButtonSound3.setForeground(Color.black);
                    //create 4th button's object
                     myJButtonSound4 = new JButton("sound #4");
                    myJButtonSound4.addActionListener(this);
                   //set the button's border and size, font background and foreground
                   myJButtonSound4.setBorder(myEdge);
                   myJButtonSound4.setPreferredSize(buttonSize);
                   myJButtonSound4.setFont(myFont);
                   myJButtonSound4.setBackground(Color.pink);
                   myJButtonSound4.setForeground(Color.black);
                   //create 5th button's object
                   myJButtonSound5 = new JButton("sound #5");
                  myJButtonSound5.addActionListener(this);
                 //set the button's border and size, font background and foreground
                 myJButtonSound5.setBorder(myEdge);
                 myJButtonSound5.setPreferredSize(buttonSize);
                 myJButtonSound5.setFont(myFont);
                 myJButtonSound5.setBackground(Color.red);
                 myJButtonSound5.setForeground(Color.black);
                  //create 6th button's object
                   myJButtonSound6 = new JButton("sound #6");
                  myJButtonSound6.addActionListener(this);
                 //set the button's border and size, font, background and foreground
                 myJButtonSound6.setBorder(myEdge);
                 myJButtonSound6.setPreferredSize(buttonSize);
                 myJButtonSound6.setFont(myFont);
                 myJButtonSound6.setBackground(Color.pink);
                 myJButtonSound6.setForeground(Color.black);
                  //create 7th button's object
                   myJButtonSound7 = new JButton("Choice #7");
                  myJButtonSound7.addActionListener(this);
                 //set the button's border and size, font, background and foreground
                 myJButtonSound7.setBorder(myEdge);
                 myJButtonSound7.setPreferredSize(buttonSize);
                 myJButtonSound7.setFont(myFont);
                 myJButtonSound7.setBackground(Color.cyan);
                 myJButtonSound7.setForeground(Color.black);
                  //create 8th button's object
                   myJButtonSound8 = new JButton("Choice #8");
                  myJButtonSound8.addActionListener(this);
                 //set the button's border and size, font background and foreground
                 myJButtonSound8.setBorder(myEdge);
                 myJButtonSound8.setPreferredSize(buttonSize);
                 myJButtonSound8.setFont(myFont);
                 myJButtonSound8.setBackground(Color.yellow);
                 myJButtonSound8.setForeground(Color.black);
                  //create 9th button's object
                   myJButtonSound9 = new JButton("Choice #9");
                  myJButtonSound9.addActionListener(this);
                 //set the button's border and size, font background and foreground
                 myJButtonSound9.setBorder(myEdge);
                 myJButtonSound9.setPreferredSize(buttonSize);
                 myJButtonSound9.setFont(myFont);
                 myJButtonSound9.setBackground(Color.blue);
                 myJButtonSound9.setForeground(Color.black);
                   //add the buttons to the content pane
                   myContentPane.add(myJButtonSound1);
                   myContentPane.add(myJButtonSound2);
                   myContentPane.add(myJButtonSound3);
                   myContentPane.add(myJButtonSound4);
                   myContentPane.add(myJButtonSound5);
                   myContentPane.add(myJButtonSound6);
                   myContentPane.add(myJButtonSound7);
                   myContentPane.add(myJButtonSound8);
                   myContentPane.add(myJButtonSound9);
          public void actionPerformed(ActionEvent e)
             myJButton = (JButton)e.getSource();
            if(myJButton == myJButtonSound1)
              acSound_1.play();
            if(myJButton == myJButtonSound2)
              acSound_2.play();
            if(myJButton == myJButtonSound3)
              acSound_3.play();
            if(myJButton == myJButtonSound4)
              acSound_4.play();
            if(myJButton == myJButtonSound5)
              acSound_5.play();
             if(myJButton == myJButtonSound6)
               acSound_6.play();
                       if(myJButton == myJButtonSound7)
                         acSound_7.play();
                       if(myJButton == myJButtonSound8)
                         acSound_8.play();
                        if(myJButton == myJButtonSound9)
                          acSound_9.play();
    java.lang.InstantiationException
         at sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(InstantiationExceptionConstructorAccessorImpl.java:30)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
    load: stan_my_music_applet_1.MyMusicApplet_1.class can't be instantiated.
         at java.lang.Class.newInstance0(Class.java:306)
         at java.lang.Class.newInstance(Class.java:259)
         at sun.applet.AppletPanel.createApplet(AppletPanel.java:566)
         at sun.applet.AppletPanel.runLoader(AppletPanel.java:495)
         at sun.applet.AppletPanel.run(AppletPanel.java:292)
         at java.lang.Thread.run(Thread.java:536)

    I also tried:
    try
    for(int a=0;a<8;a++)
    {acSounds[a] = getAudioClip(getCodeBase(),(new URL ("c:/Program Files/Cakewalk/Cakewalk Pro Audio 9/seashore" + (i + 1) + ".wrk")));
    and the error message still says:
    "MyMusicApplet3.java": Error #: 300 : method getAudioClip(java.net.URL, java.net.URL) not found in class stan_my_music_applet_3.MyMusicApplet3 at line 19
    Help !
    below is the revised code
    Norman
    import java.util.*;
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import java.applet.*;
    import java.awt.event.*;
    import java.net.*;
    public class MyMusicApplet3 extends JApplet implements ActionListener
      AudioClip[] acSounds= new AudioClip[9];
      public void init()
       try
            for(int a=0;a<8;a++)
            {acSounds[a] = getAudioClip(getCodeBase(),(new URL ("c:/Program Files/Cakewalk/Cakewalk Pro Audio 9/seashore" + (a + 1) + ".wrk")));
      catch (Exception e)
        System.out.println("Error here " );
            Container myContentPane = getContentPane();
            myContentPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
            myContentPane.add(getButton("1", Color.orange));
            myContentPane.add(getButton("2", Color.blue));
            myContentPane.add(getButton("3", Color.cyan));
            myContentPane.add(getButton("4", Color.pink));
            myContentPane.add(getButton("5", Color.red));
            myContentPane.add(getButton("6", Color.pink));
            myContentPane.add(getButton("7", Color.cyan));
            myContentPane.add(getButton("8", Color.yellow));
            myContentPane.add(getButton("9", Color.blue));
        public void actionPerformed(ActionEvent e)
           String command = e.getActionCommand();
           int index = Integer.parseInt(command)-1;
           acSounds[index].play();
       public JButton getButton(String label, Color fore)
         {          JButton button = new JButton("sound "+label);
                    button.setPreferredSize(new Dimension(190,100));
                    button.setFont(new Font("Arial", Font.BOLD,14));
                    button.setBorder(BorderFactory.createRaisedBevelBorder());
                    button.setForeground(fore);
                    button.setBackground(Color.orange);
                    button.addActionListener(this);
                    button.setActionCommand(label);
                    return button;
          }//"MyMusicApplet3.java": Error #: 300 :
    //method getAudioClip(java.net.URL, java.net.URL) not found in class
    // stan_my_music_applet_3.MyMusicApplet3 at line 19, column 24

  • Help!!! Applet can't be instantiated Error

    Hi,
    I am opening an applet in IE. But All i am getting is blank frame.
    When i move my curser over the applet I am reading this error
    loads: com.blny.scan.db.ScanViewApplet can't be instantiated
    Any help or suggestions are always appreciated.
    Thanks in advance.

    thank you for your reply.
    I am using jbuilder to develop this project. I have a applet-servlet commucication which gets the image from db and displays in applet.
    This works fine in JBuilder, but when i am opening this in IE I am getting the same error as i stated earlier.
    thanks.
    here is my html code
    <html>
    <head>
    <title>
    HTML Test Page
    </title>
    </head>
    <body>
    com.blny.scan.db.ScanViewApplet will appear below in a Java enabled browser.<br>
    <applet
    codebase = "."
    archive = "SCAN_PROJECT.jar"
    code = "com.blny.scan.db.ScanViewApplet.class"
    name = "TestApplet"
    width = "899"
    height = "662"
    hspace = "0"
    vspace = "0"
    align = "middle"
    >
    </applet>
    </body>
    </html>

  • Class can't be instantiated

    Hi guys
    Just having trouble running this applet for some reason, in any browser. Other applets are working at the minute, so it doesn't look like a prob with the browsers or JVM.
    Heres the code, followed by the error message.
    import java.awt.*;
    import java.applet.*;
    import java.awt.event.*;
    public abstract class ColourButtons extends Applet
                                              implements ActionListener, MouseListener
         private Button colorButtons[] = new Button[7];
        private Color color = Color.black;
         int x1, y1, x2, y2 = 1;
        public void init()
              setLayout(new BorderLayout(20,20));
              Panel pWest = new Panel();
              pWest.setLayout(new GridLayout(7,1));
              for(int x =0; x <= 6; x++)
                   colorButtons[x] = new Button("   ");
                   pWest.add(colorButtons[x]);
                   add("West",pWest);
                   //add actionlisteners for each button
                   colorButtons[x].addActionListener(this);
                   if(x == 0){
                        color = Color.red;}
                   else if( x==1){
                        color = Color.blue;}
                   else if(x==2){
                        color = Color.green;}
                   else if(x==3){
                        color = Color.yellow;}
                   else if(x==4){
                        color = Color.orange;}
                   else if(x==5){
                        color = Color.black;}
                   else if(x==6){
                        color = Color.white;}
                   colorButtons[x].setBackground(color);
            setBackground(Color.gray);
        public void paint(Graphics g)
              Graphics2D g2 = (Graphics2D)g;
              g2.setColor(color);
              //create Rectangle Object
              Rectangle myRectangle = new Rectangle(x1,y1,x2,y2);
              g2.draw(myRectangle);
                       g2.drawString("HELLO", 150,100);
        public void actionPerformed(ActionEvent a)
            Button button = (Button)a.getSource();
            color = button.getBackground();
            repaint();
        public void mouseClicked(MouseEvent e)
        public void mouseEntered(MouseEvent e)
        public void mouseExited(MouseEvent e)
        public void mousePressed(MouseEvent e)
              x1 = e.getX();
              y1 = e.getY();
        public void mouseReleased(MouseEvent e)
              x2 = e.getX();
              y2 = e.getY();
    }And heres the error message.
    load: ColourButtons.class can't be instantiated.
    java.lang.InstantiationException
    at sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance
    (InstantiationExceptionConstructorAccessorImpl.java:30)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
    at java.lang.Class.newInstance0(Class.java:306)
    at java.lang.Class.newInstance(Class.java:259)
    at sun.applet.AppletPanel.createApplet(AppletPanel.java:566)
    at sun.applet.AppletPanel.runLoader(AppletPanel.java:495)
    at sun.applet.AppletPanel.run(AppletPanel.java:292)
    at java.lang.Thread.run(Thread.java:536)
    Any ideas at what is wrong?
    Any help/pointers greatly appreciated
    Cheers

    ok cheers thats sorted it. For some reason it wanted it to be abstract once i added mouse listener i think.
    Anyway cheers

  • Applet in ie 5.0: class can not be Instantiated

    Hi!
    My problem is an Applet, which works fine with the appletviewer and with my iExplorer 5.0.
    But when I tried to install my Application (the Applet is part of a J2EE-WebApp) on the tomcat of an other computer, I get the
    "class can not be instantiated"-Error and iE 5.0 only displays a grey box in the size of the Applet. With the appletviewer it works.
    I got the same tomcat, same mySQL and same browser on both computers.
    I also invoked the application running in tomcat on my computer from 2 other computers - on one of them, the Applet was shown, on the other, I only got this grey box.
    The version of the iExplorer was exactly the same.
    What can be wrong?

    Are you sure there is a static method in the Applet class named newAudioChip that takes a URL as an argument?

  • After closing the Firefox browser, a message appears "Severe error: Cannot load resource file; can not run". What could be wrong?

    The message: "Severe Error; Can 't load resourse file; can not run" appears after closing Firefox4. All other applications on my pc do not have this problem.

    I've found text of this error in npdjvu.dll plugin, remove it and error seems to disappear.

  • Safari won't load and I can't update my software, ie., I get an error message.  What can I do to fix this?

    Safari won't load and I can't update my software, ie., I get an error message.  What can I do to fix this?

    You can't install Safari 3 on your 10.3.9 OS.
    You must use the DVD installer to re-install the older version of Safari found on it.
    You can update your operating system buy purchasing Tiger (10.4) and get a more modern version of Safari.

  • Error with signed applet "class can't be instantiated"

    hi,
    I developed an applet to make a ftp connexion to upload files from the local disk and the applet is already signed. At first I compiled it with the 1.4 version and I got (from other computers) the error "class not found". Then I used the target 1.1 option and now I get the error "class can't be instantiated"
    Do I need any additional code?
    I am using all these imports
    import java.applet.Applet;
    import java.applet.AppletContext;
    import java.awt.*;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import javax.swing.JComponent;
    import javax.swing.JProgressBar;
    import javax.swing.*;
    Thanks

    go to
    Tools->Internet Options->Advanced
    Look for "Java (Sun)" (normally near Microsoft VM). I uncheck all the Microsoft VM options but am not sure if that is really necessary.
    Also play with Control Panel, you should see "Java Plug-in" in there and be able to configure browsers a bit with that.

  • Private Browsing function is suddenly not working. Error message :"The URL is not valid and cannot be loaded." How can I repair?

    Private Browsing function is suddenly not working. Error message :"The URL is not valid and cannot be loaded."
    How can I fix it?

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • When i want to download an app in app store give me an error number and i could not down load.how i can solve this error number?

    When i want to download an app in app store give me an error number and i could not down load.how i can solve this error number?

    Hi Amir.09395340646,
    Welcome to the Support Communities!
    What app are you trying to download? Is it iPhoto for iOS?  What error message are you receiving? The first thing I would suggest is to log out of your iTunes Store account on your iPhone. Then restart the device and log in again. 
    iOS: Changing the signed-in iTunes Store Apple ID account
    http://support.apple.com/kb/HT1311?viewlocale=en_US
    If the above did not resolve your issue, follow the troubleshooting steps in the article below.
    The link includes the complete details and screenshots, but I've highlighted a few points for you:
    Can't connect to the iTunes Store
    http://support.apple.com/kb/TS1368
    - Make sure that your iOS software is up to date by connecting your iOS device to iTunes and clicking on Check for Update in your device's Summary page in iTunes.
    - Check and verify that you are in range of a Wi-Fi router or base station. If you are on a 3G capable device, make sure that cellular data is turned on from Settings > General > Cellular.
    - Check to make sure you have an active internet connection. You can check the User Guide for your device for help with connecting to the internet.
    - Check to make sure other devices (portable computers, for example) are able to connect to the Wi-Fi network and access the internet.
    - Try resetting (turning off and then on again) your Wi-Fi router
    - If the issue still persists see, iOS: Troubleshooting Wi-Fi networks and connections or iOS: Troubleshooting Wi-Fi networks and connections.
    I hope this information helps ....
    - Judy

  • I downloaded songs to my phone at xmas and when i plugged in to my laptop it wiped the phone of new purchases when i try and download them to my computer in itunes via previous purchesses it wont load the list and i keep getting error 10053 can any1 help

    i downloaded songs to my phone at xmas and when i plugged in to my laptop it wiped the phone of new purchases when i try and download them to my computer in itunes via previous purchesses it wont load the list and i keep getting error 10053 can any1 help

    Syncing shouldn't trouch you photos unless you have photos in a Photo Library album.  These would be photos that were synced to your phone from your computer.  If you do have any, you'll need to use an app like PhotoSync to transfer them to your computer prior to syncing.
    If you prefer to backup your camera roll photos prior to syncing, open iTunes and go to Preferences>Devices and check "Prevent...from syncing automatically".  Then connect your phone to your computer and import them as explained here: http://support.apple.com/kb/HT4083.
    Then, to minimize data loss, follow the steps in this user tip: https://discussions.apple.com/docs/DOC-3141.  To follow the steps, first open iTunes and go to View>Show Sidebar.  Also, Transfer Purchases is now located in File>Devices.

  • Hi, Im trying to install the CC installer on my new MacPro. When the installer loads it says there's a "Download Error" and can't get beyond that. Everything work fine on my old Mac. Any Ideas?

    Im trying to install the CC installer on my new MacPro. When the installer loads it says there's a "Download Error" and can't get beyond that. Everything work fine on my old Mac. Any Ideas?

    Chasel please see Error downloading Creative Cloud applications - http://helpx.adobe.com/creative-cloud/kb/error-downloading-cc-apps.html for information on how to resolve download errors.

  • PC went south. Geeks brought it back. PS elements and premier 11 can't start. Error msg sez configuration incorrect needs to be reinstalled. When I load the disk I get a blank screen. Try to uninstall and can't find apps i control panel. How can I get the

    PC went south. Geeks brought it back. PS elements and premier 11 can't start. Error msg sez configuration incorrect needs to be reinstalled. When I load the disk I get a blank screen. Try to uninstall and can't find apps i control panel. How can I get the apps back?

    adobeamatuer
    Thanks for the reply.
    Although the security of Windows XP SP3 32 bit is compromised by Microsoft no longer supporting XP, if Windows XP was restored as claimed, you should still be able to install/uninstall Premiere Elements versions of it that you did before the Microsoft support removal.
    I think a revisit to the Geeks would be in order. It may be that they could not restore Windows XP because of the Microsoft non support. I would take along the Premiere Elements installation disks so that you do not leave there without actually seeing Premiere Elements (or a non Adobe program) running on your restored Windows XP. What was the other software that you tried to use that did not work?
    Please update us on your progress when you get a chance.
    Best wishes
    Thanks.
    ATR
    Add On...spelling correct 12 03 2014.

Maybe you are looking for

  • Multiple All Day Events, Printing "Order"

    I need to create a log, where 4 fields are used for people to fill in. For ease of explanation, I'll call them "A" "B" "C" and "D". I have tried using one Calendar, and creating 4 all day events. When I do this, and go to Print the thing, the events

  • Reinstalled Lion 10.7.4, now intermittent startup

    I installed a new drive on my Mac Pro 1,1. TechTools Computer Check checked out, including surface scan. I reinstalled Lion 10.7.4 from the Apple Store, as directed, and checked for Software Updates several times. I reinstalled Safari 6. (Because I c

  • JavaScript error in keywords.js?

    When entering or modifying 'keywords' in an html-file in Dreamweaver I seem to get the following error when switching applications and returning to DW: While executing onBlur in keywords.htm, the following JavaScript error(s) occurred: At line 66 of

  • Will Instant Client 10.2.0.1 be available for Solaris 32-bit (SPARC)?

    The latest Instant Client release is currently not available for Solaris Sparc 32-bit. Does anyone know when it will be available? Thank you.

  • IWeb text collides when increased

    I built a website with iWeb: www.purposetherapy.org When I go to that website the font text fits together nicely, but if I increase the size of the font the text smashes together and you can't read it. On most other websites (apple, ebay, dealmac etc