Results 1 to 13 of 13
  1. #1
    sarwar1234 is offline Member
    Join Date
    Sep 2010
    Posts
    56
    Rep Power
    0

    Default Java Applet Runtime error

    Hello,

    I am using Windows Vista Home edition Service Pack 2.....

    I am getting a problem while java applets are being loaded into the browser....

    For example, if I go to the site
    Getting Started With Applets (The Java™ Tutorials > Deployment > Applets)

    I dont get the applet view... instead i get an error window.... and when i click the details, I get another window... As shown in the attached figure-1.....

    I get similar problem while trying to runn a java applet program... or any jar file... I get a window as shown in figure-2....

    I have the latest jdk-6 update-20 installed......
    I am trying to get around this problem since last 3 or 4 days but not getting some where...

    I will be very thankful for your cooperations....

    Best Regards,
    Sarwar
    Attached Thumbnails Attached Thumbnails Java Applet Runtime error-figure-1.jpg   Java Applet Runtime error-figure-2.jpg  

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

    Default

    Please post the contents of the html file you are using. Also show what other files are in the directory with the html file.

    In the html file, remove the .class from the APPLET's code= attribute

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

    Default

    That picture is completely unreadable.

  4. #4
    sarwar1234 is offline Member
    Join Date
    Sep 2010
    Posts
    56
    Rep Power
    0

    Default

    Hello

    Thanks very much for the reply....
    Attached Thumbnails Attached Thumbnails Java Applet Runtime error-image1.jpg  

  5. #5
    sarwar1234 is offline Member
    Join Date
    Sep 2010
    Posts
    56
    Rep Power
    0

    Default

    Hello This what I get as an error in the window.......


    Java Plug-in 1.6.0_20
    Using JRE version 1.6.0_20-b02 Java HotSpot(TM) Client VM
    User home directory = C:\Users\Logic Energy
    ----------------------------------------------------
    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>
    ----------------------------------------------------


    load: class HelloWorld.class not found.
    java.lang.ClassNotFoundException: HelloWorld.class
    at sun.plugin2.applet.Applet2ClassLoader.findClass(Un known Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unk nown 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.ClassNotFoundException: HelloWorld.class




    Many Thanks for the help.....

    Best Regards,
    Sarwar

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

    Default

    See Norm's post.
    Your Applet tag might well be wrong.

  7. #7
    sarwar1234 is offline Member
    Join Date
    Sep 2010
    Posts
    56
    Rep Power
    0

    Default

    Hello,

    Alternatively, the error can also be seen in this way... when I try to open a very simple class file or java file to run.....

    I get the following error in a window:



    Windows ® Installer. V 4.5.6002.18005

    msiexec /Option <Required Parameter> [Optional Parameter]

    Install Options
    </package | /i> <Product.msi>
    Installs or configures a product
    /a <Product.msi>
    Administrative install - Installs a product on the network
    /j<u|m> <Product.msi> [/t <Transform List>] [/g <Language ID>]
    Advertises a product - m to all users, u to current user
    </uninstall | /x> <Product.msi | ProductCode>
    Uninstalls the product
    Display Options
    /quiet
    Quiet mode, no user interaction
    /passive
    Unattended mode - progress bar only
    /q[n|b|r|f]
    Sets user interface level
    n - No UI
    b - Basic UI
    r - Reduced UI
    f - Full UI (default)
    /help
    Help information
    Restart Options
    /norestart
    Do not restart after the installation is complete
    /promptrestart
    Prompts the user for restart if necessary
    /forcerestart
    Always restart the computer after installation
    Logging Options
    /l[i|w|e|a|r|u|c|m|o|p|v|x|+|!|*] <LogFile>
    i - Status messages
    w - Nonfatal warnings
    e - All error messages
    a - Start up of actions
    r - Action-specific records
    u - User requests
    c - Initial UI parameters
    m - Out-of-memory or fatal exit information
    o - Out-of-disk-space messages
    p - Terminal properties
    v - Verbose output
    x - Extra debugging information
    + - Append to existing log file
    ! - Flush each line to the log
    * - Log all information, except for v and x options
    /log <LogFile>
    Equivalent of /l* <LogFile>
    Update Options
    /update <Update1.msp>[;Update2.msp]
    Applies update(s)
    /uninstall <PatchCodeGuid>[;Update2.msp] /package <Product.msi | ProductCode>
    Remove update(s) for a product
    Repair Options
    /f[p|e|c|m|s|o|d|a|u|v] <Product.msi | ProductCode>
    Repairs a product
    p - only if file is missing
    o - if file is missing or an older version is installed (default)
    e - if file is missing or an equal or older version is installed
    d - if file is missing or a different version is installed
    c - if file is missing or checksum does not match the calculated value
    a - forces all files to be reinstalled
    u - all required user-specific registry entries (default)
    m - all required computer-specific registry entries (default)
    s - all existing shortcuts (default)
    v - runs from source and recaches local package
    Setting Public Properties
    [PROPERTY=PropertyValue]

    Consult the Windows ® Installer SDK for additional documentation on the
    command line syntax.

    Copyright © Microsoft Corporation. All rights reserved.
    Portions of this software are based in part on the work of the Independent JPEG Group.



    I am very thankful for your cooperations....

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

    Default

    What does "when I try to open a very simple class file or java file to run" mean?
    How are you "opening" it?
    How are you running it?

    Is it a command line, is it an IDE, do you have a JRE installed?

  9. #9
    sarwar1234 is offline Member
    Join Date
    Sep 2010
    Posts
    56
    Rep Power
    0

    Default

    Hi Norm,

    I am not sure about things... But the problem I metioned about at first place, occurs whenever I open the web page... any web page and I cant see some of the applets / images.....


    the Image3 will explain the problem.....

    Many Thanks
    Attached Thumbnails Attached Thumbnails Java Applet Runtime error-image3.jpg  

  10. #10
    sarwar1234 is offline Member
    Join Date
    Sep 2010
    Posts
    56
    Rep Power
    0

    Default

    Hello,

    Like very simple, I downloaded the applet source code from the link:

    Getting Started With Applets (The Java™ Tutorials > Deployment > Applets)


    I can see the source... The simple applet java file and the class file and other files etc...

    I just double click the class file, But Then I get that message.... the Windows Installer one.....

    But when I run it in the eclipse... It works.....

    When you try to open that link above, do you see any image after the first line....
    I am not getting that.. and there is an error sign.....
    Thats my main problem.....


    Thanks ...

    Regards,
    Sarwar

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

    Default

    Did you try this:
    In the html file, remove the .class from the APPLET's code= attribute

  12. #12
    sarwar1234 is offline Member
    Join Date
    Sep 2010
    Posts
    56
    Rep Power
    0

    Default

    Hello Norm,

    I am not exactly getting by what you said... like try to remove .class from the applet code attribute....

    If I am not wrong, let me explain this to you.... At the moment I am not programming the applet.... so dont know about the code stuff much....

    But the thing is, I am the error every time I try to execute a file that uses Java... A permission windows appers in vista.... asking me

    A program needs your permission to continue

    Java(TM) SE Runtime Environment 6.0 Update 13
    Sun Microsystems, Inc.


    and then i press continue.... and then program does not execute and another window appers

    Windows Installer


    Windows ® Installer. V 4.5.6002.18005

    msiexec /Option <Required Parameter> [Optional Parameter]

    Install Options
    </package | /i> <Product.msi>
    Installs or configures a product
    /a <Product.msi>
    Administrative install - Installs a product on the network
    /j<u|m> <Product.msi> [/t <Transform List>] [/g <Language ID>]
    Advertises a product - m to all users, u to current user
    </uninstall | /x> <Product.msi | ProductCode>
    Uninstalls the product
    Display Options
    /quiet
    Quiet mode, no user interaction
    /passive
    Unattended mode - progress bar only
    /q[n|b|r|f]
    Sets user interface level
    n - No UI
    b - Basic UI
    r - Reduced UI
    f - Full UI (default)
    /help
    Help information
    Restart Options
    /norestart
    Do not restart after the installation is complete
    /promptrestart
    Prompts the user for restart if necessary
    /forcerestart
    Always restart the computer after installation
    Logging Options
    /l[i|w|e|a|r|u|c|m|o|p|v|x|+|!|*] <LogFile>
    i - Status messages
    w - Nonfatal warnings
    e - All error messages
    a - Start up of actions
    r - Action-specific records
    u - User requests
    c - Initial UI parameters
    m - Out-of-memory or fatal exit information
    o - Out-of-disk-space messages
    p - Terminal properties
    v - Verbose output
    x - Extra debugging information
    + - Append to existing log file
    ! - Flush each line to the log
    * - Log all information, except for v and x options
    /log <LogFile>
    Equivalent of /l* <LogFile>
    Update Options
    /update <Update1.msp>[;Update2.msp]
    Applies update(s)
    /uninstall <PatchCodeGuid>[;Update2.msp] /package <Product.msi | ProductCode>
    Remove update(s) for a product
    Repair Options
    /f[p|e|c|m|s|o|d|a|u|v] <Product.msi | ProductCode>
    Repairs a product
    p - only if file is missing
    o - if file is missing or an older version is installed (default)
    e - if file is missing or an equal or older version is installed
    d - if file is missing or a different version is installed
    c - if file is missing or checksum does not match the calculated value
    a - forces all files to be reinstalled
    u - all required user-specific registry entries (default)
    m - all required computer-specific registry entries (default)
    s - all existing shortcuts (default)
    v - runs from source and recaches local package
    Setting Public Properties
    [PROPERTY=PropertyValue]

    Consult the Windows ® Installer SDK for additional documentation on the
    command line syntax.

    Copyright © Microsoft Corporation. All rights reserved.
    Portions of this software are based in part on the work of the Independent JPEG Group.



    May be, I am not getting your point completely.... So if you can suggest me in a bit detail....

    Many Thanks for the cooperation...

    Best Regards,
    Sarwar

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

    Default

    class HelloWorld.class not found.
    I was trying to solve the above problem.
    If you are not getting that error when you load the html with applet into a browser then you can ignore my suggestion.

    If you are getting that error and don't understand my suggestion, then copy and paste here the <APPLET tag from the html file and I will show you how to remove ".class" from the code= attribute.

Similar Threads

  1. Java Runtime Error! :(
    By RoadRunner in forum New To Java
    Replies: 6
    Last Post: 01-20-2011, 04:58 AM
  2. A fatal error has been detected by the Java Runtime Environment:
    By jayanti kumari in forum Advanced Java
    Replies: 8
    Last Post: 08-16-2010, 07:31 AM
  3. Replies: 5
    Last Post: 07-07-2010, 12:50 PM
  4. Replies: 8
    Last Post: 12-30-2009, 11:40 AM
  5. Replies: 3
    Last Post: 01-23-2009, 08:53 AM

Posting Permissions

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