It could be that the output is directed to STDERR instead of STDOUT. Try this:
myoutput = `keytool -import -alias #{al} -keystore #{ks} -storepass #{pw} -file #{ca} -trustcacerts -noprompt 2>&1`
I don't have any certificate to import to test this, but running `keytool`
alone sends output to STDERR, whereas `keytool 2>&1`
works fine. So I'm guessing this application writes to STDERR normally (very odd).