Applets in IE

D

Danny Antonetti

I have an applet written using Sun Java 1.4.2 and it works if a person
has a version of sun java installed.

My problem is that if a browser without Sun Java tries to use my
software the applet is not loaded (there is just a grey screen).

I have been looking and cant seem to find how to get my applet to work
with IE. I was not sure if there was some IE setting, or if I need to
compile the applet in some different way.


In case it matters I need the applet to work with Win 2k, and would like
it to work with any other browsers.

I have been looking around a lot and cant seem to find out how to do this.


Thanks,


Danny
 
A

Andrew Thompson

Chris Smith said:
....
If you use the HTMLConverter application that's distributed by Sun, the
user will be prompted to download the Sun Java 2 Runtime Environment if
they don't already have it.

That has pitfalls too. The more cross-platform
forms of it use kludgy 'browser-sniffing' JavaScript
(one of the first rules of good JS is to avoid
browser-sniffing) to write the correct <EMBED
or <OBJECT tag.

I would recommend that as a _final resort_, but you
could use my %100 java solution and may never
have to get to relying on JS (which can be disabled).
See.. http://physci.org/test/JRE/
 
R

Roedy Green

I have been looking and cant seem to find how to get my applet to work
with IE.

to do that you must restrict yourself to version 1.1.4 Java. If you
use any more recent classes or compile with a JDK 1.4 compiler, the
old IE JVM will throw up its hands.

See http://mindprod.com/jgloss/ie.html

This is the third time today I have answered this question.
 
M

Mark Preston

I have an applet written using Sun Java 1.4.2 and it works if a person
has a version of sun java installed.

My problem is that if a browser without Sun Java tries to use my
software the applet is not loaded (there is just a grey screen).

I have been looking and cant seem to find how to get my applet to work
with IE. I was not sure if there was some IE setting, or if I need to
compile the applet in some different way.
Let's get a couple of those misconceptions out of the way first, shall
we. Then we can look at the actual problem.

1. Your applet _does_ "work with IE", because IE allows itself to use
programmes _outside_ IE to manage some types of work. So it is not IE
that is the problem, it is the programmes that IE is working with.

2. The settings for IE may indeed be associated with the outside
programmes, but since it is those outsiders that are the problem, you
should look to them _before_ you look to fiddling with IE itself.

3. Compiling the applet will in no way change what the outsider
programmes do - it will change your applet. If your applet works, then
your best bet is to deal with getting the outsider programmes to work
properly since then you know that all the applets you compile - and
however you compile them - will work.
In case it matters I need the applet to work with Win 2k, and would like
it to work with any other browsers.
Neither Win2K nor - to the best of my knowledge - any of the major
browsers will work with applets. Applets REQUIRE an outsider programme
to make them work - the Java Virtual Machine (JVM) that you got from
Sun and tested your applets on.

It is the JVM, and not any specific hardware OR software that "works
with applets". That is, remember, the core objective of the entire
Java project right from the very start - to use a VIRTUAL machine that
will allow Java complete implementation independence.
I have been looking around a lot and cant seem to find out how to do this.
Now - the problem itself.

As I have described above, the actual problem is the JVM. Forget any
worries about Win2K, other browsers or IE - the problem is only,
entirely and completely with the JVM.

Microsoft - for reasons best known to themselves - decided to corrupt
Java, basically to try and "kidnap" the development, and to make it
part of the Redmond Monster. They were taken to court over it and
lost. One of the court rulings was that they had to stop doing the bad
things they had been doing.

As a result, Microsoft could not develop their version of the JVM
beyond the 1.1.4 version of Java. Their choice was (and is) quite
simple and they could either:-

1. Ignore the court and carry on - dangerous and costly.
2. Keep an outdated and incompatible version of Java.
3. Apologise and replace the Microsoft version of Java with a real one
4. Stop trying to get a Microsoft version and use Sun or IBM Java.

Obviously, about the worst option they could choose is the second one,
since it will cause massive problems for users. It also happens to be
the one they DID choose - and that is your problem.

As long as users have the old, corrupted, incompatible version of
Microsoft's awful JVM then there will be problems. Your users - each
and every one of them - will need to replace that old and silly JVM
with a proper one. It is a moderate download, but of no other trouble
at all. Once it is done, your applet will work.
 
T

Tim Tyler

: If you're actually asking for your 1.4.2 applet to run using the built-
: in VM in IE, the only possible answer is "not bloody likely". IE can
: run some applets written to the 1.1 Java API, but nothing more recent.
: If you were to write to the 1.1 API, you'd also need to compile with the
: "-target 1.1" switch to generate compatible class files, and avoid APIs
: that Microsoft didn't care to implement.

The MS JVM ignores the class file version number - and there are no
actual changes to the bytecode format that might cause problems.

Netscape 4.x checks it, though - and totally rejects any code it doesn't
recognise. As a result large numbers of applets no longer work on it.
 

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,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top