I'm trying to reproduce ProcessBuilder example from java documentation
http://java.sun.com/javase/6/docs/api/java/lang/ProcessBuilder.html
This is that example:
ProcessBuilder pb = new ProcessBuilder("myCommand", "myArg1",
"myArg2");
Map<String, String> env = pb.environment();
env.put("VAR1", "myValue");
env.remove("OTHERVAR");
env.put("VAR2", env.get("VAR1") + "suffix");
pb.directory(new File("myDir"));
Process p = pb.start();
I'm typing folowing in clojure repl:
D:\Users\Konstantin>java -jar clojure.jar
Clojure 1.1.0
user=> (def pb (new ProcessBuilder ["myCommand" "myArg"]))
#'user/pb
user=> (def env (.environment pb))
#'user/env
user=> (.put env "VAR1", "myValue")
java.lang.IllegalArgumentException: Can't call public method of non-
public class: public java.lang.String
java.lang.ProcessEnvironment.put(java.lang.String,java.lang.String)
(NO_SOURCE_FILE:0)
What does this error mean and what i am doing wrong?
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
To unsubscribe from this group, send email to
clojure+unsubscribegooglegroups.com or reply to this email with the words
"REMOVE ME" as the subject.