title: how can i call a java class that is inside a jar from within a shell script that is inside another jar
body: <p>I have a web application and inside a jar i have a shell script. From that shell script i want to execute a java class that is inside another jar file.
  I can actually execute, in a prompt, the class like this</p>
  
  <p>/usr/bin/java -jar bar.foo.a.jar bar.foo.my.class</p>
  
  <p>but the problem is when a task executes the script from inside the jar. Then the bar.foo.a.jar is not located because its not at the same level</p>
  
  <p>i tried with </p>
  
  <p>/usr/bin/java -jar ../../bar.foo.a.jar bar.foo.my.class</p>
  
  <p>but i doesn't work, any suggestion on how could i achieve this?
  is there a better way to do something like this?</p>