英文:
Trying to get maven up and running on intellij with java/javafx
问题
我正试图让Maven在我的计算机上正常工作。到目前为止,我大部分时间都避免使用它,但眼下我需要让它能够正常运行。我希望它能与JavaFX/Java一起工作。
我已经查阅了各种指南,尝试让它正常工作,但没有成功。
- 设置 -> 构建、执行、部署 -> 编译器 -> Java编译器 和 字节码版本/项目字节码版本
- 与项目设置相匹配 -> 项目 -> 项目SDK 和 项目语言级别
我遇到了错误:
错误:java:不再支持源选项5。请使用6或更高版本。
这是一个持续的问题。
我所做的:
- 创建一个JavaFX项目
- 导入所有依赖并使用VM选项将它们引用到正确的位置
- 在给定的项目文件夹上单击右键 -> 添加框架支持 -> Maven
感谢任何简单的解决方案。我已经查阅并尝试过的链接。
英文:
I am trying to get maven to work properly on my computer. Until now I have mostly avoided using it but for the time being i need to get it up and running. I want it working with javafx/java in general.
I have checked various guides trying to get it working but with no luck.
- Settings -> Build, Execution, Deployment -> Compiler -> Java Compiler & Bytecode version/Project Bytecode version
- Matched with Project Settings -> Project -> Project SDK & Project Language Level
I get the error:
Error:java: Source option 5 is no longer supported. Use 6 or later.
This is a continual problem.
What I do:
- Create a javafx project
- Import all dependencies and refer them to the right location with VM options
- Right-click given project folder -> Add framework support -> Maven
Appreciate any simple solutions. Links I have checked and tried.
答案1
得分: 0
<properties>
<maven.compiler.target>1.6</maven.compiler.target>
<maven.compiler.source>1.6</maven.compiler.source>
</properties>
英文:
In your pom you need to simply change the target/source to java 6 or higher.
<properties>
<maven.compiler.target>1.6</maven.compiler.target>
<maven.compiler.source>1.6</maven.compiler.source>
</properties>
专注分享java语言的经验与见解,让所有开发者获益!
评论