dcsimg
Cannot resolve symbol problem
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Thursday, June 19, 2003 06:46 PM

I just made the switch from Windows to Linux, but I'm having some problems with java. I got it all installed compiler works executing downloaded classes no problem. But when I try to write my own classes I get the old "Cannot resolve symbol" error. Is the technique in linux a little different or am I just out of practice? I have two classes in a package. package ...; public class AppManager { public AppManager() { System.out.println("here it is"); } } When I had this as a one class project it worked fine. Then I removed the main method and wrote a class like: package ...; public class Bar   More>>

I just made the switch from Windows to Linux, but I'm having some problems with java. I got it all installed compiler works executing downloaded classes no problem. But when I try to write my own classes I get the old "Cannot resolve symbol" error. Is the technique in linux a little different or am I just out of practice?

I have two classes in a package.

			
package ...;

public class AppManager
{
public AppManager()
{
System.out.println("here it is");
}
}



When I had this as a one class project it worked fine. Then I removed the main method and wrote a class like:

			
package ...;

public class BarManager
{
public static BarManager manager;
public AppManager aManager;

public BarManager()
{
aManager = new AppManager();
}

public static void main (String args[])
{
manager = new BarManager();
}
}


now when I compile my project it tells me that it can't find AppManager. Any suggestions?    <<Less

Re: Cannot resolve symbol problem

Posted By:   Bahman_Barzideh  
Posted On:   Friday, June 20, 2003 08:38 AM

You may be having CLASSPATH issues. Examine your javac
command line. From this, you should be to determine where the .class files are being placed (this is the value of the -d option. If the option is not there, javac will default to
the directory where it finds the .java to be compiled).
Make sure the specified directory is in your class path.



Also if the two classes are not in the same package, you may have to
import AppManager in BarManager.java
About | Sitemap | Contact