General TC > General TC Talk
Run java script automatically at bootup
calvino:
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
curaga:
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
Bunn1:
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: ---/usr/local/openjdk-7/jre/bin/java -jar /home/tc/myjar.jar &
--- End code ---
is there something I am doing wrong, or do you have any other suggestions?
curaga:
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.
Bunn1:
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.
Navigation
[0] Message Index
[#] Next page
Go to full version