Hello, I have a little problem with applets. My Internet explorer (version 5.50) browser doesn't display my applets. Athought the appletviewer command does. I've tried everything I can think of and it's still not working. I even went as far as using tested examples from textbooks. Here's an example I used from 'The Java 2 certification study guide' . It's the first example on chapter 12 ( Painting) with which I tried solving this problem.
Here's the html code I used:
I went as fat as modifying the applet by creating an init() for it and calling the paint method therein. It only this time didn't show a blank page like it had been doing, it showed an empty gray area. Here's the modified version.
Is the html in the same directory with the .class file. If not then you can provide a codebase parameter to tell the brower where to look for the code. PS: IE is "probably" only using jdk1.1.8 unless you have a Java Plug-in installed, or your options say to look at an installed jre. In IE look in Tools/Internet Options and in the list look for Java(Sun) and MicroSoft VM and see what jvm is selected. If you are using a plug-in with the browser your html need to have an OBJECT tag instead of the applet tag.
"JavaRanch, where the deer and the Certified play" - David O'Meara
Joined: Jul 05, 2002
Many thanks Cindy & Bosun, I got it to work only after uninstalling and reinstalling the JRE and then going to the the Internet Explorer options and clubbering it thoroughly. It still does make me feel a little uneasy though about Java in General. If I write applets for use on the internet, would all those who want to view my webpage have to go through this ordeal? Well, if they would haev to, then of course they'd move on to do other things and ignore my webpage. Femi.
Joined: Sep 29, 2000
Which - of course - is MicroSofts diabolical plan to reduce the usage of Java in favor of .NET . Of course most PCs are sold with pre-installed software. And most vendors are informed enough to know to set the IE settings to enable java. Most of them these days actually include the plug-in or a higher version of Java than MicroSoft would like. However - if a person can not use YOUR web-page because of browser problems, then he will not be able to use ANY web page that has Java on it. Sooner or later he will get tired of the errors and try to get the issue fixed.
Joined: Sep 29, 2000
Received this in my mail:
Thanks for the answer you gave to the question I asked on with the title "My browser doesn't display my applets". However, I have a question that's really bugging me. Quoting you, you stated " PS: IE is "probably" only using jdk1.1.8 unless you have a Java Plug-in installed, or your options say to look at an installed jre.". Why would IE explorer use JDK1.1.8? Do you know?
The reason that IE does not ship a higher version of Java with them goes like this (short version): Sun wrote Java and released it for free with the caveat that no one could meddle with it or revise it and then make a profit from it. MicroSoft did it ANYWAY. Sun sued MicroSoft. MicroSoft lost. Big Time. As a result MicroSoft is not allowed to touch anything related to Java for 5 years (starting from about 1 1/2 years ago). That would be the reason that MicroSoft is so gung ho on getting C# (a java "clone") and .NET out on the market. That is the closest that they are allowed to come to Java, and they NEED to keep up with internet technologies. They seriously talked about not even providing a slot for the user to use a plug-in to get SUN's version of Java, but so far they have restrained. I expect that they are not quite ready for a revolt from the general public.