LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices

Reply
 
Search this Thread
Old 06-07-2013, 08:29 PM   #1
nschklar
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.

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

Rep: Reputation: Disabled
/etc/rc.d

Quote:
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.

Norm
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
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,066

Rep: Reputation: 295Reputation: 295Reputation: 295
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).
 
  


Reply


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


All times are GMT -5. The time now is 10:20 AM.

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