aspose file tools*
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
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
Marshal

Joined: Mar 22, 2005
Posts: 41874
    
  63
The shell may be trying to interpret the ampersand character. Try enclosing the URL with double quotes.


Ping & DNS - my free Android networking tools app
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