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

Problem with 1.3 appletviewer

0 views
Skip to first unread message

Bob Florian

unread,
Oct 7, 1999, 3:00:00 AM10/7/99
to
I seem to be having a problem running HTML files with jdk1.3 that run ok
in jdk1.2.2!

Here is the html file:
------

<html>

<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
<title></title>
</head>

<body>

<h1>-Alarm Screen- </h1>

<p><applet code="Alarms.AlarmSelect.class"
codebase="E:/java/myclasses/" align="baseline" width="300"
height="100"></applet></p>
</body>
</html>

------
It works just fine under 1.2.2 but with 1.3 I get:

------
java.lang.ClassNotFoundException: java.io.FileNotFoundException:
E:\java\myclasses\Alarms\Alarms\AlarmSelect\class.class (The system cannot
find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:68)
at
sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:7
3)
at
sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection
.java:137)
at sun.applet.AppletClassLoader.getBytes(AppletClassLoader.java:228)
at sun.applet.AppletClassLoader.access$100(AppletClassLoader.java:45)
at sun.applet.AppletClassLoader$1.run(AppletClassLoader.java:141)
at java.security.AccessController.doPrivileged(Native Method)
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:138)
at java.lang.ClassLoader.loadClass(ClassLoader.java:291)
at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:112)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:377)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:566)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:502)
at sun.applet.AppletPanel.run(AppletPanel.java:280)
at java.lang.Thread.run(Thread.java:479)
------
What created this path
(E:\java\myclasses\Alarms\Alarms\AlarmSelect\class.class) to look for the
file????

Thanks
Bob

Fermilab
flo...@fnal.gov


Laird Nelson

unread,
Oct 7, 1999, 3:00:00 AM10/7/99
to
Bob Florian wrote:
>
> I seem to be having a problem running HTML files with jdk1.3 that run ok
> in jdk1.2.2!

Are you sure they run OK unmodified in 1.2.2?

> Here is the html file:

> <html>
[snip]
> <body>
[snip]


> <p><applet code="Alarms.AlarmSelect.class"
> codebase="E:/java/myclasses/" align="baseline" width="300"
> height="100"></applet></p>

[snip]


> It works just fine under 1.2.2

You're sure?

> but with 1.3 I get:

[truly monstrous stack trace snipped to size]

> java.lang.ClassNotFoundException: java.io.FileNotFoundException:
> E:\java\myclasses\Alarms\Alarms\AlarmSelect\class.class (The system cannot
> find the path specified)

> What created this path


> (E:\java\myclasses\Alarms\Alarms\AlarmSelect\class.class) to look for the
> file????

You did. Well, ClassLoader.getResource() did, but you specified in your
<APPLET> tag that you wanted the class corresponding to the name
"Alarms.AlarmSelect.class" to be loaded. You put a filename in those
quotes; the appletviewer was looking for a *class name*, which is
different. You should have (I'm guessing) said

<applet code="Alarms.AlarmSelect" codebase="E:/java/myclasses/">

...instead.

I don't see how you could have gotten your example to run under 1.2.2
unless (a) appletviewer under 1.2.2 is broken or (b) you actually added
the ".class" suffix after you tried this under 1.2.2.

Cheers,
Laird

0 new messages