Mac terminal Javac

Mac  terminal Javac

Open the Terminal's vim , then write them:

public class test{

 public static void main(String[] args){

 System.out.println("test");

}

}

First, to make the .class file, this is java's object file.

➜  Desktop javac test.java 

Then run this java app.

 

➜  Desktop java test test.class

test

 

posted @ 2017-09-09 15:41  zhaocundang  阅读(325)  评论(0编辑  收藏  举报