class not found

I

Ike

I'm stumped on a simple applet not loading for a client. This is an applet
that I - and everyone else it seems - is able to easily execute as it is
only a single class file, residing in the same server and directory as the
html page that contains it's simple applet tag:
<APPLET
code="MyApplet.class"
width="1" height="1"</APPLET>However, when this particular client goes to access the page with
this applet, in their java 1.5.x console, they get:

load: class MyApplet.class not found.
java.lang.ClassNotFoundException: MyApplet.class
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)

As I said, it runs for everyone, regardless of browser or platform. This
particular client had a firewall issue, where they have subsequently allowed
access to this site hosting this applet, so I don;t know if that is the
reason it wont run or not. I suspect it is a browser problem, as they are
using a recent version of MSIE. Anyone with any thoughts on what might be
the problem here, please post your thoughts. I'm stumped and really looking
for some input. Thanks, Ike
 
A

Andoni

Hi,

It would seem like you have written a test Applet for the purpose. If so can
you put this applet on the person's machine with a simple HTML file to bring
it up, this would remove the issue of the firewall and tell you if it is the
browser.

In the browser (I am sure you already have but ...) check:
Tools > Internet Options > Advanced
and find the setting for the JVMs. Make sure that the Microsoft one is
unticked and that the Sun one is ticked and then close and restart the
browser.

Failing all of that having any effect tell the person to get FireFox!! :)

Have a good one.

Andoni.
 
A

Andrew Thompson

I'm stumped on a simple applet ..

[1] URL?
..not loading for a client. This is an applet
that I - and everyone else it seems - is able to easily execute

Everyone, ..except us? See [1].
..as it is
only a single class file, residing in the same server and directory as the
html page that contains it's simple applet tag:
<APPLET
code="MyApplet.class"
width="1" height="1"
</APPLET>

I notice you are not setting the codebase, though it is hard
to say if that is relevant without the URL and code.
 
I

Ike

Andoni said:
Hi,

It would seem like you have written a test Applet for the purpose. If so can
you put this applet on the person's machine with a simple HTML file to bring
it up, this would remove the issue of the firewall and tell you if it is the
browser.

In the browser (I am sure you already have but ...) check:
Tools > Internet Options > Advanced
and find the setting for the JVMs. Make sure that the Microsoft one is
unticked and that the Sun one is ticked and then close and restart the
browser.

Failing all of that having any effect tell the person to get FireFox!! :)

Have a good one.

Andoni.

But they are getting the Java Console, so I assume the MS VM is not the one
invoking, that it is the SUN VM (1.5.x) I'm wondering if there is not
another setting in the MSIE browser which might preclude they're being able
to run an applet. Thanks, Ike
 
A

Andrew Thompson

In the browser (I am sure you already have but ...) check:
Tools > Internet Options > Advanced
and find the setting for the JVMs.

..Make sure that the Microsoft one is
unticked and that the Sun one is ticked and then close and restart the
browser.

That should not be necessary*, but is good advice when chasing
problems such as this. * IE 6.00.26/28 can 'hot swap' between
the MSVM & Sun VM (1.4.2 & 1.5.0) with nothing more than a..
<http://www.physci.org/kbd.jsp?key=f5> (page refresh).

BTW - what does the client see here, in the 'red box'?
<http://www.physci.org/pc/property.jsp?prop=java.version+java.vendor>

[ oh the technology.. ;) ]
 
R

Roland

I'm stumped on a simple applet not loading for a client. This is an applet
that I - and everyone else it seems - is able to easily execute as it is
only a single class file, residing in the same server and directory as the
html page that contains it's simple applet tag:
<APPLET
code="MyApplet.class"
width="1" height="1"

</APPLET>However, when this particular client goes to access the page with
this applet, in their java 1.5.x console, they get:

load: class MyApplet.class not found.
java.lang.ClassNotFoundException: MyApplet.class
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)

As I said, it runs for everyone, regardless of browser or platform. This
particular client had a firewall issue, where they have subsequently allowed
access to this site hosting this applet, so I don;t know if that is the
reason it wont run or not. I suspect it is a browser problem, as they are
using a recent version of MSIE. Anyone with any thoughts on what might be
the problem here, please post your thoughts. I'm stumped and really looking
for some input. Thanks, Ike
Can your client run any other applet (e.g. Sun's test applet
<http://java.com/en/download/help/testvm.xml>).

Which 1.5 release is your client using. There was a bug in the 1.5.0_01
and _02 releases: if the URL of the applet contains a special character
[a char that gets URL-encoded to the form %xx, like a tilde '~' (%7E) or
a space ' ' (%20)], the applet fails to load.
<http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6227551>
So, if the URL of your applet page contains a special character and if
your client has a _01 or _02 release of Java 1.5, he/she should upgrade
to the latest 1.5 release (1.5.0_04 at this moment).

To track down the problem, your client could open the Java console and
increase the trace level by pressing 5 in the console. Then he/she
should clear the class loader cache (pressing x in the console) and
reload the page with your applet. The console will show which URL's the
Java plugin actually tries to access for loading your applet.
--
Regards,

Roland de Ruiter
` ___ ___
`/__/ w_/ /__/
/ \ /_/ / \
 

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,777
Messages
2,569,604
Members
45,218
Latest member
JolieDenha

Latest Threads

Top