• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

NoClassDefFoundError

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I am getting one exception while try to start the Applet in any browser. Please help me.

basic: Exception: java.lang.NoClassDefFoundError: com/symantec/itools/javax/swing/models/StringTreeModel
java.lang.NoClassDefFoundError: com/symantec/itools/javax/swing/models/StringTreeModel


Here is java code.
import java.applet.Applet;
import com.symantec.itools.javax.swing.models.*;

public class MyApplet extends Applet {
public void init()
{
System.out.println("Hello");



String[] tempString = new String[22];
tempString[0] = "Order Service";
tempString[1] = " Frame Relay";
tempString[2] = " ATM";
tempString[3] = " Private Line";
tempString[4] = " IPL";
tempString[5] = " Local PL PME"; // 17107
tempString[6] = " Facility Order"; // 17107
tempString[7] = " Local PL "; // 17107
tempString[8] = " IP";
tempString[9] = " Rehome-IP";
tempString[10] = " IP Billing Migration";
tempString[11] = "Open Sales Order";
tempString[12] = "Profiles";
tempString[13] = " Customer";
tempString[14] = " User";
tempString[15] = " Location";
tempString[16] = "Inventory";
tempString[17] = "Reports";
tempString[18] = " Status & Tracking";
tempString[19] = " By Sales Order Name";
tempString[20] = " By Account";
tempString[21] = " Work Center Rejected Orders";
try
{
StringTreeModel stringTreeModel1 = new StringTreeModel();
stringTreeModel1.setItems(tempString);

System.out.print(stringTreeModel1.toString());
}
catch(Exception e)
{
System.out.print("haha");
e.printStackTrace();
}

}

}


What will be the correct html and setting(means class path). I tried all sort of combinations for those things. But failed.

I also found similar problems in the net but no solution was given. Please help....
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The com directory hierarchy needs to be in the same directory where the applet code (and the HTML page) is. If it's in a jar file, then you need to add that jar file as part of an archive tag. See this page for details.
[ October 21, 2007: Message edited by: Ulf Dittmer ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic