How set java source?

OpenFL 3, haxe 3.2, hypsystem

[javac]                     catch (InterruptedException | ExecutionException | TimeoutException exception)
[javac]                                                 ^
[javac]   (use -source 7 or higher to enable multi-catch statement)

How I can set java source version?

Are you compiling Haxe sources to Java? Or are you compiling an Android project, with multiple versions of Java installed?

No, i’m just trying use https://github.com/hyperfiction/HypSystem inside empty openfl android project.
That extension has java code: https://github.com/hyperfiction/HypSystem/blob/master/dependencies/hyp-system/src/hypsystem/net/NetworkInfos.java#L110

I have this problem with facebook too.

        [javac] C:\lab\TestExtensions\bin\android\bin\deps\facebook\src\com\facebook\share\widget\ShareDialog.java:223: error: diamond operator
    is not supported in -source 1.5
        [javac]         ArrayList<ModeHandler> handlers = new ArrayList<>();
        [javac]                                                         ^
        [javac]   (use -source 7 or higher to enable diamond operator)
        [javac] 26 errors

Possible solution (however I haven’t tried):

  1. Add <template path="templates" /> into project.xml
  2. Create following folders structure templates/android/template
  3. Create file ant.properties inside templates/android/template with following content:
java.source=7
java.target=7

Result folders structure:

project_root
|- assets
|- source
|- project.xml
|- templates
   |- android
      |- template
         |- ant.properties

It’s work!
But i’m added

java.source=7
java.target=7

in extension/dependencies/android/project.properties

Thanks!

Sounds like a good pull request for the original project :slight_smile: