Welcome
|
FAQ
|
Downloads
|
Wiki
Tiny Core Linux
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Language translations
now possible!
Home
Help
Login
Register
Tiny Core Linux
»
General TC
»
General TC Talk
»
Run java script automatically at bootup
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Run java script automatically at bootup (Read 2566 times)
calvino
Newbie
Posts: 1
Run java script automatically at bootup
«
on:
February 04, 2011, 07:57:40 PM »
Hi,
I have written a java script that I want to run automatically at startup using openjdk-7, is this possible in Tinycore? Thanks,
Calvin
Logged
curaga
Administrator
Hero Member
Posts: 11065
Re: Run java script automatically at bootup
«
Reply #1 on:
February 05, 2011, 04:14:38 AM »
Put it in either bootlocal.sh or bootsync.sh just like other items executed on boot. Probably needs full path, like
/path/to/java /path/to/script.class
Logged
The only barriers that can stop you are the ones you create yourself.
Bunn1
Newbie
Posts: 3
Re: Run java script automatically at bootup
«
Reply #2 on:
February 07, 2011, 04:47:30 PM »
I have the same need as the op and I tried what you suggested above, but I keep coming up empty. I tried both the bootlocal.sh and the bootsync.sh and neither seems to work.
This is what I tried in both
Code:
[Select]
/usr/local/openjdk-7/jre/bin/java -jar /home/tc/myjar.jar &
is there something I am doing wrong, or do you have any other suggestions?
«
Last Edit: February 07, 2011, 04:51:08 PM by Bunn1
»
Logged
curaga
Administrator
Hero Member
Posts: 11065
Re: Run java script automatically at bootup
«
Reply #3 on:
February 08, 2011, 06:37:55 AM »
Is it a graphical app? Then it should be started from .X.d, not bootlocal.
Otherwise, use it from bootsync.sh without backgrounding, to see if there's any output. Maybe add a long sleep after it, so you have time to read if it exits immediately.
Logged
The only barriers that can stop you are the ones you create yourself.
Bunn1
Newbie
Posts: 3
Re: Run java script automatically at bootup
«
Reply #4 on:
February 08, 2011, 12:42:47 PM »
It is actually supposed to establish a link to a Database (on a remote server) and report the ip address of the client. I can get other things to run using the method you mentioned just not the network connectivity. when I run my script normally, it works perfectly. However, when I run it from startup, I get nothing.
«
Last Edit: February 08, 2011, 02:10:44 PM by Bunn1
»
Logged
Bunn1
Newbie
Posts: 3
Re: Run java script automatically at bootup
«
Reply #5 on:
February 08, 2011, 03:25:05 PM »
Ok, your suggestion worked, but I had to change the permissions on the script to allow all and it worked. Thanks for your help
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
Tiny Core Linux
»
General TC
»
General TC Talk
»
Run java script automatically at bootup