LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 06-30-2009, 04:55 PM   #1
navigat0
LQ Newbie
 
Registered: Jul 2008
Posts: 5

Rep: Reputation: 0
Can launch Java webapp from rc.local


I am trying to launch a java web application automatically when the server starts from rc.local.

Logged in as root with a console I can call the jar directly "java -jar /apps/web/fitapp.jar &" everything starts no problems.

Once I add the same command to rc.local and reboot the webapp fails to start. Re-directing the output shows "Unable to access jarfile fitapp.jar". I've tried setting java environment variables (using in the rc.local, and in root's profile (bash), but that error persists.

Any suggestions? root owns the directories and I've even gone so far as marking everything 777 just to be sure. I'm grateful for any ideas.

Thanks!
 
Old 06-30-2009, 11:25 PM   #2
suhas!
Member
 
Registered: Mar 2007
Posts: 100

Rep: Reputation: 17
Its weird... I can only suggest to try to use full path of java binary in rc.local file... although it does not make much sense.. but its worth a try

can you also provide us the ls -l output for your jar file?
 
Old 07-01-2009, 10:48 AM   #3
navigat0
LQ Newbie
 
Registered: Jul 2008
Posts: 5

Original Poster
Rep: Reputation: 0
Thumbs up As suggested/ requested...

Output ls-l
rwxrwxrwx 1 root root 1066873 Apr 30 11:49 /apps/web/fitapp.jar

Re-stated command in rc.local
/usr/bin/java -jar /apps/web/fitapp.jar -d /apps/web/ & > /apps/error.log
path to java path to jarfile jar working folder log any errors

Gracias Amigo - you are a gentleman and a schoolbus!
^^
 
  


Reply



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
Can't launch a .jar java program czubek Linux - Newbie 2 06-20-2009 08:45 PM
Boot.local wont launch sh FLCL SUSE / openSUSE 3 05-20-2009 11:42 PM
Xterm does not launch Java GUI hurry6 Linux - General 6 12-04-2007 04:25 PM
Help with Frostwire/Java- can't launch Misfit138 Linux - Software 0 01-03-2007 07:27 AM
can't launch java app from shell script... LonAllen Linux - Newbie 0 07-07-2003 08:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:02 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration