[英]How to compile and run a simple java file in jenkins on Windows
I have installed Jenkins on Windows and created a job in Jenkins. 我在Windows上安装了Jenkins并在Jenkins中创建了一份工作。 I want to compile and execute a simple java file (say Hello.java). 我想编译并执行一个简单的java文件(比如Hello.java)。 How can I do that? 我怎样才能做到这一点?
My Hello.java contains the following code: 我的Hello.java包含以下代码:
public class Hello {
public static void main(String args[]){
System.out.println("I'm dancing");
}
}
Have a look at Maven for automatic builds on a continuous integration server such as Jenkins: http://www.sonatype.com/books/mvnref-book/reference/public-book.html 看看Maven在Jenkins等持续集成服务器上的自动构建: http : //www.sonatype.com/books/mvnref-book/reference/public-book.html
There is even an exec Plugin which allows you to execute a Java program using Maven, but this is rarely needed on a continuous integration server. 甚至还有一个exec插件允许您使用Maven执行Java程序,但这在持续集成服务器上很少需要。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.