java.lang.NoClassDefFoundError: JBuilder

Reply

Join Date: Sep 2006
Posts: 68
Reputation: rpjanaka is an unknown quantity at this point 
Solved Threads: 0
rpjanaka rpjanaka is offline Offline
Junior Poster in Training

java.lang.NoClassDefFoundError: JBuilder

 
0
  #1
Sep 19th, 2006
I got an error as "java.lang.NoClassDefFoundError: JBuilder".my programe is create simple jframe and show hellow world on it.
i think this is some problem with JBuilder, because when i run the same programe with "IntelliJ IDEA" did not get that error.

thank you.
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 229
Reputation: DavidRyan is an unknown quantity at this point 
Solved Threads: 11
DavidRyan's Avatar
DavidRyan DavidRyan is offline Offline
Posting Whiz in Training

Re: java.lang.NoClassDefFoundError: JBuilder

 
0
  #2
Sep 19th, 2006
Check that you have JBuilder imported. If you do, and it still doesn't work, we'll need to see some code.
Please anyone, correct me if I am wrong. It is the best way for me to learn.
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 68
Reputation: rpjanaka is an unknown quantity at this point 
Solved Threads: 0
rpjanaka rpjanaka is offline Offline
Junior Poster in Training

Re: java.lang.NoClassDefFoundError: JBuilder

 
0
  #3
Sep 19th, 2006
Originally Posted by DavidRyan View Post
Check that you have JBuilder imported. If you do, and it still doesn't work, we'll need to see some code.

sory i was unable to understand what is mean by "JBuilder imported". this is the first time im using JBuilder.


thank you.
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 229
Reputation: DavidRyan is an unknown quantity at this point 
Solved Threads: 11
DavidRyan's Avatar
DavidRyan DavidRyan is offline Offline
Posting Whiz in Training

Re: java.lang.NoClassDefFoundError: JBuilder

 
0
  #4
Sep 19th, 2006
Ah, don't worry about that. i thought you were referencing a class, but you are using an IDE called JBuilder. My mistake.

Could you post your code up here? Remember to wrap it in [C0DE][/C0DE] tags.
Please anyone, correct me if I am wrong. It is the best way for me to learn.
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 68
Reputation: rpjanaka is an unknown quantity at this point 
Solved Threads: 0
rpjanaka rpjanaka is offline Offline
Junior Poster in Training

Re: java.lang.NoClassDefFoundError: JBuilder

 
0
  #5
Sep 19th, 2006
Originally Posted by DavidRyan View Post
Ah, don't worry about that. i thought you were referencing a class, but you are using an IDE called JBuilder. My mistake.

Could you post your code up here? Remember to wrap it in [C0DE][/C0DE] tags.





import javax.swing.*;
import java.awt.*;
public class CreateGUI{
public void createAndShowGUI(){

JFrame myFram = new JFrame();
myFram.setDefaultCloseOperation(myFram.EXIT_ON_CLOSE);
Container contentPane = myFram.getContentPane();

JLabel myLable = new JLabel("hellow world");
contentPane.add(myLable);

myFram.pack();
myFram.setVisible(true);

}
}





public class TestGUI {
public static void main (String[] args){
CreateGUI myGui = new CreateGUI();
myGui.createAndShowGUI();
}
}


this is my simple programe.


[IMG]file:///C:/DOCUME%7E1/JANAKA%7E1/LOCALS%7E1/Temp/moz-screenshot.jpg[/IMG][IMG]file:///C:/DOCUME%7E1/JANAKA%7E1/LOCALS%7E1/Temp/moz-screenshot-1.jpg[/IMG][IMG]file:///C:/DOCUME%7E1/JANAKA%7E1/LOCALS%7E1/Temp/moz-screenshot-2.jpg[/IMG]the below is the error massage that i got

java.lang.NoSuchMethodError: main
Exception in thread "main"



but the most terrible problem is, when i copy these two classes into a new project that was created by same JBuilder IDE, it is running properly.
i want to find why is that
please help me


thanks
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 213
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: java.lang.NoClassDefFoundError: JBuilder

 
0
  #6
Sep 19th, 2006
how are you calling the thing?
You're doing something wrong, which is typical of people stepping outside the world of IDEs for the first time.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 216
Reputation: hooknc is an unknown quantity at this point 
Solved Threads: 8
hooknc hooknc is offline Offline
Posting Whiz in Training

Re: java.lang.NoClassDefFoundError: JBuilder

 
0
  #7
Sep 19th, 2006
Do you have two class files or do you have only one class file?
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 229
Reputation: DavidRyan is an unknown quantity at this point 
Solved Threads: 11
DavidRyan's Avatar
DavidRyan DavidRyan is offline Offline
Posting Whiz in Training

Re: java.lang.NoClassDefFoundError: JBuilder

 
0
  #8
Sep 19th, 2006
The compiler is having problems finding your main method. With a program this simple, one class is more than sufficient, so I'd suggest taking your main method out of TestGUI and trying to compile with it inside CreateGUI (btw, this should be called something more distinctive, like HelloWorld; a classname should tell you something about what the class is for).
Please anyone, correct me if I am wrong. It is the best way for me to learn.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC