More confused than ever. Please give me a hint.

D

Daniel Pope

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)
******************************************
 
C

Christophe Vanfleteren

Daniel said:
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.
 
D

Daniel Pope

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.
 
A

Andrew Thompson

Daniel said:
"Christophe Vanfleteren" ...


Please do not top-post Daniel,
as it destroys the thread of a
converation..
....
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
 
T

Tor Iver Wilhelmsen

Daniel Pope said:
java.lang.ClassNotFoundException: Circles

This means your class isn't where you say it is in the APPLET element
you didn't post.
 
S

Silvio Bierman

Daniel Pope said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top