Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2005

Tip: Looking for answers? Try searching our database.

Applet no longer works in IE

Thread view: 
Mark - 15 Nov 2005 20:18 GMT
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.
Andrew Thompson - 15 Nov 2005 21:20 GMT
> 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.
Mark - 15 Nov 2005 21:35 GMT
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.

>> The applet I'm testing is here:
>> http://www.smorf.nl/smorfde/frames360.html
[quoted text clipped - 6 lines]
>
>Fix that and I'll help.
Andrew Thompson - 15 Nov 2005 22:10 GMT
> 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.
Mark - 15 Nov 2005 22:19 GMT
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.



>> 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?
[quoted text clipped - 34 lines]
>MSVM, you are in luck.  There is one hiding
>right on your file system.
Andrew Thompson - 15 Nov 2005 22:59 GMT
> 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.
Mark - 15 Nov 2005 22:12 GMT
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.

>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?
[quoted text clipped - 42 lines]
>>
>>Fix that and I'll help.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.