07-26-2007 07:10 AM - edited 03-14-2019 01:06 AM
Hi,
I know that in version 3.5, we can use the "execute java method" step from the java panel but it's deprecated in 4.0.X
In the documentation, they wrote to use the "set" step. It's working fine if you have to set something to a variable but what is you just want to call a method ?
for example :
you have a date variable : java.util.Date myDate = new java.util.Date();
and you want to use the void setHours(int) Method.
How is it possible ??
I did it in the past but I forgot how to do that :(
Thanks you for you help !
Thierry
07-27-2007 08:53 AM
Hello,
Java methods can be sort of programmed natively in CRS 4.x - indeed, using the Set step.
Can you give me some more information on what you are trying to achieve here? I guess the easiest thing is to program a method using the set step that will return int 0 to a dummy variable...
G.
07-29-2007 10:45 PM
Hi G.
Yes I read the same in the documentation : use the Set step. But it's not really convenient. A set Step is to put something into a variable. In my case, I just want to call a method to set something in a java class which will return nothing -> void myMethod(int x);
As you propose, I can use a dummy variable but it's not really good ...
-> Set myDummyVariable to
{
myClass.aMethod(parameter1);
return 0;
}
Is it the only possibility ?
Thanks you
Thierry
07-30-2007 01:53 PM
That's the way I know how to do it. Not elegant, as you say. Perhaps not as elegant as the previous "Execute Java Method".
However, the huge improvement in the capabilities of the Expression Editor is a terrific trade-off.
Regards,
Geoff
07-30-2007 10:44 PM
Hi Geoff,
Ok I will use the same way... That's also true the expression editor is really better ! particularly for java developpers ;)
Kind regards,
Thierry
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide