Change directory and execute file in one command

I tried that but gave me this
-bash: cd: /home/pi/home/pi: No such file or directory

you have a filename problem

try this command:

java -jar /home/pi/server-0.21.1.jar -dataFolder /home/pi/Blynk &

`pi@raspi:~ $ cd ~pi`

That worked

No error with that. Up and running.

OK a few points.

You have server version 0.21.1 but the latest version is 0.21.6. You should download the latest version and then ensure your script is updated accordingly.

I updated the other thread to make it a little clearer and it explains what you need to do with crontab.

Some people do just use “server” in the java command but that is because they either rename each server-0.xx.x to just server or they have what’s called a symbolic link. For you I think it is clearer if you just edit the script each time you download a new server.

The word server in the the sudo line is fine as it’s a parameter used by the blynk file rather than being a filename.

Once you have done the crontab update you should reboot the Pi and ensure it all works as required.

1 Like

SUCCESS!
Updated server, updated scripts, rebooted and what do you know it works. Thanks a ton! Wish I could throw you a monetary tip for all this help. I really appreciate it.