I am trying to execute a java program form my ruby code.
My code is something like:
cmd = "java -cp \"path/lib/*\" com.blah.blah"
# %x[#{cmd}]
# `#{cmd}`
# Kernel.system(cmd)
Kernel.exec(cmd)
My problem, is the command does not run successfully in either way. I know that %x, backticks runs in a subshell so probably some env variables are missing. However I was hoping for Kernel.system, Kernel.exec to succeed.
The command runs fine if I directly type it in a shell. Any help in debugging this ?
Thanks!