This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Five Lines of Code and have Christian Clausen on-line!
See this thread for details.
Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

java.lang.NoClassDefFoundError

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I wrote a java application it using JFrame works fine. but I changed it to an applet (JApplet), I got error message in run time:
java.lang.NoClassDefFoundError: Project1$5
at Project1.showFieldCombo(Project1.java:331)
at Project1.ComboBoxShow(Project1.java:475)
at Project1.init(Project1.java:492)
at sun.applet.AppletPanel.run(AppletPanel.java:344)
at java.lang.Thread.run(Thread.java:484)
Process Exit...
I'm using a signed applet as a jar file and the jar file is in my classpath.

Thanks a lot,
Payam
 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Payam,

I am not able to figure out if u did define a .html file to make the applet run or if u had just changed the JFrame to JApplet and tried rerunning the same code using "javac" for compilation followed by "java" to run the applet.

U might want to "copy-paste" ur code in ur reply so that things get clearer.

-S
[This message has been edited by Suma MM (edited July 07, 2001).]
 
Ranch Hand
Posts: 625
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you testing the JApplet in your browser or with the appletviewer. I don't believe most browsers support Swing. I think you need to install a plugin.
 
Payam Mamaani
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot for your replies,
I found the problem , I had used a jar file and some of my class file (with nnnn$#) weren't in the jar file.
Thanks again,
Payam
 
This cake looks terrible, but it tastes great! Now take a bite out of this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic