Questions tagged [source-compatibility]

Source compatibility is generally an ability of two software systems (including API libraries and some compiler) to recompile the same source code without any errors.

4 questions
6
votes
3 answers

Writing Java code that compiles using one of two implementations of a class

I am writing some FFI code in Java that makes heavy use of sun.misc.Unsafe. In Java 9, this class will become inaccessible, and will become jdk.unsupported.Unsafe. I would like to write my code so that it works now, but continues to work in Java…
Demi
  • 3,535
  • 5
  • 29
  • 45
5
votes
1 answer

Gradle / IntelliJ IDEA: sourceCompatibility reverts to previous value in IDE settings

Setting sourceCompatibility and targetCompatibility to JavaVersion.VERSION_11 has not expected effect in my IntelliJ/Grade/Java project. Even I set Project SDK and Project Language Level in Project Structure manually to 11, it reverted to 8 and 6…
Mir-Ismaili
  • 13,974
  • 8
  • 82
  • 100
3
votes
1 answer

What is the difference between sourceCompatibility 8 and 11? What happens when they are set to different values?

When I target Android API level 21 what I set as sourceCompatibility 11 or 8 and what's the differences in my build gradle I always set it like that compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility…
devio
  • 607
  • 9
  • 29
1
vote
2 answers

How can I define compileOptions of android application within codenameone1?

How can I define android's compileOptions within codenameone1 project ? compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } Thanks in advance