Jenkins server freezes while running jar - java

Basically in the file system that I used as source control for Jenkins only has an executable .jar with all of the necessary libraries packaged into it. The only other configuration I have on the job itself is a Windows command build step, java -jar name.jar. I am able to run this on Windows Command Prompt, but every time I try to build it on the master computer, the build does not complete and the .jar file does not execute.
I am running this build logged in as the admin of the server.

Related

Create executable OSX file on Windows for .jar file

I have created a java program (in Eclipse). I have successfully compiled it to a .jar file which I can run on windows without any problems. I want to give this program to a friend who has a MacOSX. So my aim is to:
Create a file which can be run on MacOSX
The twist is that I have to configure it on my Windows computer since I don't have access to a Mac. Any advice would be of great help!
I am not sure what you are referring as "create a file which can be run on macOSX"
If you want to run on any OS you just need a JRE on that particular system without it you cant run. It will provide a runtime environment to run a jar file. Then use below command to run the jar.
java -jar Myjar_file.jar

deploy jar on Windows Server AWS EC2

I need to run a jar on a windows server instance.
I would like to build/update/redeploy the jar through a script.
On Linux I know how this works but I cannot seem to find any information how this works on Windows server.
I build the jar somewhere on jenkins.
On linux I can scp (ssh-copy) the jar to the server on a certain location. Then restart it.
In Windows don't even know how to copy the file on to the server without logging in manually via RDP.
I would like a scirpt that I can run in jenkins, that connects to windows server. Stops the running jar and exchanges it for the new one. Starts it up again. (with windows file handles I'd have to stop it before overwriting the jar).
How does CI work on windows server?
PS:The issue is that the jar starts up a process which only runs on windows server in a NON headless mode and thus, I cannot get around windows.

run a jarfile in a different machine from an sqlserver/issue a terminal command from an sqlserver to another windows machine

I have a series of stored procedures(say, SP1, SP2, SP3) consecutively running on an sqlserver(say, serverA).
After SP3 finishes execution, I want to run a jar file in some machine (say, computerA). Is there a way for me to trigger the run of my jar file in computerA after SP3 finishes executing in serverA?
Note: I can only run my jar file in computerA because my jar file actually retrieves data from Bloomberg API. So, this jar file needs to run in a machine that has Bloomberg terminal on it. Only computerA has a Bloomberg terminal.
I think another way of saying this is how to issue a terminal command from an sqlserver to another windows machine. Because I can just issue the following command to computerA but I really don't know how to make that possible.
java -jar D:\Runnables\myJavaApp.jar

How can I run gradle startscript created using installDist task from a batch file in windows OS?

I have Executed the gradle installDist task for my project. After that two start scripts were created one for running in unix like system and another for windows.
I am able to successfully execute the script created for unix systems. But when I tried to run the windows .bat file in my windows system. It is giving below error in command line.
Even if I am trying to run the batch file directly from cmd. It is giving the below error
The input line is too long.
The syntax of the command is incorrect.

Executing windows batch script on Jenkins

I am building a project using Maven and using Jenkins for continuos integration. After the maven build i am getting an executable jar in my target folder which i am trying to run using a windows batch command as build step. But when i put the command in the box under execute windows batch command i get the following error
"cmd /c call /tmp/hudson2033384960131825453.bat FATAL: command
execution failed java.io.IOException: Cannot run program "cmd" (in
directory "/hosting/workspace/myProject"): error=2, No such file or
directory""
I am using mac OSX 10.9.3. The jenkins is deployed in a remote server which i don't have access to.
I want to execute this jar file as a build process. How can i do it?
You should not be expecting a windows batch command to be able to run on a mac. Jenkins is pretty cool, I agree, but it isn't magical.
Also, yes, it is a little confusing that the option is available to you even though you are on a Mac, but its there incase you have a linux / mac master with windows slave: https://issues.jenkins-ci.org/browse/JENKINS-17010?page=com.atlassian.streams.streams-jira-plugin:activity-stream-issue-tab
You cannot execute a windows batch command on mac or linux, end of story.
You are trying to launch windows command through jenkins on another operating system which is not going to work

Categories

Resources