• Post Reply Bookmark Topic Watch Topic
  • New Topic

Retreiving command line arguments from Frameview  RSS feed

 
Kevin Brooks
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a program I started with Netbeans and let it generate the initial program for me. Now I need my Frameview object to have access to the command line arguments? Is there a simple way to either retrieve them from my Frameview object, or pass them into my Frameview object?
 
Kevin Brooks
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I could access the Args from the Startup() method, that would work.
 
Campbell Ritchie
Marshal
Posts: 56584
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch
code
The command-line arguments are a String following the name of the class with the main method; this is divided on whitespace not inside "" into a String[] array, which is available to the main method. If you require them, one of your classes should record them, as a field maybe, and the main method should pass the reference to args to your code.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!