Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Applets and the fly likes Applet not loading Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Applet not loading" Watch "Applet not loading" New topic
Author

Applet not loading

Prashant Sehgal
Ranch Hand

Joined: Jun 20, 2003
Posts: 56
Hi,

I have a web application that contains an applet that talks to a bunch of servlets that in turn talk to some POJOs in the background. It's deployed on JBoss 4.0.4 and build using jdk 1.5.0_07.

When I deploy this on the server and try hitting it from different machines, it loads in some browsers but not in others. Some where it gives the error load: class MigrationApplet not found; at others it gives the error load:MigrationApplet notinited. I suspected that this could be due to the difference between the JVMs on the browsers and the one that I used to build the app. but was unpleasantly surprized when it started loading from some other terminals which had even more different browser JVMs.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41029
    
  43
What does the applet tag look like? What is the directory on the server where the applet resides? Are there any error messages in the Java Console?
[ October 16, 2007: Message edited by: Ulf Dittmer ]

Ping & DNS - my free Android networking tools app
Prashant Sehgal
Ranch Hand

Joined: Jun 20, 2003
Posts: 56
There are no exceptions in the java console. The applet is a singed applet that resides inside a war file and is accessible from a jsp within the same war file. The war file resides inside the deploy directory of Jboss. It's running fine on atleast 2 browsers and not on 3 others. So that (in a way) does rule out classpath or config related issues.

The applet tag looks like this:


[ October 16, 2007: Message edited by: Prashant Sehgal ]
[ October 16, 2007: Message edited by: Prashant Sehgal ]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41029
    
  43
So that (in a way) does rule out classpath or config related issues.

Not at all.



Use a path that's relative to the directory the applet JSP is in, and then it should work.
[ October 16, 2007: Message edited by: Ulf Dittmer ]
Prashant Sehgal
Ranch Hand

Joined: Jun 20, 2003
Posts: 56
Then how come it's showing on some browsers and not on others?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41029
    
  43
Originally posted by Prashant Sehgal:
Then how come it's showing on some browsers and not on others?

Does it still do that after you fixed it in the way I suggested?
Prashant Sehgal
Ranch Hand

Joined: Jun 20, 2003
Posts: 56
Yup . It still shows erratically on some browsers and not on others.
Bling Chen
Greenhorn

Joined: Oct 11, 2007
Posts: 6
If it's showing up erratically in some browsers and not others, then it might be a simple browser configuration issue. Your applet isn't starting probably due to the JRE not firing up. You'll probably see some what of a grey box or something.

To fix this, goto Control Panel -> Java -> Click on Advance Tab -> explode the <APPLET> tab support -> and check off the browser you want to by default fire up the JRE.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Applet not loading
 
Similar Threads
Problme Running Midi (.mid) files in Applet
JDK 1.3 vs JDK 1.2.2_007?
Debuggers for IE, Safari, Opera, etc....
JRE and JVM interview Question ....
Applet Sequence in Browser