Solved

Run Embedded Jetty Server in Background on Linux

Posted on 2012-03-14
2
1,113 Views
Last Modified: 2012-03-15
Hello,

I'm using a ssh session on a Linux server to start an Embedded Jetty Server to run a web application that exposes web services. When I use the java -jar start.jar to bring up the Jetty web server instance I don't have access to the command line in that session and must open up a new ssh session in order to run a command line application that invokes the web services running on the jetty instance. Is there any way to run jetty in the background and in the same ssh session have access to the command line?
0
Comment
Question by:cgray1223
2 Comments
 
LVL 11

Accepted Solution

by:
legolasthehansy earned 500 total points
ID: 37726205
Try this,

If you are running the SSH session remotely,
nohup <java command> &

This runs the command in the background so that you can access the console/session for doing your work. Closing the session wouldn't terminate the program. If you want to terminate it you will need to find the process ID and send the KILL signal.
You can avoid all this and simply run,
<java command> & 
and it would terminate if you close the session.
0
 

Author Comment

by:cgray1223
ID: 37727932
I used java -jar start.jar &>/dev/null & but your solution would work as wel.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
CentOS 7 Linux for HP DL380 G4 32Bits 7 71
Apache LDAP Authentication 20 51
Eclipse for Java EE development 2 43
Drop down list show all elements but disabled for selection 6 31
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question