Запустите PHP сервера с определенным терминалом папки
$ cd ~/public_html
$ php -S localhost:8000 -t foo/
Nighter
$ cd ~/public_html
$ php -S localhost:8000 -t foo/
javac FirstJavaProgram.java
javac <yourfilename>.java
after that do:
java <yourfilename>
// i have a file name : demo.java
public class demo{
public static void main(String[]args){
System.out.println("hello world");
}
}
//open cmd or terminal on folder and then : java demo.java