我有一个关于Jenkins中的Java构建的问题。
我解决的错误如下所示:
Unable to locate the Javac Compiler in: C:\Jenkins\jre\..\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
我有一个jenkins作业,它调用gradle脚本。在这项工作中,我首先有一个shell脚本:
此脚本应调整文件local.properties。如您所见,我还为Java添加了两个系统变量的导出。
在这个shell脚本之后,我像这样运行gradle
但在运行此作业时,我收到错误消息
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileProdReleaseJavaWithJavac'.
> Could no
在Eclipse2020-06下运行代码名One应用程序时,JAVA_HOME环境变量可以引用JDK11(例如jdk-11.0.8)吗?
还是需要指向JDK 8(例如jdk-1.8.0_241)?
当JDK 11设置为JAVA_HOME时,尝试在Eclipse2020-06下运行Hello应用程序时,我遇到了以下错误:
BUILD FAILED
...[shortened for brevity]...\HiWorldPrj\build.xml:106: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on th
编译代码时,在Jenkins中得到以下错误:
Error: JAVA_HOME is set to an invalid directory.
JAVA_HOME = "C:\Users\admin\.jenkins\tools\hudson.model.JDK"
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
在环境变量中,我将JAVA_HOME设置为:
C:\Program Files\Java\jdk1.8.
在我的应用程序的清单文件中,我将BREE从JavaSE-1.6更改为JavaSE-1.7:
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
现在我不能再编译应用程序了。
当我运行mvn clean install时,我得到:
[INFO] Resolving dependencies of MavenProject: Xgroup:X:4.0.100-SNAPSHOT @ C:\Users\....\X\pom.xml
[WARNING] The following locally built units have been used to re
我将所有环境设置为在IntelliJ中运行hadoop应用程序。现在,我遇到了一些问题,因为我的代码在编译时没有出现错误消息,尽管我没有hadoop输出。
因此,我必须构建工件,在本地hadoop上运行它,然后得到以下错误
Found interface org.apache.hadoop.mapreduce.TaskAttemptContext, but class was expected
at org.apache.hadoop.mapred.LocalJobRunner$Job.runTasks(LocalJobRunner.java:462)
然后我就可以对它进行调试了。我
我花了相当长的时间阅读以前的文章,但似乎没有一篇文章对我有帮助。我试图从NetBeans运行一个简单的Java应用程序,这里是最简单的代码:
final String DB_URL = "jdbc:derby:CoffeeDB;create=true";
try
{
// Create a connection to the database.
Connection conn = DriverManager.getConnection(DB_URL);
// If the DB already exists, drop th
运行Ubuntu 12.04
我已经添加到PATH:/home/jeffrey/jdk1.6.0_43/lib
我试图使用Make从源代码构建:
make -j16
但是遇到错误:
build/core/config.mk:268: *** Error: could not find jdk tools.jar, please install JDK6, which you can download from java.sun.com. Stop.
有人能解释为什么Make找不到tools.jar吗?
编辑
JAVA_HOME=/home/jeffrey/jdk1.6.0_43/bin/ja