ProcessBuilder Syntax errors

Hi,

I'm getting syntax errors with the following two statements

x ProcessBuilder pb = new ProcessBuilder("xxx.exe");

...........................................

xpb.command(filename);

It says there is no such constructor for the first statement. For the second one, no such a method for the data type. In fact, I tried several samples from the net and all end up the same result. ANy suggestions?

I use Eclipse 3.2 on XP Professional. Thanks,

I tried on several sets of codes from website. They all resulted in the same kind of errors

[585 byte] By [w-wa] at [2007-11-27 4:44:18]
# 1
Have you written your own ProcessBuilder class?
floundera at 2007-7-12 9:56:16 > top of Java-index,Java Essentials,Java Programming...
# 2
No, I didn't write the ProcessPower class.
w-wa at 2007-7-12 9:56:16 > top of Java-index,Java Essentials,Java Programming...
# 3
> No, I didn't write the ProcessPower class.Right well good but that's not what he asked.
cotton.ma at 2007-7-12 9:56:16 > top of Java-index,Java Essentials,Java Programming...
# 4
No, I didn't write the ProcessPower class.
w-wa at 2007-7-12 9:56:16 > top of Java-index,Java Essentials,Java Programming...
# 5
We don't care about the ProcessPower class!Do you have your own version or one given to you of ProcessBuilder class?Please look at the bit in bold.
floundera at 2007-7-12 9:56:16 > top of Java-index,Java Essentials,Java Programming...
# 6
> No, I didn't write the ProcessPower class.You already said that.Sadly nobody asked about the ProcessPower class, and while this seems a very silly discussion your confusion on the subject could well be the actual problem here.
cotton.ma at 2007-7-12 9:56:16 > top of Java-index,Java Essentials,Java Programming...
# 7
Sorry. I sent the same message twice. I'm new to Java (less than 2 weeks). Would be happy to use whatever are already there. In fact I'm writing my first Java application.
w-wa at 2007-7-12 9:56:17 > top of Java-index,Java Essentials,Java Programming...
# 8
> Sorry. I sent the same message twice. I'm new to Java> (less than 2 weeks). Would be happy to use whatever> are already there. In fact I'm writing my first Java> application.Okay.So did you write your own ProcessBuilder class or not?
cotton.ma at 2007-7-12 9:56:17 > top of Java-index,Java Essentials,Java Programming...
# 9
No, I didn't write it.
w-wa at 2007-7-12 9:56:17 > top of Java-index,Java Essentials,Java Programming...
# 10
If you are using Java 1.4 or earlier then you cannot use ProcessBuilder. It's new in Java 5.
DrClapa at 2007-7-12 9:56:17 > top of Java-index,Java Essentials,Java Programming...
# 11
The IDE I'm using, Eclipse 3.2, come with Java 1.5.
w-wa at 2007-7-12 9:56:17 > top of Java-index,Java Essentials,Java Programming...
# 12
Hi, It turns out to be a simple problem. Those two methods require an array of strings as inputs, anything else is flagged as an error. The trouble is I use what I find on Internet as references that often don't match what I have in binary.
w-wa at 2007-7-12 9:56:17 > top of Java-index,Java Essentials,Java Programming...