Evaluating expressions stored in Notebook through Java via Kernel

Mathematica Kernel can generally open a notebook, and evaluate the functions present in the notebook using UsingFrontEnd Command.

Example: UsingFrontEnd[SelectionEvaluateCreateCell ]

However, when I try from Java the following Command, no action happens:

m1.evaluate(“UsingFrontEnd[SelectionEvaluateCreateCell ]”);
Can anyone please explain how I can evaluate expressions in some notebook file through Java.
Note: I have tried all options like NotebookEvaluate, SelectionEvaluate, etc. I have also tried different combinations for SelectionMove Command.

Thanks in advance :slight_smile:

Can anyone atleast suggest how I can use Java to operate on equations stored in mathematica?

It is ml.evaluate not m1.evaluate