Ror*_*ory 13 java netbeans maven
我正在尝试在最新的netbeans的全新安装上构建一个现有的maven项目但是我收到以下错误,非常感谢任何帮助:
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project com.rory.ngp.test: Compilation failure
Failure executing javac, but could not parse the error:
javac: invalid target release: 1.7
Run Code Online (Sandbox Code Playgroud)
我认为它与路径有关,但我不确定.这是我的内容/usr/lib/jvm directory;
bash-4.1$ pwd
/usr/lib/jvm
bash-4.1$ ls
java java-openjdk jre-1.6.0-openjdk.x86_64
java-1.5.0-gcj-1.5.0.0 jre jre-gcj
java-1.6.0 jre-1.5.0 jre-openjdk
java-1.6.0-openjdk-1.6.0.0.x86_64 jre-1.5.0-gcj
java-1.6.0-openjdk.x86_64 jre-1.6.0
Run Code Online (Sandbox Code Playgroud)
Ror*_*ory 14
谢谢你,你是对的.
我需要安装JDK 1.7/Java 7,然后在netbeans安装目录/etc/netbeans.conf中编辑netbeans配置文件,指向我安装新版Java的位置:
# Default location of JDK, can be overridden by using --jdkhome <dir>:
netbeans_jdkhome="/users/rory/Documents/jdk1.7.0_02"
Run Code Online (Sandbox Code Playgroud)
在构建和插件下将以下内容添加到您的pom中它应该以1.6为目标
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
28970 次 |
最近记录: |