You cannot call Java actions directly, but you can call a microflow, and in that microflow call the Java action.
Edit: The original question was how to call a Java action from a widget. To answer the edited question: to call a microflow, see this thread.