Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue building TFM #2147

Closed
ghost opened this issue Jan 8, 2018 · 11 comments
Closed

Issue building TFM #2147

ghost opened this issue Jan 8, 2018 · 11 comments

Comments

@ghost
Copy link

ghost commented Jan 8, 2018

I get these errors when I try to build TFM. Any solutions to resolve this issue?


COMPILATION ERROR :

me/totalfreedom/totalfreedommod/admin/AdminList.java:[53,9] cannot access java.util.function.Function
class file for java.util.function.Function not found
me/totalfreedom/totalfreedommod/admin/AdminList.java:[54,13] method does not override or implement a method from a supertype
2 errors


BUILD FAILURE

Total time: 18.518s
Finished at: Mon Jan 08 18:16:12 GMT 2018
Final Memory: 21M/238M

Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile (default-compile) on project totalfreedom: Compilation failure: Compilation failure:
me/totalfreedom/totalfreedommod/admin/AdminList.java:[53,9] cannot access java.util.function.Function
class file for java.util.function.Function not found
me/totalfreedom/totalfreedommod/admin/AdminList.java:[54,13] method does not override or implement a method from a supertype
[Help 1]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

@Wild1145
Copy link
Member

Wild1145 commented Jan 8, 2018

What branch are you trying to build?

@ghost
Copy link
Author

ghost commented Jan 8, 2018

The branch i'm using is TFM1.12-Alpha

@Wild1145
Copy link
Member

Wild1145 commented Jan 8, 2018

Have you made any changes to the code?

@ghost
Copy link
Author

ghost commented Jan 8, 2018

No. All I did was clone TFM and add the lib folder. No errors appear after compiling, but the error above for some reason keeps showing and failing to build when I build the plugin.

@JeromSar
Copy link
Member

JeromSar commented Jan 8, 2018

What version of Java are you building with? We recommend at least JDK 1.7

@Wild1145
Copy link
Member

Wild1145 commented Jan 8, 2018

@poppy44 The alpha branch contains fully automated maven building. Try running a clean & build instead of just a build, if not re-clone it and DO NOT add the lib folder this time, just launch the project and compile it with maven.

@ghost
Copy link
Author

ghost commented Jan 8, 2018

I'm using JDK version 1.7.0_80

@ghost
Copy link
Author

ghost commented Jan 8, 2018

oh Wild I forgot to mention. When I was building it, I was selecting clean and build the whole time.

@ghost
Copy link
Author

ghost commented Jan 8, 2018

@Wild1145 how do I compile it with maven? when I cloned TFM from git, it also came with the lib folder.

@JeromSar
Copy link
Member

JeromSar commented Jan 8, 2018

I see the issue. Whilst TotalFreedomMod should be compiled with JDK 1.7 (as indicated in pom.xml), it actually uses JDK 8 functionality (namely java.util.function.Function). This is a bug, but there's no fix right now. For now, I recommend upgrading to JDK 8.

@ghost
Copy link
Author

ghost commented Jan 9, 2018

It works now, seems the older version of JDK I used was causing it to fail at building. Thanks for the help. :)

@JeromSar JeromSar closed this as completed Jan 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants