Forums Register Login

Class is not recognizing.

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
SearchServlet is SearchEngine. Thanks

Originally posted by Bal Sharma:
Thanks guys for your time. BK


And then the flying monkeys attacked. My only defense was this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 585 times.
Similar Threads
SecureServer error
jiris mock question
non compiling drop down list
java util package
problem in Compiling servlets
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 02:49:33.