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 9130409
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:57:39+00:00 2026-06-17T07:57:39+00:00

I currently have a compilation issue with Gradle using target 1.7 and source 1.7

  • 0

I currently have a compilation issue with Gradle using target 1.7 and source 1.7 vs Eclipse Juno using the built-in 1.7 jdk.

I have 5 classes :

Info.java –> Interface that has no methods (for example)

public interface Info { //... }

RealInfo.java –> Interface that extends the Info interface

public interface RealInfo extends Info { //... }

AbstractManager.java –> Abstract class that has the method “getInfo()“

public abstract class AbstractManager<I extends Info>
{
    public I info;
    public I getInfo()
    {
        return this.info;
    }
}

Manager.java –> Interface that has the method “getInfo()“

public interface Manager
{
    public <I extends Info> I getInfo();
}

DefaultManager.java –> Extends AbstractManager

public class DefaultManager extends AbstractManager<RealInfo> implements Manager
{
    //...
}

If you copy/paste this code into eclipse, everything works fine. There’s no compilation error. However, if I build it with Gradle, using target jdk 1.7, the compiler will not like it :

DefaultManager.java:16: error: DefaultManager is not abstract and does not override abstract method <I>getInfo() in Manager
public class DefaultManager extends AbstractManager<RealInfo> implements Manager
                                                       ^
  where I is a type-variable:
    I extends Info declared in method <I>getInfo()

Do you have any idea on what could happen there?

  • 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-17T07:57:40+00:00Added an answer on June 17, 2026 at 7:57 am

    I’ve found what Javac doesn’t seem to like.

    I modified my AbstractManager class to :

    public abstract class AbstractManager<I extends Info>
    {
        public I info;
        public <I extends Info> I getInfo()
        {
            return (I) this.info;
        }
    }
    

    Gradle now accepts this code while compiling with Javac. It’s strange though that it cannot properly infer I to <I extends Info>. Eclipse’s compiler can handle the two syntaxes.

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

Sidebar

Related Questions

Question about the m2 eclipse plugin. Currently I have Eclipse Java EE IDE for
We're coding a Java6 project under Eclipse Indigo and we currently have some compilations
OK so we have something that is currently using OpenExeConfiguration for reading a config
I currently have a piece of code that I am working on using function
I have a really confusing issue with my Makefile I am using it to
I have been using conditional compilation as a way to allow me to debug
I want to use rails console and I'm using ubuntun 11.10 currently I have
I have some python code that currently performs expensive computation by performing the computation
Currently have a drop down menu that is activated on a hover (from display:none
Currently have password protection on my main and sub directories, however I'd like to

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.