Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
    
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
    
Ok, so no point! thanks! I can accept that as an answer –  Roman Rdgz Jan 31 '13 at 15:37
    
I answered your question. If it's right, than please accept it. –  BuZZ-dEE Jan 31 '13 at 15:43

1 Answer 1

up vote 1 down vote accepted

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.