Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Wrong program arguments
Wrong program arguments [message #1452706] Sat, 25 October 2014 19:38 Go to next message
Krave Zheng is currently offline Krave ZhengFriend
Messages: 1
Registered: October 2014
Junior Member
I use Eclipse to edit java code.

When using run configurations, I have the following problems.

1. set Program Arguments: c:\
print args[0] shows c:
\ is ignored

2. set Program Arguments: *
print args[0] shows .classpath

how can I get the arguments as same as what I typed?

index.php/fa/19671/0/
  • Attachment: arguments.png
    (Size: 82.40KB, Downloaded 200 times)
Re: Wrong program arguments [message #1454102 is a reply to message #1452706] Tue, 28 October 2014 00:32 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 10/26/2014 09:49 AM, Krave Zheng wrote:
> I use Eclipse to edit java code.
>
> When using run configurations, I have the following problems.
>
> 1. set Program Arguments: c:\
> print args[0] shows c:
> \ is ignored
>
> 2. set Program Arguments: *
> print args[0] shows .classpath
>
> how can I get the arguments as same as what I typed?

You'll want to ask this in the Eclipse CDT forum
Re: Wrong program arguments [message #1455098 is a reply to message #1452706] Wed, 29 October 2014 03:11 Go to previous message
Toshihiro Izumi is currently offline Toshihiro IzumiFriend
Messages: 360
Registered: July 2009
Location: Japan
Senior Member
>1. set Program Arguments: c:\
>print args[0] shows c:
Here are tricks. (include double quotes)
"c:\\"

c:\\""

c:\\"

c:\ yummy_dummy


>2. set Program Arguments: *
>print args[0] shows .classpath
This is normal. Try executing your program in Command Prompt. * is expanded to all files/directories in the current directory.
If you want to pass the asterisk to the program, you need to write "*" (including double quotes) in Command Prompt but there is no way to do so in Eclipse.

--
org.eclipse.debug.core.DebugPlugin.parseArgumentsWindows(String)
org.eclipse.jdt.launching.AbstractVMRunner.quoteWindowsArgs(String[])
Previous Topic:need help
Next Topic:【Solved】How to display an item "Branch" on a history tab
Goto Forum:
  


Current Time: Tue Oct 22 05:38:46 GMT 2019

Powered by FUDForum. Page generated in 0.02588 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top