我将JAVA_HOME设置为
C:\Program Files (x86)\Java\jdk1.6.0_18
Run Code Online (Sandbox Code Playgroud)
在我运行maven安装后,我从eclipse获得此消息:
原因:
Unable to locate the Javac Compiler in:
C:\Program Files (x86)\Java\jre6\..\lib\tools.jar
Please ensure you are using JDK 1.4 or above and
not a JRE (the com.sun.tools.javac.Main class is required).
In most cases you can change the location of your Java
installation by setting the JAVA_HOME environment variable.
Run Code Online (Sandbox Code Playgroud)
我确信这是棘手的部分
请确保您使用的是JDK 1.4或更高版本,而不是JRE
当我将配置运行到JRE6时,如何将其更改为已安装的JDK 1.6
编辑
我甚至试图修改插件:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<executable>C:\Program Files (x86)\Java\jdk1.6.0_18\bin</executable>
</configuration>
</plugin>
Run Code Online (Sandbox Code Playgroud)
我仍然得到同样的错误
也许我忘了说我使用eclipse maven插件..如何在eclipse中从JRE更改为JDK?
我已经在JCreator中编写了一个Java程序,一切都已完成,但我想从中创建一个可执行文件,即我不想通过加载java类并编译然后执行来运行程序,而是将其作为一个独立的可执行文件.
最快的方法是什么?