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 Android Security Essentials Live Lessons 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
Marshal

Joined: Mar 22, 2005
Posts: 41123
    
  45
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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Strings taken from the command line get cut after an '&' symbol
 
Similar Threads
command line arguments for a file
TechCheck?
Change Program (How can I get two inputs)
args.length == 1
problem with search engines