On Aug 6, 11:50 pm, Dave <david.dreisigme...@gmail.com> wrote:
> I get the error:
>
> Cannot run program "pdb_to_xyzr": error=2, No such file or directory
>   [Thrown class java.io.IOException]

You may have a path problem.
Try running "env" in the same fashion - I get a very basic path (just
"/bin" and "/usr/bin") and none of my settings from .bashrc
or .profile.

Workarounds I know of:

- Use clojure.contrib.shell-out and supply a map of the environment
variables you need, including the path:
http://richhickey.github.com/clojure-contrib/shell-out-api.html

- Put the "pdb_to_xyzr" call into a shell script that sets the path
for you, and call the shell script from your program.

- Use the full path to the executable rather than relying on
environment variables.

- Use one of the Java Runtime.exec variants that takes a String array
of environment variables. (Although I would recommend one of the other
options - I don't think there's a direct way to create a String array
in Clojure, but you could do it indirectly through String.split or
similar.):
http://download-llnw.oracle.com/javase/1.5.0/docs/api/java/lang/Runtime.html


Regards
jf

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to