Image loading problem on internet Explorer
Hello EveryBody
I am doing an java game.My starting class is a class that extends JApplet.Then I am calling a class that extends JFrame.Then i am calling a class which extends a canvas.In the constructor of my canvas class i call a method loadImage(),which loads all the images used in my game.My game is working fine in appletViewer.but it is not working in internet Explorer.When I commennted the method loadImage() inside consructor of canvas class ,then my game is working on internet Explorer.I think there is some problem in loading the images.I am using .png images,which has a size of 87.2KB only which is very little as compared to an PC game.plz help me
Regards
Srikant
[705 byte] By [
srikanta] at [2007-10-2 14:21:49]

internet explorer by default uses the MSVM (microsoft's version of the Sun VM). This VM only runs Java 1.1 code. You can check if this is the problem by using this 1.1-compliant applet below:
import java.applet.*;
import java.awt.*;
public class Test extends Applet {
public void init() {
setLayout(new FlowLayout(FlowLayout.CENTER));
add(new Label(System.getProperty("java.version")));
}
}
compile that code with these parameters:
javac -target 1.1 Test.java
use this HTML:
<applet code="Test" width="400" height="400"></applet>
when you run the applet in Internet Explorer, if you see anything about "Java 1.1" or something similiar, then the problem is that IE is using the MSVM instead of the Sun VM.
You may want to also run this applet in [url=http://getfirefox.com]Mozilla Firefox[/url], because Firefox uses the correct JRE that is installed on the system. If the applet running in Firefox does NOT say 1.1 (e.g 1.4, 1.5, etc), then you have the correct JRE. In this case, go to Internet Explorer -> Tools -> Internet Options -> Advanced. Scroll down this list until you see the checkmark that says "Use JRE x.x.x for <applet> tag (requires restart)." Ensure this box is checked.
If that box is already checked, or if the applet in Firefox also says "1.1," then you probably don't have the latest JRE installed. See http://java.com/ to grab the latest JRE.