Yesterday I was messing around with a little applescript. I tried running a java file using applescript and got that to successfully work. I then tried passing in a parameter using an applescript variable I couldn't get it to work. The code is below
Applescript
Java
Applescript
Code:
property HelloVar : "Hello"
do shell script "cd /Users/skylarwatson/desktop; java HelloWorld" HelloVar
Java
Code:
public class HelloWorld {
public static void main(String[] args) {
for(int i = 0; i < args.length; ++i) {
System.out.println(args[i]);
}
}
}