More confused than ever. Please give me a hint.

Discussion in 'Java' started by Daniel Pope, Feb 21, 2004.

  1. Daniel Pope

    Daniel Pope Guest

    Dear All,

    Five years ago I used Microsoft java 1.2 for about one year to build complex
    graphical applets. And I was thinking (poor me) that I'll have no big
    problems to use again Java (Sun realese this time). How wrong I was!
    Though I installed on my Windows 98 both Net Beans IDE 3.51 and Java (TM)
    Web Services Developer Pack 1.3 (couldn' install 1.4), I am not able to run
    the following test applet locally on my computer (source is not mine - I
    downloaded from the Internet to be sure that is something that works), that
    I could compile easily with Net Beans UDE 3.5.1.(see the code below).
    I got always the messages from below in my java console (look at the
    bottom).
    I am totally confused, because I do not know what to do: what software
    package should I install in order to make it works and how to install the
    default path to these classes.

    Any hints would be greatly appreciated.
    Thank you in advance!

    Daniel Pope

    PS. I'm using Internet Explorer 6


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


    /** Draw circles centered where the user clicks. */

    public class Circles extends Applet {
    public void init() {
    MouseListener circleListener =
    // An inner class.
    new MouseAdapter() {
    public void mouseClicked(MouseEvent event) {
    getGraphics().fillOval(event.getX()-25,
    event.getY()-25,
    50, 50);
    }
    };

    // Attach the class just defined to the Applet.
    addMouseListener(circleListener);
    }
    }


    What I get from the Java Console.
    *****************************************
    Error loading class: Circles
    java.lang.NoClassDefFoundError
    java.lang.ClassNotFoundException: Circles
    at com/ms/vm/loader/URLClassLoader.loadClass (URLClassLoader.java)
    at com/ms/vm/loader/URLClassLoader.loadClass (URLClassLoader.java)
    at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
    at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
    at com/ms/applet/AppletPanel.run (AppletPanel.java)
    at java/lang/Thread.run (Thread.java)
    ******************************************
    Daniel Pope, Feb 21, 2004
    #1
    1. Advertising

  2. Daniel Pope wrote:

    > Dear All,
    >
    > Five years ago I used Microsoft java 1.2 for about one year to build
    > complex graphical applets. And I was thinking (poor me) that I'll have no
    > big problems to use again Java (Sun realese this time). How wrong I was!
    > Though I installed on my Windows 98 both Net Beans IDE 3.51 and Java (TM)
    > Web Services Developer Pack 1.3 (couldn' install 1.4), I am not able to
    > run
    > the following test applet locally on my computer (source is not mine - I
    > downloaded from the Internet to be sure that is something that works),
    > that I could compile easily with Net Beans UDE 3.5.1.(see the code below).
    > I got always the messages from below in my java console (look at the
    > bottom).
    > I am totally confused, because I do not know what to do: what software
    > package should I install in order to make it works and how to install the
    > default path to these classes.
    >
    > Any hints would be greatly appreciated.
    > Thank you in advance!
    >
    > Daniel Pope
    >
    > PS. I'm using Internet Explorer 6
    >
    >
    > import java.applet.Applet;
    > import java.awt.*;
    > import java.awt.event.*;
    >
    >
    > /** Draw circles centered where the user clicks. */
    >
    > public class Circles extends Applet {
    > public void init() {
    > MouseListener circleListener =
    > // An inner class.
    > new MouseAdapter() {
    > public void mouseClicked(MouseEvent event) {
    > getGraphics().fillOval(event.getX()-25,
    > event.getY()-25,
    > 50, 50);
    > }
    > };
    >
    > // Attach the class just defined to the Applet.
    > addMouseListener(circleListener);
    > }
    > }
    >
    >
    > What I get from the Java Console.
    > *****************************************
    > Error loading class: Circles
    > java.lang.NoClassDefFoundError
    > java.lang.ClassNotFoundException: Circles
    > at com/ms/vm/loader/URLClassLoader.loadClass (URLClassLoader.java)
    > at com/ms/vm/loader/URLClassLoader.loadClass (URLClassLoader.java)
    > at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
    > at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
    > at com/ms/applet/AppletPanel.run (AppletPanel.java)
    > at java/lang/Thread.run (Thread.java)
    > ******************************************


    You are not using the Sun java plugin, but the old and obsolete plugin of
    Microsoft itself. Check you java plugin settings in your browser and make
    sure you use the latest Sun one.


    --
    Kind regards,
    Christophe Vanfleteren
    Christophe Vanfleteren, Feb 21, 2004
    #2
    1. Advertising

  3. Daniel Pope

    Daniel Pope Guest

    I checked for hours such options in my Internet Explorer 6 such but I was
    unable to find where I can change the java plugin (from obsolete Microsoft
    to the new Sun one). Anyway many thanks for trying to help me.



    "Christophe Vanfleteren" <> wrote in message
    news:acRZb.9301$-ops.be...
    > Daniel Pope wrote:
    >
    > > Dear All,
    > >
    > > Five years ago I used Microsoft java 1.2 for about one year to build
    > > complex graphical applets. And I was thinking (poor me) that I'll have

    no
    > > big problems to use again Java (Sun realese this time). How wrong I was!
    > > Though I installed on my Windows 98 both Net Beans IDE 3.51 and Java

    (TM)
    > > Web Services Developer Pack 1.3 (couldn' install 1.4), I am not able to
    > > run
    > > the following test applet locally on my computer (source is not mine -

    I
    > > downloaded from the Internet to be sure that is something that works),
    > > that I could compile easily with Net Beans UDE 3.5.1.(see the code

    below).
    > > I got always the messages from below in my java console (look at the
    > > bottom).
    > > I am totally confused, because I do not know what to do: what software
    > > package should I install in order to make it works and how to install

    the
    > > default path to these classes.
    > >
    > > Any hints would be greatly appreciated.
    > > Thank you in advance!
    > >
    > > Daniel Pope
    > >
    > > PS. I'm using Internet Explorer 6
    > >
    > >
    > > import java.applet.Applet;
    > > import java.awt.*;
    > > import java.awt.event.*;
    > >
    > >
    > > /** Draw circles centered where the user clicks. */
    > >
    > > public class Circles extends Applet {
    > > public void init() {
    > > MouseListener circleListener =
    > > // An inner class.
    > > new MouseAdapter() {
    > > public void mouseClicked(MouseEvent event) {
    > > getGraphics().fillOval(event.getX()-25,
    > > event.getY()-25,
    > > 50, 50);
    > > }
    > > };
    > >
    > > // Attach the class just defined to the Applet.
    > > addMouseListener(circleListener);
    > > }
    > > }
    > >
    > >
    > > What I get from the Java Console.
    > > *****************************************
    > > Error loading class: Circles
    > > java.lang.NoClassDefFoundError
    > > java.lang.ClassNotFoundException: Circles
    > > at com/ms/vm/loader/URLClassLoader.loadClass (URLClassLoader.java)
    > > at com/ms/vm/loader/URLClassLoader.loadClass (URLClassLoader.java)
    > > at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
    > > at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
    > > at com/ms/applet/AppletPanel.run (AppletPanel.java)
    > > at java/lang/Thread.run (Thread.java)
    > > ******************************************

    >
    > You are not using the Sun java plugin, but the old and obsolete plugin of
    > Microsoft itself. Check you java plugin settings in your browser and make
    > sure you use the latest Sun one.
    >
    >
    > --
    > Kind regards,
    > Christophe Vanfleteren
    Daniel Pope, Feb 22, 2004
    #3
  4. Daniel Pope wrote:
    > "Christophe Vanfleteren" ...
    >> Daniel Pope wrote:



    Please do not top-post Daniel,
    as it destroys the thread of a
    converation..
    ....
    >>> ...I am not able to run
    >>> the following test applet locally on my computer (source is not
    >>> mine - I downloaded from the Internet to be sure that is something
    >>> that works), that I could compile easily with Net Beans UDE
    >>> 3.5.1.(see the code below). I got always the messages from below in
    >>> my java console (look at the bottom).

    ....
    >>> What I get from the Java Console.
    >>> *****************************************
    >>> Error loading class: Circles
    >>> java.lang.NoClassDefFoundError
    >>> java.lang.ClassNotFoundException: Circles
    >>> at com/ms/vm/loader/URLClassLoader.loadClass (URLClassLoader.java)

    ....
    >> You are not using the Sun java plugin, but the old and obsolete
    >> plugin of Microsoft itself. Check you java plugin settings in your
    >> browser and make sure you use the latest Sun one.


    > I checked for hours such options in my Internet Explorer 6 such but
    > I was unable to find where I can change the java plugin (from
    > obsolete Microsoft to the new Sun one). Anyway many thanks for trying
    > to help me.


    This document makes upgrading less painful
    http://www.physci.org/codes/jre.jsp
    If you are using 1.1, the page will redirect
    for test of 1.2 ..to a page with a link to Sun,
    to download the Plug-In.

    HTH

    --
    Andrew Thompson
    * http://www.PhySci.org/ Open-source software suite
    * http://www.PhySci.org/codes/ Web & IT Help
    * http://www.1point1C.org/ Science & Technology
    Andrew Thompson, Feb 22, 2004
    #4
  5. "Daniel Pope" <> writes:

    > java.lang.ClassNotFoundException: Circles


    This means your class isn't where you say it is in the APPLET element
    you didn't post.
    Tor Iver Wilhelmsen, Feb 22, 2004
    #5
  6. "Daniel Pope" <> wrote in message
    news:X8RZb.569941$JQ1.265133@pd7tw1no...
    > Dear All,
    >
    > Five years ago I used Microsoft java 1.2 for about one year to build

    complex
    > graphical applets. And I was thinking (poor me) that I'll have no big
    > problems to use again Java (Sun realese this time). How wrong I was!
    > Though I installed on my Windows 98 both Net Beans IDE 3.51 and Java (TM)
    > Web Services Developer Pack 1.3 (couldn' install 1.4), I am not able to

    run
    > the following test applet locally on my computer (source is not mine - I
    > downloaded from the Internet to be sure that is something that works),

    that
    > I could compile easily with Net Beans UDE 3.5.1.(see the code below).
    > I got always the messages from below in my java console (look at the
    > bottom).
    > I am totally confused, because I do not know what to do: what software
    > package should I install in order to make it works and how to install the
    > default path to these classes.
    >
    > Any hints would be greatly appreciated.
    > Thank you in advance!
    >
    > Daniel Pope
    >
    > PS. I'm using Internet Explorer 6
    >
    >
    > import java.applet.Applet;
    > import java.awt.*;
    > import java.awt.event.*;
    >
    >
    > /** Draw circles centered where the user clicks. */
    >
    > public class Circles extends Applet {
    > public void init() {
    > MouseListener circleListener =
    > // An inner class.
    > new MouseAdapter() {
    > public void mouseClicked(MouseEvent event) {
    > getGraphics().fillOval(event.getX()-25,
    > event.getY()-25,
    > 50, 50);
    > }
    > };
    >
    > // Attach the class just defined to the Applet.
    > addMouseListener(circleListener);
    > }
    > }
    >
    >
    > What I get from the Java Console.
    > *****************************************
    > Error loading class: Circles
    > java.lang.NoClassDefFoundError
    > java.lang.ClassNotFoundException: Circles
    > at com/ms/vm/loader/URLClassLoader.loadClass (URLClassLoader.java)
    > at com/ms/vm/loader/URLClassLoader.loadClass (URLClassLoader.java)
    > at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
    > at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
    > at com/ms/applet/AppletPanel.run (AppletPanel.java)
    > at java/lang/Thread.run (Thread.java)
    > ******************************************
    >
    >


    Daniel,

    1.3 is not capable of handling <aplet> tags, only <object> tags with some
    very specific parameters. You should really move to 1.4 where it will be
    simple to use the Sun plugin as the handler for <applet> tags.

    As other poster already mentioned the MS VM is trying to load the classes
    which are in a format it does not recognize. You could compile them into an
    older format using "-target 1.1" as an additional parameter to javac but
    that will only work with MSVM if you limit yourself to jdk 1.1 functionality
    which is a pain.

    Silvio Bierman
    Silvio Bierman, Feb 22, 2004
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Porky Pig Jr
    Replies:
    3
    Views:
    369
    Dave Cole
    Aug 24, 2004
  2. Robert Brewer
    Replies:
    4
    Views:
    380
    Porky Pig Jr
    Aug 24, 2004
  3. Garg
    Replies:
    4
    Views:
    928
  4. chuan

    Please give me a hint!

    chuan, Apr 23, 2009, in forum: C++
    Replies:
    4
    Views:
    412
    Victor Freire
    Apr 24, 2009
  5. Steven D'Aprano
    Replies:
    0
    Views:
    75
    Steven D'Aprano
    Dec 23, 2013
Loading...

Share This Page