Article View: borland.public.jbuilder.java.language
Article #19291Re: Parameters problem
From: Tim Shelley
Date: Tue, 17 Feb 1998 00:00
Date: Tue, 17 Feb 1998 00:00
36 lines
1498 bytes
1498 bytes
Hi Bertrand,
Are you meaning command line parameters so you can call your application by
myApplication parameter1 parameter2 etc..
If so you need to include:
static public main(String args[])
{
(new myApplication()).show)
}
The args[] contain the parameters. When run as an application it always
looks for a 'main' method.
Tim.
Bertrand Van Limbergen wrote:
> I would like to use an application as applet and standalone; the
> following code is generated by JBuilder:
>
> //Get a parameter value
> public String getParameter(String key, String def) {
> return isStandalone ? System.getProperty(key, def) :
> (getParameter(key) != null ? getParameter(key) : def);
> }
>
> when the class is run as an applet, the parameters are read from the
> html file, but when run as stand alone, how are the parameter read, from
> wich file? does System.getProperty() read from a specific file?
>
> Help will be appreciated.
> Thankx
Technical Details
Message-ID:
<34E9CA79.CDB017EE@objectuk.co.uk>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<34E84122.B22D500F@mx5ia21.ch.siemens.be>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,75382c95650b6d66 X-Google-Attributes: gidf74b3,public From: Tim Shelley <tim_shelley@objectuk.co.uk> Subject: Re: Parameters problem Date: 1998/02/17 Message-ID: <34E9CA79.CDB017EE@objectuk.co.uk> X-Deja-AN: 325927396 Content-Transfer-Encoding: 7bit References: <34E84122.B22D500F@mx5ia21.ch.siemens.be> Content-Type: text/plain; charset=us-ascii Organization: None Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language