passing parameters

Hi all,

This is my first time in this forum.

I want to pass command line parameters to a program. For eg. Java programname parameter1 parameter2. but if the first parameter is two word (para meter1), how do I workaround the space in the parameter. It is not taking the first parameter as there is a space in it. Can anyone give some ideas/suggestions.

Thanx.

[383 byte] By [andersonjonesa] at [2007-10-3 11:23:12]
# 1

I'm assuming that you know the args variable in

public static void main(String[] args) {

contains the values you're looking for right? Are you just trying to figure out how to get around them being space-delimited?

hunter9000a at 2007-7-15 13:48:40 > top of Java-index,Java Essentials,New To Java...
# 2
did you tryjava programname "parameter one" parmTwo
SomeoneElsea at 2007-7-15 13:48:40 > top of Java-index,Java Essentials,New To Java...
# 3
Yea, I know that. but my first parameter has a space, how do I get around that. Can you give me any ideas on that.Thanx.
andersonjonesa at 2007-7-15 13:48:40 > top of Java-index,Java Essentials,New To Java...
# 4
Yea, I tried that too, it gave me error. Any other suggestions.Thanx.
andersonjonesa at 2007-7-15 13:48:40 > top of Java-index,Java Essentials,New To Java...
# 5
Reply #2 just told you what you need to know, as far as I can tell.Please wipe the soda pop smear off that part of your monitor.
warnerjaa at 2007-7-15 13:48:40 > top of Java-index,Java Essentials,New To Java...
# 6
> Yea, I tried that too, it gave me error. Any other> suggestions.> > Thanx.Oh, it gave you error eh?Sorry, my crystal ball is broken so I can't read your mind to see what the relevant details of that error were. So I have to ask you to
warnerjaa at 2007-7-15 13:48:40 > top of Java-index,Java Essentials,New To Java...