Link to home
Start Free TrialLog in
Avatar of ocean9
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.
Avatar of rrz
rrz
Flag of United States of America image

I think you should get the Java plug-in.
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.
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><BODY>
<!--"CONVERTED_APPLET"-->
<!-- CONVERTER VERSION 1.0 -->

<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"

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;version=1.1">

<COMMENT>

<EMBED type="application/x-java-applet;version=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>
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
ASKER CERTIFIED SOLUTION
Avatar of TimYates
TimYates
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of yongsing
yongsing

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.
Avatar of ocean9

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.
Avatar of ocean9

ASKER

Thanks all.