0

I have tried installing Jetty server on my Ubuntu 12.04 following this steps. But when I start my server I get the following error,

service jetty start ** ERROR: JETTY_HOME not set, you need to set it or install in a standard location

uvijay
  • 11
  • 1
  • 1
  • 1
    Have you considered doing exactly that? – MadHatter Nov 21 '13 at 07:45
  • Yes I tried doing the same by adding in /etc/environment but ended up with the same error. As far as I searched JETTY doesn't need the variable to be set explicitly and is set by Jetty's start mechanism. (start.jar) – uvijay Nov 21 '13 at 12:23
  • related: http://serverfault.com/q/374699/127106 – Abdull Jan 10 '14 at 16:15

2 Answers2

1

Here's a pointer in the right direction: JETTY_HOME refers to an environment variable set with a value corresponding to the directory path where you have installed jetty.

https://stackoverflow.com/questions/2655641/set-environment-variable-in-ubuntu

ErikE
  • 4,746
  • 1
  • 20
  • 27
  • I am new to linux after years of using window and hence having some difficulties. I followed this tutorial to install Jetty [link](http://pietervogelaar.nl/ubuntu-12-04-install-jetty-9/#comment-9071) step by step and was getting the mentioned error. I did google and I did try setting the environment variable explicitly but wasnt working. Thanks. – uvijay Nov 21 '13 at 12:32
1

This is a rather frustrating error with little help out there. I thought I'd post my solution here for someone who is looking to solve the same problem.

Anyway, the correct solution is to set JETTY_HOME in /etc/default/jetty like so:

 JETTY_HOME=/opt/jetty

Hope this helps someone.

Sonny
  • 183
  • 1
  • 8