Evaluating expressions stored in notebook from Java

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

Example:

UsingFrontEnd[SelectionEvaluateCreateCell[nb];]


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

m1.evaluate("UsingFrontEnd[SelectionEvaluateCreateCell[nb];]");


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 of SelectionMove.

-
There appears to be Mathematica syntax errors in the string you are supplying to your evaluate method. SelectionEvaluateCreateCell requires one or two arguments. Further, the terminating semicolon ( ; ) suppresses anything returned by your expression and forces Null to be returned. –  m_goldberg May 22 at 12:43
There was a typo in the question. I have edited it. And I also tried without semi colon and that produced the same results –  RituD May 23 at 7:27