loading an applet failes

M

marcwentink

Would anybody have a tip why I would get this error calling an applet
from a website:

******************************************************************************************************
Java Plug-in 1.5.0
Using JRE version 1.5.0-beta2 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\m.wentink
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
p: reload proxy configuration
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------
load: class AwtCalcApplet.class not found.
java.lang.ClassNotFoundException: AwtCalcApplet.class
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed.
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 10 more

***********************************************************************************************

I seems I got to little privileged calling the applet since I see this

java.security.AccessController.doPrivileged(Native Method)

Also when I open a html file with my explorer which also calls the same
applet, in the same directory even, it works ok.
 
A

Andrew Thompson

Would anybody have a tip why I would get this error calling an applet
from a website:

Possibly because the page is broken(?).
load: class AwtCalcApplet.class not found.

Do you mean like as shown here?
Also when I open a html file with my explorer

Internet Explorer?
..which also calls the same
applet, in the same directory even, it works ok.

I just tested the applet shown in the above URL using
Mozilla 1.7.2 running Java 1.5 and IE 6.0026 running
both Java 1.5 and the MSVM and it works fine (performs
calculations, though I did not cross check the results)
in all three.

Do they work for you?
 
M

marcwentink

The Url being a directory where the program did not have enough rights
:)

Moving the jar file to another directory works, a dir where there where
more jar files even, so I could have known that.

But I still do not understand why then calling the htm file directly
from my browser did work. ??
 
M

marcwentink

Do they work for you?

Sure, the applet worked perfectly calling them directly by opening a
page with the browser directly.
 
A

Andrew Thompson

But I still do not understand why then calling the htm file directly
from my browser did work. ??

'Browser'?

Internet Explorer is not a browser, it is an Operating
System component. (Possibly one of the few statements
made by MS staff under oath, that is factual.)

That being the case, it does not pay to spend too much
time wonderring about the bizarre possibilities offered
by IE.
 
I

isamura

: Would anybody have a tip why I would get this error calling an applet
: from a website:
:
:
****************************************************************************************************
**
: Java Plug-in 1.5.0
: Using JRE version 1.5.0-beta2 Java HotSpot(TM) Client VM
: User home directory = C:\Documents and Settings\m.wentink
: ----------------------------------------------------
<snip>
: ----------------------------------------------------
: load: class AwtCalcApplet.class not found.
: java.lang.ClassNotFoundException: AwtCalcApplet.class
: at sun.applet.AppletClassLoader.findClass(Unknown Source)
: at java.lang.ClassLoader.loadClass(Unknown Source)
: at sun.applet.AppletClassLoader.loadClass(Unknown Source)
: at java.lang.ClassLoader.loadClass(Unknown Source)
: at sun.applet.AppletClassLoader.loadCode(Unknown Source)
: at sun.applet.AppletPanel.createApplet(Unknown Source)
: at sun.plugin.AppletViewer.createApplet(Unknown Source)
: at sun.applet.AppletPanel.runLoader(Unknown Source)
: at sun.applet.AppletPanel.run(Unknown Source)
: at java.lang.Thread.run(Unknown Source)
: Caused by: java.io.IOException: open HTTP connection failed.
: at sun.applet.AppletClassLoader.getBytes(Unknown Source)
: at sun.applet.AppletClassLoader.access$100(Unknown Source)
: at sun.applet.AppletClassLoader$1.run(Unknown Source)
: at java.security.AccessController.doPrivileged(Native Method)
: ... 10 more
:
: ***********************************************************************************************
:
: I seems I got to little privileged calling the applet since I see this
:
: java.security.AccessController.doPrivileged(Native Method)
:
: Also when I open a html file with my explorer which also calls the same
: applet, in the same directory even, it works ok.
:
It could be the case the class is not being found. I have noticed there is a difference between
1.4.2 and 1.5.0 wrt how the applet name is specified.

CODE="package.AwtCalcApplet.class" works in 1.4.2 until I upgrade to 1.5.0
CODE="package.AwtCalcApplet" works in 1.5.0

I wonder if browsers with 1.4.2 will have same problem without the .class ext.

HTH,

..k
 
R

Roedy Green

Would anybody have a tip why I would get this error calling an applet
from a website:

one way would be saying no to privilege and the app then talks to a
server other than mom.
 
R

Roedy Green

CODE="package.AwtCalcApplet.class" works in 1.4.2 until I upgrade to 1.5.0
CODE="package.AwtCalcApplet" works in 1.5.0

I have .class everywhere on my site following the convention on Sun's
site. All works fine with both 1.4.2 and 1.5.0. Granted all my classes
are in jars. I suggest you do likewise.
 
I

isamura

"Roedy Green" wrote ...
: On Fri, 9 Dec 2005 10:21:06 -0500, "isamura" <[email protected]>
: wrote, quoted or indirectly quoted someone who said :
:
: >CODE="package.AwtCalcApplet.class" works in 1.4.2 until I upgrade to 1.5.0
: >CODE="package.AwtCalcApplet" works in 1.5.0
:
: I have .class everywhere on my site following the convention on Sun's
: site. All works fine with both 1.4.2 and 1.5.0. Granted all my classes
: are in jars. I suggest you do likewise.
:
I will keep that in mind. Though, the inconsistencies do little to help the situation.

..k
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top