ocean9
asked on
applet not running in IE 6.0
I am getting back to developing in Java.
I have a couple of applets that ran fine (in brower IE 6.0).
However, when I recompiled them (with no code changes) with
the new j2sdk1.4.1 they're no longer working. All I get is
a blank grey area on the browser when trying to view. When
I run the applets in appletviewer they work fine. What do I
need to do to have it work in the browser? Thanks.
I have a couple of applets that ran fine (in brower IE 6.0).
However, when I recompiled them (with no code changes) with
the new j2sdk1.4.1 they're no longer working. All I get is
a blank grey area on the browser when trying to view. When
I run the applets in appletviewer they work fine. What do I
need to do to have it work in the browser? Thanks.
If you are using Swing applets, you might need to use new html files..
Something like that should always use the pluggin, and ask for install if not awailable:
<!DOCTYPE HTML><HTML><HEAD></HEAD><B ODY>
<!--"CONVERTED_APPLET"-->
<!-- CONVERTER VERSION 1.0 -->
<OBJECT classid="clsid:8AD9C840-04 4E-11D1-B3 E9-00805F4 99D93"
WIDTH = 600 HEIGHT = 200 codebase="http://java.sun.com/products/plugin/1.1.1/jinstall-111-win32.cab#Version=1,1,1,0">
<PARAM NAME = CODE VALUE = "is.hi.anton.Bensin.class" >
<PARAM NAME = CODEBASE VALUE = "." >
<PARAM NAME="type" VALUE="application/x-java- applet;ver sion=1.1">
<COMMENT>
<EMBED type="application/x-java-a pplet;vers ion=1.1" java_CODE = "is.hi.anton.Bensin.class" java_CODEBASE = "." WIDTH = 600 HEIGHT = 200 pluginspage="http://java.sun.com/products/plugin/1.1.1/plugin-install.html"><NOEMBED></ COMMENT>
</NOEMBED></EMBED>
</OBJECT>
<!--
<APPLET CODE = "is.hi.anton.Bensin.class" CODEBASE = "." WIDTH = 600 HEIGHT = 200 >
</APPLET>
-->
<!--"END_CONVERTED_APPLET" -->
</BODY></HTML>
Something like that should always use the pluggin, and ask for install if not awailable:
<!DOCTYPE HTML><HTML><HEAD></HEAD><B
<!--"CONVERTED_APPLET"-->
<!-- CONVERTER VERSION 1.0 -->
<OBJECT classid="clsid:8AD9C840-04
WIDTH = 600 HEIGHT = 200 codebase="http://java.sun.com/products/plugin/1.1.1/jinstall-111-win32.cab#Version=1,1,1,0">
<PARAM NAME = CODE VALUE = "is.hi.anton.Bensin.class"
<PARAM NAME = CODEBASE VALUE = "." >
<PARAM NAME="type" VALUE="application/x-java-
<COMMENT>
<EMBED type="application/x-java-a
</NOEMBED></EMBED>
</OBJECT>
<!--
<APPLET CODE = "is.hi.anton.Bensin.class"
</APPLET>
-->
<!--"END_CONVERTED_APPLET"
</BODY></HTML>
NO, NO, NO!
Sorry, but this got updated at JDK1.3, ytou don't need that anymore...
The problem is that the Microsoft VM doesn't run anything over 1.3
You'll have to download the JRE
Sorry, but this got updated at JDK1.3, ytou don't need that anymore...
The problem is that the Microsoft VM doesn't run anything over 1.3
You'll have to download the JRE
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you compile the applet in 1.4, you won't be able to run it in the browser which has a VM of 1.1. In order to run it in the browser, you need to recompile your applet with the -target tag:
javac -target 1.1 YourApplet.java
However, if you are using Swing, then you would need the plug-in, as suggested by the others.
javac -target 1.1 YourApplet.java
However, if you are using Swing, then you would need the plug-in, as suggested by the others.
ASKER
All I needed to do was check the IE option in the Browser tab of the Plug-In (read this on Sun's website).
Since TimYates' link got me to the area where I found this info, I will give the points to him.
Thanks for all the feedback.
Since TimYates' link got me to the area where I found this info, I will give the points to him.
Thanks for all the feedback.
ASKER
Thanks all.
In fact in IE 6 , I check the box in Internet Options (Advanced tab) to "use Java2 for <applet> tag "
Thus always using the plug-in.