Java functions in UVM or SV

I have some requirement in that I need to use or call java functions in my sequences.
Can we call java functions in UVM or SV using DPI ? If yes then how please give some examples.

In reply to ms_1202:
If you can call Java from C (which you can), then you can use the DPI to call JAVA from SystemVerilog. I’ve never seen an example of this, but there are similar examples of calling Python or Perl from SystemVerilog if you search for it.

In reply to ms_1202:

I think you can make use of system(“any system command”) of C++.

#include <stdlib.h>
extern "C" void function C_to_call_Java(void){ system("*your java command*"); }