• Post Reply Bookmark Topic Watch Topic
  • New Topic

Class is not recognizing.

 
Bal Sharma
Ranch Hand
Posts: 273
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Everybody:
Give me some light. What am I doing wrong? I have SearchServlet.java and Search.java both are public class inside bkservletpkg package. Search class has static array variable []list ( Type Search class itself) that is filled by some value. Search class has one static method called getCommonSearch() returns the []list. Search class compiles fine. I wanted to call static method from SearchServlet but it does not recognize Search class. I do not have to create object to invoke static method right! But it is giving me following error.
C:\tomcat4\webapps\mydev\WEB-INF\classes\bkservletpkg>javac SearchEngine.java
SearchEngine.java:40: cannot resolve symbol
symbol : class Search
location: class bkservletpkg.SearchEngine
Search [] simpleSearch = Search.getCommonSearch();
^
SearchEngine.java:40: cannot resolve symbol
symbol : variable Search
location: class bkservletpkg.SearchEngine
Search [] simpleSearch = Search.getCommonSearch();
^
2 errors
Thanks guys for your time. BK
 
Bal Sharma
Ranch Hand
Posts: 273
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SearchServlet is SearchEngine. Thanks
Originally posted by Bal Sharma:
Thanks guys for your time. BK

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!