Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 17 of 17

Thread: no errors on japplet but it doesnt work!!!!

  1. #1
    Member
    Join Date
    Mar 2013
    Posts
    67
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default no errors on japplet but it doesnt work!!!!

    I created a japplet in java and put it on website. there are no errors in eclipse and it works fine.

    on web it say "Error - click for details". when i click on it, it says 'ExceptionInInitializerError' but no details.

    does the error has to do with the code below?


    public void run()
    	{
    		while(!player_class.isDEAD()) 		                
                  {
    		    ....	
    			repaint();
    			try
    			{
    				Thread.sleep(10);
    			}
    			catch(InterruptedException e)
    			{
    				e.printStackTrace();
    			}	
    		}/*** end of while loop ***/
    	}/*** end of run method ***/


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: no errors on japplet but it doesnt work!!!!

    Is there an error message in the browser's java console?
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Member
    Join Date
    Mar 2013
    Posts
    67
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default Re: no errors on japplet but it doesnt work!!!!

    yes

  4. #4
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: no errors on japplet but it doesnt work!!!!

    Quote Originally Posted by game06 View Post
    yes
    .....can you tell us what it is?
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  5. The Following User Says Thank You to KevinWorkman For This Useful Post:

    Norm (April 30th, 2013)

  6. #5
    Member
    Join Date
    Mar 2013
    Posts
    67
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default Re: no errors on japplet but it doesnt work!!!!

    on web it say "Error - click for details". when i click on it, it says 'ExceptionInInitializerError' but no details.

    i am not sure but the problem might be that i am using 3 static variables top of main class.
    private static final long serialVersionUID = 1L;
    public static final int WINDOW_WIDTH = 900;
    	public static final int WINDOW_HEIGHT = 400;

    and i am using these in different class by 'Main.WINDOW_WIDTH'. do you think this is the problem in japplet?

  7. #6
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: no errors on japplet but it doesnt work!!!!

    Copy the contents of the browser's java console window and pasted it here.
    If you don't understand my answer, don't ignore it, ask a question.

  8. #7
    Member
    Join Date
    Mar 2013
    Posts
    67
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default Re: no errors on japplet but it doesnt work!!!!

    a window pop's up and title of this window is 'application error'.

    in window it says:
    'ExceptionInInitalizerError:
    there was an error while execting the application. click details for more information.
    if you click on it you get a different window saying:
    Java Plug-in 10.21.2.11
    Using JRE version 1.7.0_21-b11 Java HotSpot(TM) Client VM
    User home directory = C:\Users\dave
    ----------------------------------------------------
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    o: trigger logging
    q: hide console
    r: reload policy configuration
    s: dump system and deployment properties
    t: dump thread list
    v: dump thread stack
    x: clear classloader cache
    0-5: set trace level to <n>
    ----------------------------------------------------
    thats it there is no other information on this error.

  9. #8
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: no errors on japplet but it doesnt work!!!!

    There aren't any error messages in the java console.

    What happens when you use the AppletViewer program to execute the applet?
    If you don't understand my answer, don't ignore it, ask a question.

  10. #9
    Member
    Join Date
    Mar 2013
    Posts
    67
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default Re: no errors on japplet but it doesnt work!!!!

    whats appletViewer program? do you mean eclipse? bc there are no error in eclipse.

  11. #10
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: no errors on japplet but it doesnt work!!!!

    The AppletViewer program comes with the JDK.
    If you don't understand my answer, don't ignore it, ask a question.

  12. #11
    Member
    Join Date
    Mar 2013
    Posts
    67
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default Re: no errors on japplet but it doesnt work!!!!

    you mean on appletviewer on web page???

  13. #12
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: no errors on japplet but it doesnt work!!!!

    Use the AppletViewer program with an html disk file.
    If you don't understand my answer, don't ignore it, ask a question.

  14. #13
    Member
    Join Date
    Mar 2013
    Posts
    67
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default Re: no errors on japplet but it doesnt work!!!!

    yeah that is when you run applet on web. which said in post number 7.

  15. #14
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: no errors on japplet but it doesnt work!!!!

    what happens when you use the AppletViewer program?
    If you don't understand my answer, don't ignore it, ask a question.

  16. #15
    Member
    Join Date
    Mar 2013
    Posts
    67
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default Re: no errors on japplet but it doesnt work!!!!

    read my thread plz.

    "Error - click for details". when i click on it, it says 'ExceptionInInitializerError' but no details.

  17. #16
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: no errors on japplet but it doesnt work!!!!

    Is that the error you get when using the AppletViewer program with an html file that is on the local PC? Nothing to do with the internet. Everything is on the local PC.
    If you don't understand my answer, don't ignore it, ask a question.

  18. #17
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: no errors on japplet but it doesnt work!!!!

    Quote Originally Posted by game06 View Post
    read my thread plz.
    He has read your thread, and he's been incredibly patient with you seemingly ignoring his questions, so I would suggest taking a more appreciative tone.

    You've posted an error, but no details. That ExceptionInInitializerError is usually caused by something else, which the AppletViewer will give you. You haven't posted an SSCCE or answered any of the questions you've been asked, so I'm not sure what you expect other people to do for you.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. Why doesnt my constructor work?
    By hairLess in forum What's Wrong With My Code?
    Replies: 13
    Last Post: July 25th, 2012, 11:38 AM
  2. [SOLVED] (Beginner) Program doesnt work
    By moneyman021 in forum What's Wrong With My Code?
    Replies: 10
    Last Post: January 15th, 2012, 04:28 AM
  3. HI, could someone please tell me why my code doesnt work?
    By joelmeler in forum What's Wrong With My Code?
    Replies: 1
    Last Post: August 3rd, 2011, 01:37 AM
  4. My program doesnt want to do its math point my errors out please
    By Redlight in forum What's Wrong With My Code?
    Replies: 3
    Last Post: October 31st, 2010, 01:56 PM
  5. my menu doesnt work can u tell me whats wrong
    By claymore in forum What's Wrong With My Code?
    Replies: 1
    Last Post: February 8th, 2010, 04:16 AM