views:

84

answers:

2

In Script editor i have written a command to boot the JAR.

do shell script "cd /Desktop/RunJar/; java -jar RunMyJar.jar"

and Saved as script file as a Application. When i click on script file jar get run.

As the apple script file has been saved as application we can not open the file on WINDOWS O.S.. so we are looking to configure the script file in such way that

EITHER

User only run that script file and script can automatically get the name of current directory and run the JAR instead of writing cd /Desktop/RunJar/;

OR

we can able to ship the script with the blank value of variable say current director and user can open and specif its working directory.

My Requirement is

Can apple script file automatic capture the absolute path of current directory (/Desktop/RunJar/) in which JAR is being executed.
OR Can we ship the apple script to MAC user from windows and ask user to open the script file and provide the absolute path of your current directory to some local variable say Current_directory in apple script.

Thanks-

A: 

How is this different than my answer to your original question?

RyanWilcox
A: 

Not sure if this is what you’re asking, but you can’t run AppleScripts on Windows. You’d be better off writing a batch file for Windows.

Paul D. Waite