AxG
#1
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?
AxG
#3
AxG
#4
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):
- Add
<template path="templates" />
into project.xml
- Create following folders structure
templates/android/template
- 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
AxG
#6
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 