How can I compile a java code inside of unreal?

I am trying to make a java ide using Ue5.
I have almost completed the project but I don’t know how to compile and run the java program.
I know the cmd commands for this job but can I do this without using CMD as the game will hang during the compilation and the execution.
*I just install the new JDK “corretto-18.0.1” it does not require to use javac.
going to the java bin directory
then java <then the file directory>
but I want to execute 3 commands in the same cmd How can I do it.

  1. cd/
    2 . cd <location of the jdk>3. java <then the file directory>