---- open terminal in directory where you have main files ----
---- run following commands ----
--------------------- javac Main.java ----------------------------
--------------------- java Main 4000 public ----------------------
---------------------First -> the port number--------------------
---------------------Second -> relative path to public directory--
you can change the arguments depending upon your requirements