Results 1 to 17 of 17
  1. #1
    goku4eternity is offline Member
    Join Date
    Dec 2010
    Posts
    12
    Rep Power
    0

    Default My Java Applet doesn't work on this website. Please help

    I'm trying to get a Java Applet to work on the website jbeannie14.comxa.com/index/ but the Java Applet doesn't work and I don't know why.
    Attached Files Attached Files

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,308
    Rep Power
    25

    Default Re: My Java Applet doesn't work on this website. Please help

    Are there any error messages in the browser's Java Console? Copy the console's contents and pasted it here.
    If you don't understand my response, don't ignore it, ask a question.

  3. #3
    goku4eternity is offline Member
    Join Date
    Dec 2010
    Posts
    12
    Rep Power
    0

    Default Re: My Java Applet doesn't work on this website. Please help

    The error message is IcedTea-Web Plugin version: 1.4 (1.4-3ubuntu2.1)
    Sat Mar 29 13:07:40 PDT 2014
    java.lang.NullPointerException
    at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel .java:116)
    at sun.applet.AppletPanel.run(AppletPanel.java:380)
    at java.lang.Thread.run(Thread.java:744)

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,308
    Rep Power
    25

    Default Re: My Java Applet doesn't work on this website. Please help

    java.lang.NullPointerException
    at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel .java:116)
    There is a null value being used in the code at line 116.
    If you don't understand my response, don't ignore it, ask a question.

  5. #5
    goku4eternity is offline Member
    Join Date
    Dec 2010
    Posts
    12
    Rep Power
    0

    Default Re: My Java Applet doesn't work on this website. Please help

    I don't know where line 116 is because I don't have 116 lines of code. This is my code.

    /*
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    */
    package test1;

    import java.awt.*;
    import javax.swing.*;

    /**
    *
    * @author jbeannie14
    */
    public class CamillaBelle extends JApplet {

    /**
    * Initialization method that will be called after the applet is loaded
    * into the browser.
    */
    @Override
    public void paint(Graphics g) {
    super.paint(g);
    g.drawString("I Love Camilla Belle ❤️", 25, 25);
    }
    // TODO overwrite start(), stop() and destroy() methods
    }

    I don't know where the error is. And I don't know what a null value. What is a null value?

  6. #6
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,308
    Rep Power
    25

    Default Re: My Java Applet doesn't work on this website. Please help

    https://www.google.com/#q=java+null+value

    How are you executing the applet? Can you describe all the programs and files and servers that you are using?
    If you don't understand my response, don't ignore it, ask a question.

  7. #7
    goku4eternity is offline Member
    Join Date
    Dec 2010
    Posts
    12
    Rep Power
    0

    Default Re: My Java Applet doesn't work on this website. Please help

    I was trying to get the Applet to work on this website. http://jbeannie14.comxa.com/index/ I looked up Null Values on the google search engine. And I still don't know what a Null Value is.

  8. #8
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,308
    Rep Power
    25

    Default Re: My Java Applet doesn't work on this website. Please help

    Is there an html page that you have used on your PC to test the applet?

    Having an applet on a site doesn't make it execute. To execute an applet there must be a browser used to load an html page from a site or local disk file.

    I'm asking:
    what browser are you using?
    What is in the html page that the browser loads?

    Please post here the html page that the browser loads and that contains the applet tag.
    If you don't understand my response, don't ignore it, ask a question.

  9. #9
    goku4eternity is offline Member
    Join Date
    Dec 2010
    Posts
    12
    Rep Power
    0

    Default Re: My Java Applet doesn't work on this website. Please help

    This is are the files of the website I'm trying to run an applet on
    Attached Files Attached Files

  10. #10
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,308
    Rep Power
    25

    Default Re: My Java Applet doesn't work on this website. Please help

    I am unable to open the jar file with several different utility programs.

    Also the classname in the code you posted: public class CamillaBelle extends JApplet

    does not match the name in the html: ><applet code="BrandonsBalls" archive="index_files/CamillaBelle.jar"

    Why is that?
    Last edited by Norm; 03-31-2014 at 12:56 PM.
    If you don't understand my response, don't ignore it, ask a question.

  11. #11
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,877
    Rep Power
    5

    Default Re: My Java Applet doesn't work on this website. Please help

    Works just fine with 7zip for me.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  12. #12
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,308
    Rep Power
    25

    Default Re: My Java Applet doesn't work on this website. Please help

    I get this:
    Attached Thumbnails Attached Thumbnails My Java Applet doesn't work on this website. Please help-7zip_screen.png  
    If you don't understand my response, don't ignore it, ask a question.

  13. #13
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,877
    Rep Power
    5

    Default Re: My Java Applet doesn't work on this website. Please help

    Ah yes, if I try to actually extract the jar file somewhere, crashy crashy with the most beautiful error ever: an attempt was made to move the file pointer before the beginning of the file.

    Translated: the file is utterly broken.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  14. #14
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,308
    Rep Power
    25

    Default Re: My Java Applet doesn't work on this website. Please help

    Yes, there seems to be a problem with the jar file.

    Then there is the question of the mismatch between the classnames. See post#10.

    Recommended solution: start over.
    If you don't understand my response, don't ignore it, ask a question.

  15. #15
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,877
    Rep Power
    5

    Default Re: My Java Applet doesn't work on this website. Please help

    Start over, and start from scratch and not by trying to get something plucked from some site to work.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  16. #16
    goku4eternity is offline Member
    Join Date
    Dec 2010
    Posts
    12
    Rep Power
    0

    Default Re: My Java Applet doesn't work on this website. Please help

    I got an application error that says ClassFormatError Incompatible magic value 1008813135 in class file CamillaBelle

  17. #17
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,949
    Rep Power
    19

    Default Re: My Java Applet doesn't work on this website. Please help

    Your file is corrupted somehow.
    That value is, coincidentally, the same as this chap's over at OTN last year.

    As baftos points out, that code implies it's trying to read an XML file instead of the proper class file.

    Did you write this application yourself, and jar it?
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. System call from within JAVA doesn't work.
    By Apotekarnes in forum New To Java
    Replies: 2
    Last Post: 10-17-2013, 04:49 AM
  2. Replies: 13
    Last Post: 10-04-2012, 07:45 PM
  3. Replies: 1
    Last Post: 04-06-2012, 07:39 PM
  4. Simple rectangle display applet doesn't work in browser
    By stainluss in forum Java Applets
    Replies: 7
    Last Post: 01-31-2012, 11:38 PM
  5. why doesn't this short applet work?
    By kim85 in forum New To Java
    Replies: 1
    Last Post: 01-20-2008, 08:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •