Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Applet no longer works in IE

Reply
Thread Tools

Applet no longer works in IE

 
 
Mark
Guest
Posts: n/a
 
      11-15-2005
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.

 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      11-15-2005
Mark wrote:

> The applet I'm testing is here:
> http://www.smorf.nl/smorfde/frames360.html


That's a frames based page, and when I try to get
the applet itself*, I get directed back to the frames
page.

* I need to see the HTML source.

Fix that and I'll help.
 
Reply With Quote
 
 
 
 
Mark
Guest
Posts: n/a
 
      11-15-2005
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="fram es360.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.

On Tue, 15 Nov 2005 21:20:49 GMT, Andrew Thompson
<> wrote:

>Mark wrote:
>
>> The applet I'm testing is here:
>> http://www.smorf.nl/smorfde/frames360.html

>
>That's a frames based page, and when I try to get
>the applet itself*, I get directed back to the frames
>page.
>
>* I need to see the HTML source.
>
>Fix that and I'll help.


 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      11-15-2005
Mark wrote:

> 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.
 
Reply With Quote
 
Mark
Guest
Posts: n/a
 
      11-15-2005
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.


On Tue, 15 Nov 2005 22:35:10 +0100, Mark <> wrote:

>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="fram es360.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.
>
>On Tue, 15 Nov 2005 21:20:49 GMT, Andrew Thompson
><> wrote:
>
>>Mark wrote:
>>
>>> The applet I'm testing is here:
>>> http://www.smorf.nl/smorfde/frames360.html

>>
>>That's a frames based page, and when I try to get
>>the applet itself*, I get directed back to the frames
>>page.
>>
>>* I need to see the HTML source.
>>
>>Fix that and I'll help.


 
Reply With Quote
 
Mark
Guest
Posts: n/a
 
      11-15-2005
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.






On Tue, 15 Nov 2005 22:10:03 GMT, Andrew Thompson
<> wrote:

>Mark wrote:
>
>> 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.


 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      11-15-2005
Mark wrote:

> 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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
When I turn on my PC, it works, works, works. Problem! Fogar Computer Information 1 01-17-2006 12:57 AM
Visual Studio 2003 ASP.NET debug no longer works after XP SP upgra =?Utf-8?B?QnJ5YW4gWk0=?= ASP .Net 1 05-26-2005 05:37 PM
Programs taking longer and longer to start up. Help please. Goforit Computer Information 9 07-25-2004 06:34 AM
Deleted .resx files, VS.NET no longer works Cory Nelson ASP .Net 2 04-15-2004 12:11 AM
After rebooting my PC works, works, works! Antivirus problem? Adriano Computer Information 1 12-15-2003 05:30 AM



Advertisments