Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

loading an applet failes

1 view
Skip to first unread message

marcw...@hotmail.com

unread,
Dec 9, 2005, 8:14:31 AM12/9/05
to
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.

Andrew Thompson

unread,
Dec 9, 2005, 8:19:50 AM12/9/05
to
marcw...@hotmail.com wrote:

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

...

The URL being?

--
Andrew Thompson
physci, javasaver, 1point1c, lensescapes - athompson.info/andrew

Andrew Thompson

unread,
Dec 9, 2005, 8:28:04 AM12/9/05
to
marcw...@hotmail.com wrote:

> 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?
<http://javaboutique.internet.com/AwtCalc/>

> 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?

marcw...@hotmail.com

unread,
Dec 9, 2005, 8:30:17 AM12/9/05
to
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. ??

marcw...@hotmail.com

unread,
Dec 9, 2005, 8:33:55 AM12/9/05
to
> Do they work for you?

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

Andrew Thompson

unread,
Dec 9, 2005, 8:37:54 AM12/9/05
to
marcw...@hotmail.com wrote:

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

isamura

unread,
Dec 9, 2005, 10:21:06 AM12/9/05
to
<marcw...@hotmail.com> wrote ...
: 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


Roedy Green

unread,
Dec 9, 2005, 12:05:16 PM12/9/05
to
On 9 Dec 2005 05:14:31 -0800, marcw...@hotmail.com wrote, quoted or
indirectly quoted someone who said :

>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.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Roedy Green

unread,
Dec 9, 2005, 12:10:20 PM12/9/05
to
On Fri, 9 Dec 2005 10:21:06 -0500, "isamura" <nos...@rogers.com>

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.

isamura

unread,
Dec 9, 2005, 1:19:11 PM12/9/05
to
"Roedy Green" wrote ...
: On Fri, 9 Dec 2005 10:21:06 -0500, "isamura" <nos...@rogers.com>

: 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


0 new messages