Page 1 of 1

command line arguments

Posted: Sat Jul 28, 2001 11:50 pm
by Tina Shaner
How do I run a Java application from within Textpad if the application is expecting command line arguments? In other words, how can I RUN this class within TEXTPAD so that I can pass in an argument?

class CommandLineArguments {
public static void main (String args[]) {
System.out.println("args[0] = " + args[0]);
}
}

Re: command line arguments

Posted: Sun Jul 29, 2001 1:18 pm
by Jeff Epstein
After creating a tool to run this, be sure to check "prompt for parameters" within the tool's configuration window.

See Configure menu --> Preferences dialog --> Tools branch --> your tool --> right side of the dialog box

Re: command line arguments

Posted: Fri Nov 02, 2001 10:18 pm
by Mark Schnitzius
Or, just tack the parameters on the end of the parameters line under Tools | Run, e.g.:

Command: C:\jdk1.3.1\bin\java.exe [or wherever]
Parameters: yourPath.yourClassName param1 param2 param2 ....