in reply to CLASSPATH problem when using backticks
It's hard to tell why your command isn't being interpreted as you desire without seeing the command (print("[$cmd]\n");). Furthermore, the suitability of a solution would be enhanced by having the code that builds your command.