I am trying to use wsl 2 to run java programs, and I will be writing the code in sublime text 3. I have already installed java in wsl 2, but don't know how to run a program through it built in sublime.
First, copy the java file to the linux system, the windows disk can be copied from the mnt directory
Make sure you have successfully installed the Java environment
Use the javac command to compile the .java file, Use java command to execute .class file