How can I run an app, when using the full path? I need to start an app from another app with just one command on macOS. So, I can't use cd to get to the right path.

I just need to run the app with the full path like: /my/path/to/app/myapp -parameter1 1 -parameter2

Is this even possible on macOS? (I would like to avoid to install the app.)
So cd and then execute is not possible because of:
https://stackoverflow.com/questions/4884681/how-to-use-cd-command-using-java-runtime
Just at the dot at the beggining of the multilevel path : ./my/path/to/app/myapp Dot refers to the current dir. Or you can use absolute path from the root of your disk without the dot like /Users/Me/my/path/to/app/myapp Or if it is a jar file (you mentioned that it is Java app) you can start it as java -jar /my/path/to/app/myapp