Tiny Core Linux
General TC => General TC Talk => Topic started by: calvino 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
-
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
-
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
/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?
-
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.
-
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.
-
Ok, your suggestion worked, but I had to change the permissions on the script to allow all and it worked. Thanks for your help