How to access to my Java classes?

View: New views
3 Messages — Rating Filter:   Alert me  

How to access to my Java classes?

by Andrey1981 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I'm new to BeanShell.

I would like to use BeanShell for Java scripting.

How could I access to my Java classes and call their methods?


Thanks in advance,

-Andrey

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Beanshell-users mailing list
Beanshell-users@...
https://lists.sourceforge.net/lists/listinfo/beanshell-users

Re: How to access to my Java classes?

by Alexey Zinger :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Andrey,

You can access Java libraries from within BeanShell the same way you do so from Java compiled code.  You need to ensure your BeanShell environment has access to the library by either specifying the right global CLASSPATH setting or by invoking addClassPath command.  This and other related things are covered in detail in the documentation.  Hope this helps.

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


--- On Tue, 4/29/08, Andrey Siver <andrey.siver@...> wrote:
From: Andrey Siver <andrey.siver@...>
Subject: [Beanshell-users] How to access to my Java classes?
To: beanshell-users@...
Date: Tuesday, April 29, 2008, 9:06 AM

Hello,

I'm new to BeanShell.

I would like to use BeanShell for Java scripting.

How could I access to my Java classes and call their methods?


Thanks in advance,

-Andrey
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save
$100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Beanshell-users mailing list
Beanshell-users@...
https://lists.sourceforge.net/lists/listinfo/beanshell-users


Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Beanshell-users mailing list
Beanshell-users@...
https://lists.sourceforge.net/lists/listinfo/beanshell-users

Re: How to access to my Java classes?

by Andrey1981 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Alexey,

Thank You for the answer.

I use NetBeans IDE with corresponding BeanShell plugins and I wonder is there any classpath integration of my project Java-classes with BeanShell script (that is it would be great if all my java classes from the project would be accesible from BeanShell script by default :))?


Regards,

-Andrey

2008/4/29 Alexey Zinger <inline_four@...>:
Andrey,

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

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Beanshell-users mailing list
Beanshell-users@...
https://lists.sourceforge.net/lists/listinfo/beanshell-users
LightInTheBox - Buy quality products at wholesale price!