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

Thread: Please help!!! Adding java app to a web application

  1. #1
    Junior Member
    Join Date
    Jul 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Please help!!! Adding java app to a web application

    Hello all... I'm trying to add a java program to a web application. When I run my java program it works properly but when I try to add the java ti displays this error:


    Java Plug-in 1.6.0_25
    Using JRE version 1.6.0_25-b06 Java HotSpot(TM) Client VM
    User home directory = C:\Users\Snapper
    ----------------------------------------------------
    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 ../../classe/FIGR/AFIGR.class not found.
    java.lang.ClassNotFoundException: ......classe.FIGR.AFIGR.class
    at sun.plugin2.applet.Applet2ClassLoader.findClass(Un known Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(U nknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Un known Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Un known 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: ......classe.FIGR.AFIGR.class

    -----------------------------------------------
    Another try
    -----------------------------------------------

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


    java.lang.NoClassDefFoundError: AFIGR (wrong name: FIGR/AFIGR)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(Unknown Source)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknow n Source)
    at sun.plugin2.applet.Applet2ClassLoader.findClass(Un known Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(U nknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Un known Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Un known 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.NoClassDefFoundError: AFIGR (wrong name: FIGR/AFIGR)

    I already tried several approaches and googled it... but with no luck. I'm stucked here and any help would be much appreciated.

    Thanks in advance.

    Snapper


  2. #2
    Junior Member
    Join Date
    Jul 2011
    Posts
    25
    My Mood
    Fine
    Thanks
    1
    Thanked 4 Times in 4 Posts

    Default Re: Please help!!! Adding java app to a web application

    I think only applets can be added to web application

    <P>
    <APPLET codebase="yourApplicationFolder" code="yourMainClass.class" width=350 height=200></APPLET>
    </P>
    or if you want to add applet from jar file
    <P>
    <APPLET archive="yourJarFileName" code="yourMainClass.class" width=350 height=200></APPLET>
    </P>
    I hope it will help you

  3. #3
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    SW Missouri
    Posts
    20,348
    Thanks
    49
    Thanked 2,203 Times in 2,176 Posts

    Default Re: Please help!!! Adding java app to a web application

    NoClassDefFoundError: AFIGR (wrong name: FIGR/AFIGR)
    Is AFIGR in the package: FIGR?
    If so, you must use the package path in the code= tag code=FIGR.AFIGR

    class ../../classe/FIGR/AFIGR.class not found.
    The browser is looking for the class: FIGR.AFIGR.class in the file: class.class in the package: FIGR.AFIGR

    Remove the .class from the code= tag

Similar Threads

  1. how to run any installed application through my java application??
    By sgsamanthjain in forum Java Theory & Questions
    Replies: 1
    Last Post: April 1st, 2011, 08:17 AM
  2. Adding a frame/textarea to an application
    By zincc in forum What's Wrong With My Code?
    Replies: 2
    Last Post: March 5th, 2011, 03:43 PM
  3. Replies: 1
    Last Post: January 12th, 2011, 04:55 AM
  4. Java Application Help...
    By Brian in forum Java ME (Mobile Edition)
    Replies: 0
    Last Post: March 25th, 2010, 07:38 AM
  5. Replies: 0
    Last Post: December 3rd, 2009, 03:43 PM

Tags for this Thread