
Hai,
I have developed a code for an employee program by using jtext fields and buttons,it has no errors but while we are compiling it it is saying that "Exception in thread "main" java.lang.NoClassDefFoundError: Emp/java".Why it is saying like this?The code which i developed is as follows
import java.io.*;
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
class Emp
{
JFrame f;
JPanel p;
JLabel l1,l2,l3,l4,l5,l6,l7,l8,l9,l10;
JTextField tf1,tf2,tf3,tf4,tf5,tf6,tf7,tf8,tf9,tf10;
JButton submitBtn;
JButton resetBtn;
Emp()
{
f=new JFrame("EmpDetails");
l1=new JLabel("EmployeeID:");
l2=new JLabel("EmployeeName:");
l3=new JLabel("Wonno:");
l4=new JLabel("Fromdate:");
l5=new JLabel("Todate:");
l6=new JLabel("Noofdays:");
l7=new JLabel("Leavetype:");
l8=new JLabel("Project:");
l9=new JLabel("Approvername:");
l10=new JLabel("Sendmailto:");
tf1=new JTextField(12);
tf2=new JTextField(12);
tf3=new JTextField(12);
tf4=new JTextField(12);
tf5=new JTextField(12);
tf6=new JTextField(12);
tf7=new JTextField(12);
tf8=new JTextField(12);
tf9=new JTextField(12);
tf10=new JTextField(12);
submitBtn=new JButton("Submit ");
resetBtn=new JButton(" Reset");
p.add(l1);
p.add(tf1);
p.add(l2);
p.add(tf2);
p.add(l3);
p.add(tf3);
p.add(l4);
p.add(tf4);
p.add(l5);
p.add(tf5);
p.add(l6);
p.add(tf6);
p.add(l7);
p.add(tf7);
p.add(l8);
p.add(tf8);
p.add(l9);
p.add(tf9);
p.add(l10);
p.add(tf10);
p.add(submitBtn);
p.add(resetBtn);
tf1.setText("");
tf2.setText("");
tf3.setText("");
tf4.setText("");
tf5.setText("");
tf6.setText("");
tf7.setText("");
tf8.setText("");
tf9.setText("");
tf10.setText("");
}
}
Please slove this problem as soon as possible.
Thanks and Regards, Madhuri.

Have a look at the following link:
http://www.roseindia.net/java/example/java/swing/addeditanddeleteemployee_inf.shtml

i don't want the program actually i want yuo rectify the error.If it possible for you to rectify the error in my program please kindly do it.. thanks.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.