Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8507785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:58:05+00:00 2026-06-11T02:58:05+00:00

I am trying to change an interface in Proj2. However, Proj1 is already using

  • 0

I am trying to change an interface in Proj2.
However, Proj1 is already using this interface, and won’t be compiled with my new version.

Looks like problems occur only if I change/delete existing methods but adding new methods seems to be not causing any issues.

So as long as I only “add” methods to the interface, I can expect Proj1 to be fine with the latest Jar of Proj2.

Is that a rock solid safe assumption?

Update:
Both the interface and impl reside in proj2. Proj1 has no implementation of that that interface.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T02:58:06+00:00Added an answer on June 11, 2026 at 2:58 am

    By “using,” you mean “references an object using the interface and invokes interface-defined methods using that reference,” not “implements the interface” (yes, you’ve clarified in comments, but I just want to repeat, because all the other answers are about implementing the interface).

    In that case, as long as you have not removed methods from the interface or change their signature, your existing code will work.

    The reason that this will work is that the compiler translates the method calls into an invokeinterface bytecode, which references the interface class and method by name. At runtime, the JVM simply validates that the actual reference implements the interface, and invokes the method.

    If you remove or change a referenced interface method, one of two things will happen: either the JVM will refuse to load the class in proj1, because the interface reference could not be resolved, or it will give a NoSuchMethodError (I believe it’s the second). Same thing if you remove or change a referenced method in a concrete class.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i'm trying to design interface like this one http://www.softpedia.com/screenshots/FlashFXP_2.png i'm using the QT design
I am trying to change the property type in interface implementation class using explicit
I'm trying to change some text in a .CSV file. StreamReader sReader = new
I'm trying to change the text of the back button from within Interface Builder,
I'm trying to change the proxy setting for JVM in my User Interface (Eclipse
I'm trying to modify the behavior of an IDispatch interface already present in the
I am using Three20 for the iphone and I am trying to change what
I'm trying to change places of ofbiz components like application bar and main container
I'm trying to change TCP/UDP of a virtual machine using VBoxManage setextradata. Whenever I
I'm trying to figure out what SWIG Interface file change is needed in order

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.