-1

I have a build jar in Jenkins .I need to deploy the jar into windows VM Machine..I have tried lot of options but i couldn't achieve. Kindly suggest me .. Guidance much appreciate.

Subbu
  • 1

1 Answers1

0

I assume that your have an Spring boot executable jar. I'm also assuming that you have jar file located in central repo such as Nexus or Artifactory.

In this case, create a write declarative or scripted pipeline. In one of the build steps execute a batch file with the command below.

java -jar <YourJarFile>.jar

Also make sure the installed java version classpath is set.

CoderBehindCode
  • 33
  • 1
  • 2
  • 8
  • Please check this thread which has info on how to execute batch scripts in remote machine. https://stackoverflow.com/questions/22553588/run-batch-scripts-on-a-remote-server-windows-from-jenkins – CoderBehindCode Mar 05 '20 at 11:31