Class or Interface not found in import.
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ishwor_Thapa
Posted On:   Monday, April 9, 2007 02:39 AM

I tried to build HelloWorld java program by ant, it worked well. public class Test { public static void main(String args[]) { System.out.println("Hello world"); } } the output was fine. But then I added an extra line import javax.swing.JTextArea; Then there is this error called Class or interface `javax.swing.JTextArea' not found in import. [javac] import javax.swing.JTextArea; [javac] ^ [javac] 1 error There are other classes like javax.sound.sampled.AudioFormat which I tried to import but says the same error. But with other classes like jav   More>>

I tried to build HelloWorld java program by ant, it worked well.


			
public class Test {

public static void main(String args[])
{
System.out.println("Hello world");
}
}


the output was fine. But then I added an extra line


			
import javax.swing.JTextArea;


Then there is this error called

Class or interface `javax.swing.JTextArea' not found in import.

[javac] import javax.swing.JTextArea;

[javac] ^

[javac] 1 error


There are other classes like javax.sound.sampled.AudioFormat which I tried to import but says the same error. But with other classes like javax.swing.JFrame and others, it is working well. How is it error with JTextArea and AudioFormat classes.


I have jdk1.5.0_06 and apache-ant-1.7.0 on Fedora Core2 Linux.


What is this error, could I get help please?


Thanks in advance.    <<Less
About | Sitemap | Contact