Jump to content

Recommended Posts

Posted

Hi, i have been having a problem with building my mod. when i run gradle build, it fails saying

error: multi-catch statement is not supported in -source 1.6
                } catch (NumberFormatException | ArrayIndexOutOfBoundsException ex) {
                                               ^
  (use -source 7 or higher to enable multi-catch statement)

Is there any way I can change gradle to build with java 1.7? I have looked it up a few times but nothing seemed to work... Thanks in advance.

Posted

You need to set the

srcCompat

and

targetCompat

properties in build.gradle like I do here.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted

Note: For runtime compatiblity with the most users, you should STILL have Java6 as your target.

Most of the J7 features can be compiled to J6 specs.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.