Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Java Plug-In to run applets

Status
Not open for further replies.

pmrankine

Programmer
Jul 18, 2001
71
0
0
GB
Hi,
this is a very basic question but..
I'm following instructions in a tutorial at but am unable to view applets (boxes appear grey with red cross, IE bar indicates "Loading Java Applet failed"). I have downloaded and installed the latest
version of Java (SDK 1.4.1) and all options in Internet Options --> Advanced have been selected (and PC restarted).

Can anyone provide some insight?

Thanks,
pmrankine
 
could b a codebase attribute problem in the <applet> tag but that's a wild guess.

-pete
 
Hi, some ideas:

try it with different applets. if there is a run time error i.e. a coding error then the applet will often just not load . try just a hello world applet.

1 as an afterthought. open the java console (click the coffee cup in yr system tray) and see if there is any debug which might help.

2. make sure the height and width tags in the html are set ok

3. is there a package statement in the applet source? if yr applet says package com.stuff.MyApplet and your html file says code=&quot;MyApplet&quot; then this will fail. You have to change it to code=&quot;com.stuff.MyApplet&quot;.

4. if the applet .class file is in a .jar, you must have an archive=&quot;jarname.jar&quot; tag in yr html.

hope this helps,
john
 
Thanks for your responses. I haven't written any applets, I was just working through a tutorial on the web and one of the first things it said was:
&quot; To test whether your browser can run applets, go to HelloSwingApplet.html &quot;
When I go to this page, the applet does not run (appears as a grey box with a red cross) and the bar at the bottom of the browser says: &quot;Applet HelloSwingApplet notinited&quot;
A few other pages (on other sites) I have looked at have the same results. I wasn't sure if I hadn't installed Java correctly?

pmrankine
 
Hi again,
can anyone help with this. I uninstalled Java SDK and the applets on the web work - does anyone have any tips for installing?

Cheers,
pmrankine
 
HI


i think u dont have Java VM in ur system j2sdk will give applet viewer but to run through browser u need java VM,
go check it at internet explorer (browser)
Tools->internet options and see the advanced tab if u have java cup icon there then there is some other problem if not download java VM from
now run any applet in browser it will work


hope this might help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top