Applet no longer works in IE

M

Mark

Hi all,

I've got this applet that works fine. Worked fine. The applet consist
of couple of classes, packed in a jar-file. Now recently I put all of
the classes, except the main class, in a separate package. And now the
applet no longer works in Internet Explorer with the Microsoft VM. I
get a ClassNotFoundException on the main class.
The applet works fine in Firefox, Opera, and in Intener Explorer with
the Sun VM.
The applet I'm testing is here:
http://www.smorf.nl/smorfde/frames360.html
I would appreciate your help.

thanks, Mark.
 
M

Mark

Sorry, yes I forgot. I don't like frames but how else can you prevent
having to reload the applet every time you load another page?
I have removed the redirection.
This is the HTML:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<HEAD>
<TITLE>Smorf applet 360x360</TITLE>
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<META http-equiv="Content-type" content="text/html;
charset=iso-8859-1" />
<meta http-equiv="imagetoolbar" content="no" />
<meta content="TRUE" name="MSSmartTagsPreventParsing" />
<link rel="stylesheet" type="text/css" href="styles.css" />
<script language="javascript">
if(self.location==top.location)self.location="frames360.html";
</script>
</HEAD>
<BODY>
<APPLET
code="SmorfApplet.class"
height=360 width=360
name="smorf"
archive="smorfob.jar, jazz3d3.jar, jazz3d3_primitives.jar"
</APPLET>
</BODY>
</HTML>

anyway I found out creating the package isn't the problem. I put all
the classes in a single package and jar file, the problem is still
there.

Mark.
 
A

Andrew Thompson

Mark said:
Sorry, yes I forgot. I don't like frames but how else can you prevent
having to reload the applet every time you load another page?
I have removed the redirection.
Cool.

This is the HTML: ....
<APPLET
code="SmorfApplet.class"
height=360 width=360
name="smorf"
archive="smorfob.jar, jazz3d3.jar, jazz3d3_primitives.jar"

Note that the archive separator is ',', as opposed to ', '.
There is no space needed, and while user agents (browsers)
might be smart enough to trim the space character, others may not.
Remove it for best reliability.

But...
</APPLET>
</BODY>
</HTML>

I strongly suspect the problem is that the class has
accidentally been compiled for a Java class version
greater than Java 1.1.

To compile code for an earlier release, you need
to specify the -target, probably the -source, and
ideally a -bootclasspath to a 1.1 JVM/JRE.
<http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/javac.html#crosscomp-options>

The trickiest bit is finding a 1.1 VM for the
bootclasspath, but if you have an IE with the
MSVM, you are in luck. There is one hiding
right on your file system.
 
M

Mark

Hi Andrew,

It seems that the source of my problem is the fact that I upgraded
from Eclipse 2.1.1. to 3.2.0. After testing with the latest working
version of my applet I found out that the compiler compliance setting
has to be 1.3 for the applet to work in IE. Default setting is 1.4.
:-|

thanks, Mark.
 
M

Mark

Hi Andrew,

Thank you! Compiling to an earlier version fixed my problem.
I never realized there could be a problem with spaces in the applet
archive parameter, I will fix that.

regards, Mark.
 
A

Andrew Thompson

Mark said:
Thank you!

You're welcome.
...Compiling to an earlier version fixed my problem.
I never realized there could be a problem with spaces in the applet
archive parameter,

I am not saying that ", " will break in any browser,
but OTOH - you can be sure that "," works.
...I will fix that.

Better safe than sorry.
 

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,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top