This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Strings taken from the command line get cut after an '&' symbol Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Strings taken from the command line get cut after an Watch "Strings taken from the command line get cut after an New topic
Author

Strings taken from the command line get cut after an '&' symbol

Chaz Andrews
Greenhorn

Joined: Sep 20, 2005
Posts: 23
hello, I'm trying to pass a url through the command line to my application, in this case 'http://myeve.eve-online.com/ingameboard.asp?a=channel&channelID=3519' suddenly turns into 'http://myeve.eve-online.com/ingameboard.asp?a=channel'.

I thought that maybe the string might have been spllit into args[0] and args [1], but this isnt the case.

When i just declare the url as a string in the code, this doesnt happen. Why is this? Thanks in advance if you can help
[ March 17, 2007: Message edited by: Chaz Andrews ]
Ulf Dittmer
Rancher

Joined: Mar 22, 2005
Posts: 42958
    
  73
The shell may be trying to interpret the ampersand character. Try enclosing the URL with double quotes.
Chaz Andrews
Greenhorn

Joined: Sep 20, 2005
Posts: 23
thanks alot! that did the trick
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Strings taken from the command line get cut after an '&' symbol
 
It's not a secret anymore!