GithubHelp home page GithubHelp logo

compile with java 1.6 or lower about spoon HOT 9 CLOSED

inria avatar inria commented on July 19, 2024
compile with java 1.6 or lower

from spoon.

Comments (9)

GerardPaligot avatar GerardPaligot commented on July 19, 2024

Hi @boeserwolf91,

Unfortunately, there is a reason for using java 1.7 and not a lower version. We would like that Spoon supports java 1.7 (and in a near future java 1.8) and there is already a minimum support for java 1.7 in Spoon.

So we can't compile Spoon in 1.6 or 1.5. Thanks for you question but sorry for the answer. :)

from spoon.

pschichtel avatar pschichtel commented on July 19, 2024

How is spoon's supported jdk version related to the jdk version it's build with?

from spoon.

GerardPaligot avatar GerardPaligot commented on July 19, 2024

If I am not mistaken I believe the minimum support for Java 1.7 is in the JDT compiler (integrate in Spoon) and this compiler has need a JVM 1.7 to compile the project.

from spoon.

swolf91 avatar swolf91 commented on July 19, 2024

Before I switched to spoon I used the jdt compiler with Java 1.5. But it was an older version.
I'll have a look for the minimum jdk version tonight. But I don't think that one needs the jdk 7 to use Eclipse.

from spoon.

swolf91 avatar swolf91 commented on July 19, 2024

@GerardPaligot The ecj dependency version 4.2.2 has a min jdk version of java 1.2 ! and the newest versions 4.4 needs at least java 1.6.

from spoon.

GerardPaligot avatar GerardPaligot commented on July 19, 2024

Good to know! Thanks for you search @boeserwolf91.

For now, ecj dependency is in version 4.2.2 in Spoon (and so compatible java 1.2) but Spoon use massively concepts of Java 1.5.

Do you have tested to compile in Java 1.5 and execute all tests?

from spoon.

pschichtel avatar pschichtel commented on July 19, 2024

Going below 1.5 would be crazy as you'd lose generics. As the current version of ecj requires jdk1.6 I'd go for that. You'd need to replace diamonds and try-with-resources and maybe nio2 API usage if you use it. I think that was all I saw when I tried to compile spoon against 1.6 and 1.5

from spoon.

GerardPaligot avatar GerardPaligot commented on July 19, 2024

Well yes, I also tested and the majority of errors are about the diamond operator. This seems not a big deal to solve these errors but, @pschichtel, I don't see any try-with-resources errors neither nio2 API usage.

from spoon.

swolf91 avatar swolf91 commented on July 19, 2024

Great. So we can port it to compile with jdk 1.6 😄
I just had a short look into this. I found diamonds and the AutoCloseable API was used.
I think we can port it with a few commits.
Also it's possible to use a different jdk version for the tests. So the sources can compile with 1.6 and the tests with 1.8 to test lambdas and co (well they're not supported yet, I just want to let you know that it works)

from spoon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.