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 8 of 8

Thread: applet fail

  1. #1
    Member wolfgar's Avatar
    Join Date
    Oct 2009
    Location
    the middle of the woods
    Posts
    89
    Thanks
    3
    Thanked 1 Time in 1 Post

    Default applet fail

    i decided to test a applet i made in fire fox,
    it worked fine b4 in the eclipse applet test thing
    but as soon as i set up the html file and ran it , it
    decided to throw errors at me ><

    what does this even mean?
    java.lang.NullPointerException
    at sun.plugin2.applet.Plugin2Manager.findAppletJDKLev el(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager.createApplet(Unk nown Source)
    at sun.plugin2.applet.Plugin2Manager$AppletExecutionR unnable.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Exception: java.lang.NullPointerException
    heres the html i made , encase thats the problem
    <html>
    <head>
    <title>Test Applet</title>
    </head>
    <body>
    <APPLET code="main\UI" archive="test.jar" width="500" height="400">
    you need to have java installed to use this applet  
    </APPLET>
    </body>
    </html>
    Programming: the art that fights back


  2. #2
    Member wolfgar's Avatar
    Join Date
    Oct 2009
    Location
    the middle of the woods
    Posts
    89
    Thanks
    3
    Thanked 1 Time in 1 Post

    Default Re: applet fail

    i have been searching and found no info that fixes this yet ><
    the closest was when i got a thing that said i needed to sign the app
    it gave info on how to self sign it but that still didnt help any .

    does any 1 know what could be wrong
    ( will upload a jar soon that works in the applet viewer but not in the browser, also will contain the source )
    Programming: the art that fights back

  3. #3
    Super Moderator Json's Avatar
    Join Date
    Jul 2009
    Location
    Warrington, United Kingdom
    Posts
    1,274
    My Mood
    Happy
    Thanks
    70
    Thanked 156 Times in 152 Posts

    Default Re: applet fail

    Do you not have to specify the .class ending in the applet tag?

    <html>
    <head>
    <title>Test Applet</title>
    </head>
    <body>
    <APPLET code="main\UI.class" archive="test.jar" width="500" height="400">
    you need to have java installed to use this applet  
    </APPLET>
    </body>
    </html>

    // Json

  4. #4
    Member wolfgar's Avatar
    Join Date
    Oct 2009
    Location
    the middle of the woods
    Posts
    89
    Thanks
    3
    Thanked 1 Time in 1 Post

    Default Re: applet fail

    idk if i need it or not , cause i've tried this 1 with and w/o the .class ( same results though )

    <applet code="main.UI.class" archive="test.jar" width="500" height="300">
    you need to have java installed to use this applet  
    </APPLET>
    Last edited by wolfgar; January 20th, 2010 at 09:03 AM.
    Programming: the art that fights back

  5. #5
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,896
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default Re: applet fail

    Make sure that you have the correct Java plugin installed (probably is), and also make sure that the jar file is in the same directory as your html file.

    You could also try removing the main\ from the code parameter:
    HTML Code:
    <applet code="UI.class" archive="test.jar" width="500" height="300">
    you need to have java installed to use this applet  
    </APPLET>

  6. #6
    Member wolfgar's Avatar
    Join Date
    Oct 2009
    Location
    the middle of the woods
    Posts
    89
    Thanks
    3
    Thanked 1 Time in 1 Post

    Default Re: applet fail

    its in the same directory ( just sitting next to each other on my desktop)
    and i should have the plugins , cause i've ran other applets b4
    the dust game for example
    Programming: the art that fights back

  7. #7
    Super Moderator Json's Avatar
    Join Date
    Jul 2009
    Location
    Warrington, United Kingdom
    Posts
    1,274
    My Mood
    Happy
    Thanks
    70
    Thanked 156 Times in 152 Posts

    Default Re: applet fail


  8. #8
    Member wolfgar's Avatar
    Join Date
    Oct 2009
    Location
    the middle of the woods
    Posts
    89
    Thanks
    3
    Thanked 1 Time in 1 Post

    Default Re: applet fail

    i just tried the java control panel thing and my next gen plugin is checked ><

    i also looked through the rest of the page but that didnt help either ><

    i just uploaded it so it would be easier for ppl to help .

    applet location
    Last edited by wolfgar; January 21st, 2010 at 08:11 AM.
    Programming: the art that fights back

Similar Threads

  1. [SOLVED] applet vs. gui app
    By rptech in forum AWT / Java Swing
    Replies: 3
    Last Post: August 27th, 2009, 10:13 AM
  2. applet and JPS problem.... please help me
    By rockster14 in forum Java Applets
    Replies: 0
    Last Post: August 7th, 2009, 04:59 PM
  3. Add Jmol applet dynimically in JSF(java server faces)
    By megha in forum JavaServer Pages: JSP & JSTL
    Replies: 0
    Last Post: May 15th, 2009, 07:16 AM
  4. Problem of implementing mathematic logic in Java applet
    By AnithaBabu1 in forum Java Applets
    Replies: 0
    Last Post: August 16th, 2008, 12:42 AM