Results 1 to 5 of 5
Hi all,
I want to start a java program when the system starts. How to achieve that ?
Thank you very much indeed...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 11-11-2011 #1Just Joined!
- Join Date
- Mar 2011
- Posts
- 11
How to start an application when the system starts ?
Hi all,
I want to start a java program when the system starts. How to achieve that ?
Thank you very much indeed
- 11-11-2011 #2
Are you wanting to start the application on login? Or on actual system start-up?
If it's the latter, you can add it to your preferred applications (or similar) for your DE.
If the former, a simple method would be to add it to your /etc/rc.d/rc.M file.Jay
New users, read this first.
New Member FAQ
Registered Linux User #463940
I do not respond to Private Messages asking for Linux help. Please, keep it on the public boards.
- 11-11-2011 #3Just Joined!
- Join Date
- Mar 2011
- Posts
- 11
I want to start the application on actual system start-up. What do you mean by DE ? And how to add to the preferred applications as you said ?
- 11-11-2011 #4
DE = Desktop Environment. Like KDE or Gnome.
But since you want the app to launch on startup, you can just add it to your /etc/rc.d/rc.M file.
You'll need to be root to edit the file. But just tack on the command to launch your program to the end of the file, reboot.
You should be good to go.Jay
New users, read this first.
New Member FAQ
Registered Linux User #463940
I do not respond to Private Messages asking for Linux help. Please, keep it on the public boards.
- 11-11-2011 #5Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,680
Just a note, it can depend slightly, based upon your distro.
e.g., in Fedora/RH, i would put the startup code in a file called /etc/init.d/myJavaProg. This script would have simple case statements in it to handle start|stop|status|restart commands and have the LSB stuff at the top (#description and #chkconfig) so that the init process and the /sbin/service script can control it during startup/shutdown, etc.
Of course we are moving from SysVInit to systemd, so this is already "legacy"...
or more simply, it could be tacked onto the end of /etc/rc.d/rc.local


Reply With Quote
