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]);
}
}
command line arguments
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
Re: command line arguments
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
See Configure menu --> Preferences dialog --> Tools branch --> your tool --> right side of the dialog box
Re: command line arguments
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 ....
Command: C:\jdk1.3.1\bin\java.exe [or wherever]
Parameters: yourPath.yourClassName param1 param2 param2 ....