Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/313.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 包org.junit不存在_Java_Jenkins_Junit_Classpath - Fatal编程技术网

Java 包org.junit不存在

Java 包org.junit不存在,java,jenkins,junit,classpath,Java,Jenkins,Junit,Classpath,我使用Jenkins,并使用Github repo作为源代码 在“生成”部分,我将以Windows批处理命令的形式执行此命令: set path=%path%;C:\Program Files\Java\jdk1.8.0_144\bin cd \Users\harr\JenkinsServer\JenkinsTest\src javac SimpleTest.java //Error is after this executes java SimpleTest 我知道它与类路径有关,但我不确定

我使用Jenkins,并使用Github repo作为源代码

在“生成”部分,我将以Windows批处理命令的形式执行此命令:

set path=%path%;C:\Program Files\Java\jdk1.8.0_144\bin
cd \Users\harr\JenkinsServer\JenkinsTest\src
javac SimpleTest.java //Error is after this executes
java SimpleTest
我知道它与类路径有关,但我不确定如何在jenkins中解决这个问题


请告诉我更多信息是否有帮助

假设您在linux平台上部署了jekins服务器,因此您必须安装jdk、tomcat等,并设置env路径。这样,您就不必在每次构建之前执行
set path

您可以创建一个脚本并将命令复制到其中,然后当jenkins执行构建任务时,它可以执行该脚本。请参阅以了解它。

这有帮助吗?