Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-07-2013, 08:29 PM   #1
LQ Newbie
Registered: Jul 2007
Posts: 1

Rep: Reputation: 0
trying to run "java -jar start.jar" at boot Centos6.4

What do I add to where to make this run on boot?
I would like to be able to stop and start like a service.

Old 06-09-2013, 04:25 PM   #2
Registered: Apr 2013
Location: Montgeron near Paris
Distribution: Slackware
Posts: 32

Rep: Reputation: Disabled

Originally Posted by nschklar View Post
What do I add to where to make this run on boot?
I would like to be able to stop and start like a service.

services are in the /etc/rc.d directory

have a look at the shells that are in it and make your own shell

they run automatically on boot if they are executable ( chmod +x)
Old 06-09-2013, 08:10 PM   #3
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
If you just need to run a single command, e.g. to launch a daemon, you can usually add it to /etc/rc.local, although doing the full SysV style init stuff in /etc/rc.d/ or /etc/init.d (exact location depends on which distribution you're using). However, be advised that all start-up script run with root privileges. If you want your application to not run as root (usually a very good idea for security reasons) and it doesn't srop privileges on its own, be sure tyo have the startup script or rc.local command drop privileges for it (generally su'ing to the target account should be good enough).


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set mail.jar(JavaMail) and mysql-connector-java.jar in Linux class path Terry56 Linux - Software 3 01-19-2010 09:06 AM
I got error with this command 'java -jar NodeView-v1.1.jar' mohdismiaswaly Linux - Software 3 04-23-2009 06:24 AM
How to run JAR from within Java program ?! EAD Programming 1 12-31-2006 07:11 PM
How to run a java jar file. sabliny Programming 7 11-05-2005 01:59 PM
Fedora Core 1 Associating .jar files with java -jar command pymehta Fedora 0 01-13-2005 05:26 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:30 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration