Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes 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
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

ServiceServerImpl java class does not compile.

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have the following two interfaces and a java class. The problem i am getting is that i have implemented all the methods of an interface which my code is implementing, but still compiler complains that i havnt overridden getService method in my class, though i have. I have highlighted the method overridden using . Please tell me, how to solve this problem.Thanks in advance.

Service.java




ServiceServer.java




ServiceServerImpl.java



 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tried it out myself and appeared to work just fine.

I would say that you should check for any classes within some other jar files in your classpath with same name and package. It happens a lot that a preferred classloader in the chain has loaded the some other class (with same package and name) and it just returns that one instead of the one you are thinking about.
 
Tripti Ag
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Rohit. It ran successfully. I didnt made any changes but the code compiled without any error. But why i was getting that error is still uncleared.
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tripti Ag wrote:


Please check your private messages for an important administrative matter
 
God is a comedian playing for an audience that is afraid to laugh - Voltair. tiny ad:
The trailboss has a kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic