错误:不再支持源选项6。使用7或更高版本

问题描述 投票:0回答:1

[单挑,我正在Mac上执行此操作。我正在尝试使用mcp创建自定义PvP客户端。当我运行反编译方法时,它运行良好,但是最后它给了我这个错误:

== ERRORS FOUND in JAVA CODE ==

error: Source option 6 is no longer supported. Use 7 or later.
error: Target option 6 is no longer supported. Use 7 or later.
==================

Initial client recompile failed, correct source then run updatemd5

我在网上看过,找不到任何解决方案。

提前感谢!

java macos minecraft
1个回答
0
投票

好的,我终于弄清楚了你在做什么。您需要为项目编辑pom.xml文件。

使用文本编辑器,打开pom.xml并找到pom.xml标记,您应该在其中添加以下行:

<properties>

无论您使用的是哪种版本的Maven都不支持Java 1.6,除非您明确指示要这样做。

<maven.compiler.source>1.6</maven.compiler.source> <maven.compiler.target>1.6</maven.compiler.target> 的属性部分看起来像:

pom.xml

如果第一次打开<properties> <maven.compiler.source>1.6</maven.compiler.source> <maven.compiler.target>1.6</maven.compiler.target> </properties> 时在属性标签之间发现“多余”的东西,则不要理会这些东西,而仅添加编译器的源和目标属性。我对Minecraft的了解不足,无法提前知道您将要找到的内容。

© www.soinside.com 2019 - 2024. All rights reserved.