aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes Eclipse settings problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Eclipse settings problem" Watch "Eclipse settings problem" New topic
Author

Eclipse settings problem

Rahul Jadaun
Ranch Hand

Joined: Oct 05, 2006
Posts: 36
Hello people,

What do I have to do to make eclipse prompt for command line parameters.

Regards,
Rahul.
bart zagers
Ranch Hand

Joined: Feb 05, 2003
Posts: 234
I don't think you can make Eclipse prompt for command line parameters.
You can specify them in the "Run..." (or "Debug...") dialogue in the "(x) arguments" tab.
[ February 15, 2007: Message edited by: bart zagers ]
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Actually, in my version of eclipse, that tab contains a "Variables..." button. If you click it, you can choose from a huge number of variables, including a number of "..._prompt" variables, which will do exactly what you want.


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 31075
    
232

Originally posted by Ilja Preuss:
Actually, in my version of eclipse

And which version is that?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
bart zagers
Ranch Hand

Joined: Feb 05, 2003
Posts: 234
Originally posted by Ilja Preuss:
Actually, in my version of eclipse, that tab contains a "Variables..." button. If you click it, you can choose from a huge number of variables, including a number of "..._prompt" variables, which will do exactly what you want.


Thanks, you are right. I've never noticed/used it before. This might come in handy at times.
(Eclipse 3.2.1, but I installed (a test version of) MyEclipseIDE just this week).
pete stein
Bartender

Joined: Feb 23, 2007
Posts: 1561
I'm not sure if this is kosher, but in this situation where I need easy access to the command line args, I just run my java prog from another helper prog. For instance if I have a main prog called MainProg, I rename the main method to "myMain" and call it from a second Java prog:



and I have a helper class called RunMain (or whatever) that has something like this:



and I have a helper class called RunMain (or whatever) that has something like this:



This way I can change my command line args at will.
String[] commandLineArgs = {"Pete", "Stein", "is", "great!"};
MainProg.myMain(commandLineArgs);
}
}
[/CODE]

This way I can change my command line args at will in the code.
[ March 15, 2007: Message edited by: pete stein ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Eclipse settings problem