Giter VIP home page Giter VIP logo

Comments (5)

brunchboy avatar brunchboy commented on May 24, 2024

You can still use a more advanced Java to do it, but simply pass a command-line argument (configured in Maven) to compile for an older version. There is also a Maven plugin I use to check during the build process that I have not used any classes or APIs that are newer than my target Java version. I will investigate what those are and share them here.

from radiance.

kirill-grouchnikov avatar kirill-grouchnikov commented on May 24, 2024

Hopefully I just missed this line in build.gradle for Hibiscus:

sourceCompatibility = 1.8

I'll check in the evening when I get to the machine I use to upload to Sonatype.

from radiance.

brunchboy avatar brunchboy commented on May 24, 2024

Ok. In my Beat Link project which targets Java 6, check out the following sections of the pom.xml:

  • In <project>…<build>…<plugins> I configure the maven-compiler-plugin to expect Java 6 source and emit Java 6 classes.
  • Immediately after that I configure the Codehaus animal-sniffer-maven-plugin to validate that I am only using APIs available in Java 6.

With those things in place, I can ensure that my builds, if they succeed, will work fine on Java 6.

from radiance.

brunchboy avatar brunchboy commented on May 24, 2024

I don’t think source compatibility is enough; you need to be sure you are generating the proper class format as well, and that you haven’t accidentally referred to some class that is available in a more recent JDK but not in Java 8 (in your case), or the class that refers to it will fail to load with a NoClassDefFoundError. That’s what the animal-sniffer plugin does.

from radiance.

kirill-grouchnikov avatar kirill-grouchnikov commented on May 24, 2024

Should be fixed now with sourceCompatibility in build.gradle for Hibiscus.

from radiance.

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.