Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

A Simple Applet Problem

Options
  • 16-03-2004 4:25pm
    #1
    Registered Users Posts: 658 ✭✭✭


    Hey, if anybody can help with the below problem i'd be very grateful as i've tried everything and I still cant seem to fix it although I know the problem is only a small one of annoying propetries!!

    Th problem is as follows.......

    I created a java swing applet.
    I then viewed it using appletviewer in the java dev. kit and it worked fine
    When i tried to view it using both mozilla and iexplore I received 'class DefNot found
    Exception' and a 'class not found exception'.

    I made sure that the class paths were correct in my html file but ,to no avail, I still got the same errors.




    If you could help pretty soon it would be great as i'm on a deadline for this monday coming. Cheers


Comments

  • Registered Users Posts: 68,317 ✭✭✭✭seamus


    IIRC, you're doing one of two things:- Including a main() method in your class, or using an instance of a custom class, and not including your sourcecode in the correct directory relative to the applet.

    I could be wrong though.

    Post up the full error message.


  • Registered Users Posts: 658 ✭✭✭Chunks


    the error shown in the java console is as follows....

    the image is attached thanks for all your help


  • Registered Users Posts: 658 ✭✭✭Chunks


    I just had a thought........if the applet code works in applet viewer in theory it should work in a web browser such as mozilla or iexplore. Am i right?

    But,

    Could there be something wrong in my code which restricts the web page from opening it? Although this is not consistent with the error im getting as shown in the link from my previous post. There is no System commands or database commands in my code(yet). At the moment the applet is just a shell.

    Like I said, just a thought


  • Registered Users Posts: 629 ✭✭✭str8_away


    This might be a silly question but have you set "codebase" in you applet tag on your HTML page?


  • Registered Users Posts: 658 ✭✭✭Chunks


    yeah, course.......here's my code from my html file. All necessary data is kept in the same folder.

    <applet code=ProjApp.class name=Manager archive=applet.jar codebase="/"
    width=300 height=300>
    <param name="bgcolor" value="ffffff">
    <param name="fontcolor" value="000000">
    Your browser is not Java enabled.
    </applet>


  • Advertisement
  • Registered Users Posts: 658 ✭✭✭Chunks


    still cant fix the bleedin problem!!!!!


  • Registered Users Posts: 6,240 ✭✭✭hussey


    It could be a plug-in problem??

    http://java.sun.com/products/jfc/tsc/articles/applets/

    I know I had to patch my IE - dunno if modzilla is the same


Advertisement