PDA

View Full Version : [SOLVED] Create Launcher for ./application



scsever
April 27th, 2010, 05:11 PM
I would like to create a launcher for a java application but because it launches with ./application I have been unsuccessful in my attempts. To launch it now I cd to /opt/tools/test/ and then launch it with ./application. The problem is that I have no idea how to make this happen in one command.

Thanks,

dv3500ea
April 27th, 2010, 07:04 PM
/opt/tools/test/application

scsever
April 27th, 2010, 07:52 PM
I've already tried this.
I'm not familiar with why some applications need ./ to launch them but this is one. That's why I have to cd to /opt/tools/test/ and then launch with ./application.
If I try /opt/tools/test/application it won't run.
Maybe there is something I need to do to the file so ./ isn't needed? But I have no idea.

Thanks,

dv3500ea
April 28th, 2010, 10:03 PM
That's strange, '/opt/tools/test/application' is the same as './application' when in '/opt/tools/test/'. My only guess is that there are other files in that directory that application depends on.

Try making a file in '/opt/tools/test/' called 'run-application'
with the contents:


#!/bin/sh
cd /opt/tools/test/
./application

then run

chmod +x /opt/tools/test/run-application

Then create a launcher with path '/opt/tools/test/run-application'

scsever
April 30th, 2010, 03:31 PM
I found someone in our local LUG that knew what to do, the solution was to use this shortcut: bash -c "cd /opt/tools/test ; ./application"

Thanks,