0

I'm writing a Python script which at certain point needs to launch a jar file. So I was thinking about making a system call with command:

'./myjarfile.jar'

The problem is that I have that jar in a different folder. So I tried:

'./home/users/myuser/myfolder/myjarfile.jar'

which doesn't work at console. Also tried using java binary:

'java /home/users/myuser/myfolder/myjarfile.jar'

which doesn't work either.

Any help?

  • I think your second command is wrong. I tried /home/users/myuser/myfolder/myjarfile.jar and it works. If I try ./home/users/myuser/myfolder/myjarfile.jar I get an error message zsh: datei oder Verzeichnis nicht gefunden: ./home/users/myuser/myfolder/myjarfile.jar which means that the file was not found. – BuZZ-dEE Jan 31 '13 at 15:35
  • I answered your question. If it's right, than please accept it. – BuZZ-dEE Jan 31 '13 at 15:43

1 Answers1

1

I think your second command is wrong. I tried:

/home/users/myuser/myfolder/myjarfile.jar

and it works. If I try:

 ./home/users/myuser/myfolder/myjarfile.jar

I get an error message:

zsh: datei oder Verzeichnis nicht gefunden: ./home/users/myuser/myfolder/myjarfile.jar

which means that the file was not found.

The third command is also wrong. Try java -jar /home/users/myuser/myfolder/myjarfile.jar

BuZZ-dEE
  • 14,223