File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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


Win a copy of Head First Android this week in the Android 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: 42956
    
  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!