class not found

Discussion in 'Java' started by Ike, Jul 21, 2005.

  1. Ike

    Ike Guest

    I'm stumped on a simple applet not loading for a client. This is an applet
    that I - and everyone else it seems - is able to easily execute as it is
    only a single class file, residing in the same server and directory as the
    html page that contains it's simple applet tag:
    <APPLET
    code="MyApplet.class"
    width="1" height="1"
    >

    </APPLET>However, when this particular client goes to access the page with
    this applet, in their java 1.5.x console, they get:

    load: class MyApplet.class not found.
    java.lang.ClassNotFoundException: MyApplet.class
    at sun.applet.AppletClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)

    As I said, it runs for everyone, regardless of browser or platform. This
    particular client had a firewall issue, where they have subsequently allowed
    access to this site hosting this applet, so I don;t know if that is the
    reason it wont run or not. I suspect it is a browser problem, as they are
    using a recent version of MSIE. Anyone with any thoughts on what might be
    the problem here, please post your thoughts. I'm stumped and really looking
    for some input. Thanks, Ike
     
    Ike, Jul 21, 2005
    #1
    1. Advertising

  2. Ike

    Andoni Guest

    Hi,

    It would seem like you have written a test Applet for the purpose. If so can
    you put this applet on the person's machine with a simple HTML file to bring
    it up, this would remove the issue of the firewall and tell you if it is the
    browser.

    In the browser (I am sure you already have but ...) check:
    Tools > Internet Options > Advanced
    and find the setting for the JVMs. Make sure that the Microsoft one is
    unticked and that the Sun one is ticked and then close and restart the
    browser.

    Failing all of that having any effect tell the person to get FireFox!! :)

    Have a good one.

    Andoni.


    "Ike" <> wrote in message
    news:yCKDe.1623$...
    > I'm stumped on a simple applet not loading for a client. This is an applet
    > that I - and everyone else it seems - is able to easily execute as it is
    > only a single class file, residing in the same server and directory as the
    > html page that contains it's simple applet tag:
    > <APPLET
    > code="MyApplet.class"
    > width="1" height="1"
    > >

    > </APPLET>However, when this particular client goes to access the page with
    > this applet, in their java 1.5.x console, they get:
    >
    > load: class MyApplet.class not found.
    > java.lang.ClassNotFoundException: MyApplet.class
    > at sun.applet.AppletClassLoader.findClass(Unknown Source)
    > at java.lang.ClassLoader.loadClass(Unknown Source)
    >
    > As I said, it runs for everyone, regardless of browser or platform. This
    > particular client had a firewall issue, where they have subsequently

    allowed
    > access to this site hosting this applet, so I don;t know if that is the
    > reason it wont run or not. I suspect it is a browser problem, as they are
    > using a recent version of MSIE. Anyone with any thoughts on what might be
    > the problem here, please post your thoughts. I'm stumped and really

    looking
    > for some input. Thanks, Ike
    >
    >
     
    Andoni, Jul 21, 2005
    #2
    1. Advertising

  3. On Thu, 21 Jul 2005 10:17:02 GMT, Ike wrote:

    > I'm stumped on a simple applet ..


    [1] URL?

    > ..not loading for a client. This is an applet
    > that I - and everyone else it seems - is able to easily execute


    Everyone, ..except us? See [1].

    >..as it is
    > only a single class file, residing in the same server and directory as the
    > html page that contains it's simple applet tag:
    > <APPLET
    > code="MyApplet.class"
    > width="1" height="1"
    >>

    > </APPLET>


    I notice you are not setting the codebase, though it is hard
    to say if that is relevant without the URL and code.

    --
    Andrew Thompson
    physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
    Transmitido en Martian en SAP
     
    Andrew Thompson, Jul 21, 2005
    #3
  4. Ike

    Ike Guest

    "Andoni" <> wrote in message
    news:pYKDe.2740$...
    > Hi,
    >
    > It would seem like you have written a test Applet for the purpose. If so

    can
    > you put this applet on the person's machine with a simple HTML file to

    bring
    > it up, this would remove the issue of the firewall and tell you if it is

    the
    > browser.
    >
    > In the browser (I am sure you already have but ...) check:
    > Tools > Internet Options > Advanced
    > and find the setting for the JVMs. Make sure that the Microsoft one is
    > unticked and that the Sun one is ticked and then close and restart the
    > browser.
    >
    > Failing all of that having any effect tell the person to get FireFox!!

    :)
    >
    > Have a good one.
    >
    > Andoni.


    But they are getting the Java Console, so I assume the MS VM is not the one
    invoking, that it is the SUN VM (1.5.x) I'm wondering if there is not
    another setting in the MSIE browser which might preclude they're being able
    to run an applet. Thanks, Ike
     
    Ike, Jul 21, 2005
    #4
  5. On Thu, 21 Jul 2005 11:41:31 +0100, Andoni wrote:

    > In the browser (I am sure you already have but ...) check:
    > Tools > Internet Options > Advanced
    > and find the setting for the JVMs.


    <http://www.physci.org/jvmclean.jsp?pt=deselect>

    >..Make sure that the Microsoft one is
    > unticked and that the Sun one is ticked and then close and restart the
    > browser.


    That should not be necessary*, but is good advice when chasing
    problems such as this. * IE 6.00.26/28 can 'hot swap' between
    the MSVM & Sun VM (1.4.2 & 1.5.0) with nothing more than a..
    <http://www.physci.org/kbd.jsp?key=f5> (page refresh).

    BTW - what does the client see here, in the 'red box'?
    <http://www.physci.org/pc/property.jsp?prop=java.version+java.vendor>

    [ oh the technology.. ;) ]

    --
    Andrew Thompson
    physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
    Transmitido en Martian en SAP
     
    Andrew Thompson, Jul 21, 2005
    #5
  6. Ike

    Roland Guest

    On 21-7-2005 12:17, Ike wrote:

    > I'm stumped on a simple applet not loading for a client. This is an applet
    > that I - and everyone else it seems - is able to easily execute as it is
    > only a single class file, residing in the same server and directory as the
    > html page that contains it's simple applet tag:
    > <APPLET
    > code="MyApplet.class"
    > width="1" height="1"
    >
    > </APPLET>However, when this particular client goes to access the page with
    > this applet, in their java 1.5.x console, they get:
    >
    > load: class MyApplet.class not found.
    > java.lang.ClassNotFoundException: MyApplet.class
    > at sun.applet.AppletClassLoader.findClass(Unknown Source)
    > at java.lang.ClassLoader.loadClass(Unknown Source)
    >
    > As I said, it runs for everyone, regardless of browser or platform. This
    > particular client had a firewall issue, where they have subsequently allowed
    > access to this site hosting this applet, so I don;t know if that is the
    > reason it wont run or not. I suspect it is a browser problem, as they are
    > using a recent version of MSIE. Anyone with any thoughts on what might be
    > the problem here, please post your thoughts. I'm stumped and really looking
    > for some input. Thanks, Ike
    >
    >

    Can your client run any other applet (e.g. Sun's test applet
    <http://java.com/en/download/help/testvm.xml>).

    Which 1.5 release is your client using. There was a bug in the 1.5.0_01
    and _02 releases: if the URL of the applet contains a special character
    [a char that gets URL-encoded to the form %xx, like a tilde '~' (%7E) or
    a space ' ' (%20)], the applet fails to load.
    <http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6227551>
    So, if the URL of your applet page contains a special character and if
    your client has a _01 or _02 release of Java 1.5, he/she should upgrade
    to the latest 1.5 release (1.5.0_04 at this moment).

    To track down the problem, your client could open the Java console and
    increase the trace level by pressing 5 in the console. Then he/she
    should clear the class loader cache (pressing x in the console) and
    reload the page with your applet. The console will show which URL's the
    Java plugin actually tries to access for loading your applet.
    --
    Regards,

    Roland de Ruiter
    ` ___ ___
    `/__/ w_/ /__/
    / \ /_/ / \
     
    Roland, Jul 21, 2005
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. William Parker
    Replies:
    1
    Views:
    3,095
    Martin
    Jun 27, 2004
  2. E11
    Replies:
    1
    Views:
    4,788
    Thomas Weidenfeller
    Oct 12, 2005
  3. Replies:
    3
    Views:
    551
  4. Trent Mick
    Replies:
    0
    Views:
    478
    Trent Mick
    Apr 3, 2008
  5. Jacob Davis
    Replies:
    0
    Views:
    502
    Jacob Davis
    Apr 15, 2008
Loading...

Share This Page