File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Extending From Classes with Same Name, Different JAR

 
Steve Singer
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • 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!
 
Rob Spoor
Sheriff
Pie
Posts: 20396
47
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For the compiler these two are the same class, and therefore it will not work.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic