• 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

NoClassDefFoundError

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • 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: 43016
76
  • Mark post as helpful
  • send pies
  • 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 ]
 
Whatever you say buddy! And I believe this tiny ad too:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic