Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

'cannot resolve symbol" error when compiling

  Asked By: Madeline    Date: Jun 03    Category: Java    Views: 1472
  

I'm working on a servlet on mac os x with tomcat. I get a 'cannot
resolve symbol' error when
i try to compile the main servlet. I get that error for every instance
of every class that I wrote
that is outside of the mainServlet.java file eventhough they are in
the same directory. To try to
figure out the problem I went to a different directory, '~/test', and
I wrote two simple little test
classes and saved them as seperate files as follows.

public class Test {
public static void main(String[] args) {
S w = new S();
String p = w.getS();
System.out.println(p);
}
}
-------------------------------
public class S {
public String getS(){
return ("s");
}
}

When I put these files in '~/test' and compiled them everything worked
fine. When
I moved them to
'/usr/local/jakarta-tomcat-4.1.12/webapps/mywebapp/WEB-INF/classes'
and tried to compile I got this:

bash-2.05a$ javac Test.java
Test.java:13: cannot resolve symbol
symbol : class S
location: class Test
S w = new S();
^
Test.java:13: cannot resolve symbol
symbol : class S
location: class Test
S w = new S();
^
2 errors


Does anyone know why moving the files to a different directory, and
compiling from there,
causes this problem?

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Gulshan Aara     Answered On: Apr 16

CANNOT RESOLVE SYMBOL CONSTRUCTOR FIGURE( )

 
Didn't find what you were looking for? Find more on 'cannot resolve symbol" error when compiling Or get search suggestion and latest updates.




Tagged: