Jump to content

Compiling source with java 8


WorldsEnder

Recommended Posts

Whenever I try to do

gradlew build

I get the following error:

 

warning: [options] bootstrap class path not set in conjunction with -source 1.6

C:\Users\----\Documents\CreativeWorkspace\MHFC\build\sources\java\mhfc\net\client\model\mhfcmodel\ModelMHFC.java:130:

error: try-with-resources is not supported in -source 1.6

                try (InputStream is = Minecraft.getMinecraft().getResourceManager()

                    ^

  (use -source 7 or higher to enable try-with-resources)

 

Now I know that it says java 7 there but it will hit a java 8 section of the code eventually. How can I fix this issue?

 

PS: My JAVA_HOME path is set to a java8u5 jdk, so definitly no problem there.

PPS: No, I can't switch to version 1.6

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

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