New user, stuck on comand line parameters

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

New user, stuck on comand line parameters

Dave Pawson-2
I have a java class which I've moved to bsh easily.

I'm stuck getting parameters to it (argv[x])

$java -cp bsh.jar myscript.bsh param1
seems to be indicated at

http://www.beanshell.org/manual/standalonemode.html

I'm unsure if I should be using a
public static void main()
in my code (I couldn't get it to work).

No example found in archive or documentation?

Any help appreciated.

regards

--
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Beanshell-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beanshell-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New user, stuck on comand line parameters

Alexey Zinger
Make sure you're referencing bsh.args array variable to get at the command line parameters.

Alexey
2001 Honda CBR600F4i (CCS)
1992 Kawasaki EX500
http://azinger.blogspot.com
http://bsheet.sourceforge.net
http://wcollage.sourceforge.net


--- On Wed, 6/4/08, Dave Pawson <[hidden email]> wrote:
From: Dave Pawson <[hidden email]>
Subject: [Beanshell-users] New user, stuck on comand line parameters
To: [hidden email]
Date: Wednesday, June 4, 2008, 6:12 AM

I have a java class which I've moved to bsh easily.

I'm stuck getting parameters to it (argv[x])

$java -cp bsh.jar myscript.bsh param1
seems to be indicated at

http://www.beanshell.org/manual/standalonemode.html

I'm unsure if I should be using a
public static void main()
in my code (I couldn't get it to work).

No example found in archive or documentation?

Any help appreciated.

regards

--
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Beanshell-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beanshell-users


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Beanshell-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beanshell-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New user, stuck on comand line parameters

Dave Pawson-2
2008/6/4 Alexey Zinger <[hidden email]>:
> Make sure you're referencing bsh.args array variable to get at the command
> line parameters.

Doh!

Tks Alexey.

Is it documented? I couldn't find it.

regards


--
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Beanshell-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beanshell-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New user, stuck on comand line parameters

Mark Salter
Dave Pawson wrote:

> Is it documented? I couldn't find it.
>
Given the variable name I found it here:-

  http://www.beanshell.org/manual/specialvarsvalues.html

--
Regards
Mark

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Beanshell-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beanshell-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New user, stuck on comand line parameters

Dave Pawson-2
2008/6/4 Mark Salter <[hidden email]>:
> Dave Pawson wrote:
>
>> Is it documented? I couldn't find it.
>>
> Given the variable name I found it here:-
>
>  http://www.beanshell.org/manual/specialvarsvalues.html

Yes, once I knew what I was looking for.

bsh.args - An array of Strings passed as command line arguments to the
BeanShell interpreter.


I tried searching but failed :-)

There now if anyone searches the lists!

Thanks Mark.


regards

--
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Beanshell-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beanshell-users
Loading...