class not found within IE  
Author Message
taati





PostPosted: 2003-12-17 20:11:00 Top

java-programmer, class not found within IE Hi,

I've written an applet. It properly works with Mozila. But with
Internet Explorer it says "Class [the applet's name] not found" or
something.
What is the problem? How can I fix it?

Thank you,
Siamak
 
Alex Hunsley





PostPosted: 2003-12-17 20:29:00 Top

java-programmer >> class not found within IE Siamak wrote:
> Hi,
>
> I've written an applet. It properly works with Mozila. But with
> Internet Explorer it says "Class [the applet's name] not found" or
> something.
> What is the problem? How can I fix it?
>
> Thank you,
> Siamak

We're not telepathic. You need to give us more info, e.g. what the
applet referincnig code in the web page says etc.

 
Mark Haase





PostPosted: 2003-12-17 23:10:00 Top

java-programmer >> class not found within IE In article <email***@***.com>,
Alex Hunsley <email***@***.com> wrote:

> Siamak wrote:
> > Hi,
> >
> > I've written an applet. It properly works with Mozila. But with
> > Internet Explorer it says "Class [the applet's name] not found" or
> > something.
> > What is the problem? How can I fix it?
> >
> > Thank you,
> > Siamak
>
> We're not telepathic. You need to give us more info, e.g. what the
> applet referincnig code in the web page says etc.
>

Generally when IE does that, what is *actually* happening is that the
JVM is throwing a ClassFormatException. IE just doesn't have the
courtesy to tell you that.

What is ClassFormatException? Usually it means your class was compiled
for a higher version of the JVM than the browser is using. In fact, IE
is still using a very old version of the JVM by default. You'll need to
download the plugin and install it, if you have admin privileges on the
machine in question. If you don't, you're up the river without a paddle.

thanks microsoft!

--
|\/| /| |2 |<
mehaase(at)sas(dot)upenn(dot)edu
 
 
Alex Hunsley





PostPosted: 2003-12-18 0:20:00 Top

java-programmer >> class not found within IE Mark Haase wrote:

> In article <email***@***.com>,
> Alex Hunsley <email***@***.com> wrote:
>
>
>>Siamak wrote:
>>
>>>Hi,
>>>
>>>I've written an applet. It properly works with Mozila. But with
>>>Internet Explorer it says "Class [the applet's name] not found" or
>>>something.
>>>What is the problem? How can I fix it?
>>>
>>>Thank you,
>>>Siamak
>>
>>We're not telepathic. You need to give us more info, e.g. what the
>>applet referincnig code in the web page says etc.
>>
>
>
> Generally when IE does that, what is *actually* happening is that the
> JVM is throwing a ClassFormatException. IE just doesn't have the
> courtesy to tell you that.
>
> What is ClassFormatException? Usually it means your class was compiled
> for a higher version of the JVM than the browser is using. In fact, IE
> is still using a very old version of the JVM by default. You'll need to
> download the plugin and install it, if you have admin privileges on the
> machine in question. If you don't, you're up the river without a paddle.
>
> thanks microsoft!

Aha, I didn't know about that one!
Interesting info, thanks.
alex

 
 
taati





PostPosted: 2003-12-18 3:12:00 Top

java-programmer >> class not found within IE Alex Hunsley wrote:
> We're not telepathic. You need to give us more info, e.g. what the
> applet referincnig code in the web page says etc.

:-D
OK!

In the html file I have something like this:
<applet code="DNARender.class" codebase="class" width="400"
height="400"
name="theRender" id="theRender">
Sorry! You must have a Java enabled browser to see this item.
</applet><br>

The class files are in \class\ directory.
I use the newest version of "jikes" as compiler.

Any other information would probably be the details of my program
which I guess would not be of your interest.

Thanks,
Siamak
 
 
taati





PostPosted: 2003-12-18 3:20:00 Top

java-programmer >> class not found within IE Mark Haase wrote:
> Generally when IE does that, what is *actually* happening is that the
> JVM is throwing a ClassFormatException. IE just doesn't have the
> courtesy to tell you that.
>
> What is ClassFormatException? Usually it means your class was compiled
> for a higher version of the JVM than the browser is using. In fact, IE
> is still using a very old version of the JVM by default. You'll need to
> download the plugin and install it, if you have admin privileges on the
> machine in question. If you don't, you're up the river without a paddle.


Does it mean that many other people may not see my applet unless they
install the newer version of the JVM?!! What should I do then? Is
there a way to force the compiler to generate older version byte
codes?


Thank you,
Siamak
 
 
Mark Haase





PostPosted: 2003-12-18 14:24:00 Top

java-programmer >> class not found within IE In article <email***@***.com>,
email***@***.com (Siamak) wrote:

> Does it mean that many other people may not see my applet unless they
> install the newer version of the JVM?!! What should I do then? Is
> there a way to force the compiler to generate older version byte
> codes?
>
>
> Thank you,
> Siamak

I did a quick check ("man javac"). There appears to be a "target"
parameter to the javac application (see below).

I presume that this means if you do

% cd /<ProjectDirectory>

% javac -target 1.1 *.java

This would compile your project in a manner compatible with IE. I
haven't tried this myself, however. If you do this and it works out for
you, please let us know, as I may try doing this in my own project.

=================
from: man javac 1

-target version
Generates class files that will work on VMs with the specified
version. The default is to generate class files to be compati-
ble with both 1.1 and 1.2 VMs. The versions supported by javac
in JDK1.2 are:

1.1 Ensures that generated class files will be compatible
with 1.1 and 1.2 VMs.

1.2 Generates class files that will run on 1.2 VMs, but will
not run on 1.1 VMs. This is the default.

1.3 Generates class files that run on 1.3 and later VMs, but
will not run on 1.1 VMs.

=================

Cheers,

--
|\/| /| |2 |<
mehaase(at)sas(dot)upenn(dot)edu
 
 
taati





PostPosted: 2003-12-18 18:39:00 Top

java-programmer >> class not found within IE Mark Haase wrote:
> % javac -target 1.1 *.java
>
> This would compile your project in a manner compatible with IE. I
> haven't tried this myself, however. If you do this and it works out for
> you, please let us know, as I may try doing this in my own project.

Dear Mark,

Thank you for your help.

Actually I use "jikes" (IBM open-source Java compiler). It has the
same option though. But it doesn't make any better. I compiled my
project with "-target 1.1" option, and I received the same error as
before: "class DNARender.class not found"

Best,
 
 
aminadav





PostPosted: 2004-12-14 23:43:00 Top

java-programmer >> class not found within IE I had the same problem with my applets..

I test you code:

javac -target 1.1 FourCalculator.java

and It's worked succesfuly for me!
Thank you very match, for you, and for google team.