Results 1 to 8 of 8
Thread: What's wrong with my applet?
- 11-20-2012, 11:28 PM #1
Member
- Join Date
- Nov 2012
- Posts
- 3
- Rep Power
- 0
What's wrong with my applet?
Hi guys,
I have an applet stored on a free web hosting website. The problem is, when you try to load it, it pauses for like 30 seconds before the the applet starts. I am not sure what is is doing during that period, it doesn't seem to be running any java code based on the java console output or downloading any applet files since the pause happens after the java download splash sceen.
Any one would like to help me debug this weird behavior please take a look at my applet at [Moderator edit: link removed]
Thanks in advance.
Pan
P.S I just hosted the same applet on my local machine ( [Moderator edit: link removed] ) , and it doesn't have the pause at all.Last edited by DarrylBurke; 11-21-2012 at 04:28 AM. Reason: Removed links
- 11-21-2012, 04:29 AM #2
Re: What's wrong with my applet?
Please go through the Forum Rules -- particularly the third paragraph.
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 11-21-2012, 05:04 AM #3
Member
- Join Date
- Nov 2012
- Posts
- 3
- Rep Power
- 0
Re: What's wrong with my applet?
I wasn't trying to put an advertisement here. It's just an easier way to show others the issue i was talking about.
- 11-21-2012, 07:55 AM #4
Re: What's wrong with my applet?
Seeing the issue without any knowledge of the code doesn't facilitate understanding the possible cause. To get better help sooner, post a SSCCE (Short, Self Contained, Correct (Compilable), Example) that demonstrates the problem.
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 11-21-2012, 11:44 PM #5
Member
- Join Date
- Nov 2012
- Posts
- 3
- Rep Power
- 0
Re: What's wrong with my applet?
My applet uses 2 files, a jar file (2.2MB) which contains all the class files and some resource files; a simple html file which tells the browser to load the jar file. The 2 files were uploaded to the same folder on the website server.
The problem is when I run the applet by visiting the html file on the website server, the applet didn't start until around 30 seconds after the java applet loading screen. No error message in the java console,
I am sure during that 30 seconds:
1. it's not running any java code. Because I included a print statement in the first line of init() method, and I didn't see any printout message on the console during that period.
2. It's not downloading the jar file, because the pause was after the java applet loading screen.
my html file contains the following:
Any suggestion on this weird behavior is much appreciated!XML Code:<html> <body> <center> <applet code=main.class codebase="." archive="church.jar" width="640" height="480" > </applet> </center> </body> </html>
Last edited by phu004; 11-22-2012 at 12:22 AM.
- 12-02-2012, 03:21 PM #6
Re: What's wrong with my applet?
If a jar contains several classes you should have a manifest.txt file inside the jar with the line
Main-Class: ClassNameWithEntryPoint
and the name of the class (without extension .class) that should be used as entry point. I suppose you couldn't see you print statements because the init() was never started. If you start the applet inside the browser and inside the applet you invoke System.out.println() the output is send to the java.Console. To see the java console go to Internet Options -> Advanced -> Section Java and then check the Show Java Console. Close the browser and restart it again. You can also start your applet locally with:
appletviewer yourhtml.html
In this case the output is send to your os-console.
About your performace problem I can't tell you nothing, bacause the problem could be the network or the server or something else.
- 12-02-2012, 05:35 PM #7
- 12-04-2012, 12:16 PM #8
Re: What's wrong with my applet?
Similar Threads
-
I can't find anything wrong with this but somehow it's wrong.
By Biscuit Tickler in forum New To JavaReplies: 2Last Post: 09-12-2012, 09:28 PM -
What's wrong with this Applet?
By lsaffre in forum New To JavaReplies: 4Last Post: 09-16-2011, 05:55 AM -
Beginner. What's wrong in my applet declaration?
By rforte in forum New To JavaReplies: 4Last Post: 04-16-2010, 11:01 AM -
What's wrong with this applet?
By Arnold in forum New To JavaReplies: 9Last Post: 11-22-2009, 05:21 PM -
Wrong output (well.. the one who's wrong is probably me ;) )
By shacht1 in forum New To JavaReplies: 2Last Post: 11-22-2009, 03:48 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks