Main siteMain site  ForumForum  ForumSearch  Private messageEmail contact  RegisterRegister  Log inLog in 
Topic: import java.util.Random into expressionevaluator
Reply to topic
Author Message
EMebane



Joined: Apr 15, 2019
Posts: 89

PostPosted: Jul 3, 2020 9:39 PM    Post subject: import java.util.Random into expressionevaluator

How may I access the Random class in an objectExpressionEvaluator?

I don't see a way in the Advanced settings to add an import statement, such as:
import java.util.Random;
EMebane



Joined: Apr 15, 2019
Posts: 89

PostPosted: Jul 4, 2020 1:00 AM    Post subject:

I'd also like to be able to use Dictionary which is in java.util.
jarek



Joined: Oct 22, 2007
Posts: 820

PostPosted: Jul 4, 2020 8:51 AM    Post subject:

There is no way to have import statement in expression evaluators.

But you can use full class names, for example:

new java.util.Random().nextFloat();
EMebane



Joined: Apr 15, 2019
Posts: 89

PostPosted: Jul 4, 2020 9:06 PM    Post subject:

That works, thanks!
Reply to topic