• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Eclipse settings problem

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello people,

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

Regards,
Rahul.
 
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
author & internet detective
Posts: 41967
911
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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


And which version is that?
 
bart zagers
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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).
 
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
This tiny ad is wafer thin:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic