Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

compilation problem

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Iam trying to compile a serlet that uses packages and utilities.
I have the utility in c:\servletdevel\Servletutility.java and the servlet in c:\servletdevel\ShowMessage.java.
Both have coreservlets as package in the file.
I could compile servletutility.java file but when i tried to compile the ShowMessage.java it gave a compile error saying
cannot resolve symbol Servletutility.
This is where in ShowMessage where i have used the Servletutility class
out.println(Servletutility.headwithtitle(title) +
I have set the classpath as
%classpath%;c:\servletdevel;c:\tomcat\common\lib\servlet.jar.
Please let what iam doing wrong?.
Thanks
 
Ranch Hand
Posts: 395
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
use
classpath=%classpath%;mydir\myjar.jar;.
"." is needed.
cheers..
 
Rajeev Nair
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Laksmeenarayana,
Do you mean i need to put "." at the end of the classpath. I did that and still iam getting the compilation error. Let me know what you think.
Thanks
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
morepeople have moreproblems with moreservlets.

https://coderanch.com/t/354473/Servlets/java/Packages-Utility-Classes-Servlets
 
Rajeev Nair
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Mike !. I could compile it now. Its not so simple and starightforward. I was going nuts with this.
 
On top of spaghetti all covered in cheese, there was this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic