Solved

Run Embedded Jetty Server in Background on Linux

Posted on 2012-03-14
2
1,159 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Optimum High-Definition Video Viewing and Control

The ATEN VM0404HA 4x4 4K HDMI Matrix Switch supports 4K resolutions of UHD (3840 x 2160) and DCI (4096 x 2160) with refresh rates of 30 Hz (4:4:4) and 60 Hz (4:2:0). It is ideal for applications where the routing of 4K digital signals is required.

Question has a verified solution.

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

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

626 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