• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Extending From Classes with Same Name, Different JAR

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Question for anybody who might have run across this --

We are working with a software package and want to make a modification. There is a class that looks like this:



We want to make a copy of the class in a custom jar file and override just method2. We want to use everything else as the base. We don't have the full source code, but the vendor gave us the method name and signature and we know how to add it to the CLASSPATH. So, what we'd need to do would be this:



That would run all the base methods but run our method2. But that's not working since Eclipse thinks we're extending from ourselves and not the SomeClass that is in the vendor's JAR. Is there a way to do this? Or are we lost?

Thanks in advance!
 
Sheriff
Posts: 22784
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For the compiler these two are the same class, and therefore it will not work.
 
reply
    Bookmark Topic Watch Topic
  • New Topic