LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 12-11-2009, 02:12 PM   #1
deostroll
Member
 
Registered: Aug 2007
Location: Bangalore
Distribution: fedora
Posts: 112

Rep: Reputation: 15
centos 5: need to start a java prog at boot/startup


Hi,

I need to set a java program to run at startup/boot. What do I do for this...?
 
Old 12-11-2009, 02:40 PM   #2
EricTRA
Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290
Hello,

You could write a small script with executable permissions that contains your java command with all parameters as you would execute it from a terminal. Then you could add that script to the /etc/rc.d/rc.local script that gets executed at boot by init. This way you don't have to write any initialization scripts in the /etc/rc.d/init.d/ directory. If you want it to depend on the runlevels then you'll need to write a 'chkconfig ready' script and run the chkconfig utility (man chkconfig).

Kind regards,

Eric
 
  


Reply

Tags
centos


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
LXer: FireFox 3.0.1 & Java Web Start on 64-bit Xen 3.3 CentOS 5.2 Dom0 LXer Syndicated Linux News 0 09-12-2008 11:51 PM
I want to start a prog from another prog but not as child grupoapunte Programming 5 05-23-2005 05:37 PM
java prog with database keikun_naruchan Programming 1 06-29-2004 04:15 PM
start prog lineakd with X twk Linux - General 1 09-10-2002 02:29 AM
How to start a prog in another terminal ? gluon Linux - General 3 07-18-2002 12:03 PM


All times are GMT -5. The time now is 07:03 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